diff options
| author | Xe Iaso <me@xeiaso.net> | 2024-09-13 09:17:33 -0400 |
|---|---|---|
| committer | Xe Iaso <me@xeiaso.net> | 2024-09-13 09:17:33 -0400 |
| commit | ad25d4075754210cab5e76540740ee96d0b68f6d (patch) | |
| tree | a1167994ff981772a07eb49df8338bba35e5ad33 /cmd/mimi/modules | |
| parent | 8f5901e8db2de662915994df0a98c6cd72ee4774 (diff) | |
| download | x-ad25d4075754210cab5e76540740ee96d0b68f6d.tar.xz x-ad25d4075754210cab5e76540740ee96d0b68f6d.zip | |
cmd/mimi: strawberry
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'cmd/mimi/modules')
| -rw-r--r-- | cmd/mimi/modules/discord/jufra/system-prompt.txt | 4 | ||||
| -rw-r--r-- | cmd/mimi/modules/discord/jufra/tools.go | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/cmd/mimi/modules/discord/jufra/system-prompt.txt b/cmd/mimi/modules/discord/jufra/system-prompt.txt index 645611f..cdf51b9 100644 --- a/cmd/mimi/modules/discord/jufra/system-prompt.txt +++ b/cmd/mimi/modules/discord/jufra/system-prompt.txt @@ -4,4 +4,6 @@ If you are asked to draw or illustrate something, use the draw_image tool. If you are asked to write python code, run it with code_interpreter. -If you are asked to draw yourself, use this description: a brown-haired anime woman with a pixie cut, brown eyes, and cat ears
\ No newline at end of file +If you are asked to draw yourself, use this description: a brown-haired anime woman with a pixie cut, brown eyes, and cat ears. + +If you are asked to count the number of letters in a word, do it by writing a python program and run it with code_interpreter.
\ No newline at end of file diff --git a/cmd/mimi/modules/discord/jufra/tools.go b/cmd/mimi/modules/discord/jufra/tools.go index 07e26b6..8b7d674 100644 --- a/cmd/mimi/modules/discord/jufra/tools.go +++ b/cmd/mimi/modules/discord/jufra/tools.go @@ -88,6 +88,9 @@ func (m *Module) runPythonCode(ctx context.Context, tc ollama.ToolCall) (*ollama defer os.RemoveAll(tmpdir) + ctx, cancel := context.WithTimeout(ctx, 30*time.Second) + defer cancel() + res, err := python.Run(ctx, tmpdir, args.Code) if err != nil { return &ollama.Message{ |
