aboutsummaryrefslogtreecommitdiff
path: root/cmd/mimi
diff options
context:
space:
mode:
authorXe Iaso <me@xeiaso.net>2024-09-13 09:17:33 -0400
committerXe Iaso <me@xeiaso.net>2024-09-13 09:17:33 -0400
commitad25d4075754210cab5e76540740ee96d0b68f6d (patch)
treea1167994ff981772a07eb49df8338bba35e5ad33 /cmd/mimi
parent8f5901e8db2de662915994df0a98c6cd72ee4774 (diff)
downloadx-ad25d4075754210cab5e76540740ee96d0b68f6d.tar.xz
x-ad25d4075754210cab5e76540740ee96d0b68f6d.zip
cmd/mimi: strawberry
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'cmd/mimi')
-rw-r--r--cmd/mimi/manifest/deployment.yaml4
-rw-r--r--cmd/mimi/modules/discord/jufra/system-prompt.txt4
-rw-r--r--cmd/mimi/modules/discord/jufra/tools.go3
3 files changed, 8 insertions, 3 deletions
diff --git a/cmd/mimi/manifest/deployment.yaml b/cmd/mimi/manifest/deployment.yaml
index ff7defd..ce69ee0 100644
--- a/cmd/mimi/manifest/deployment.yaml
+++ b/cmd/mimi/manifest/deployment.yaml
@@ -58,9 +58,9 @@ spec:
- name: HTTP_ADDR
value: ":9002"
- name: OLLAMA_HOST
- value: "http://ollama"
+ value: "http://ollama.ollama.svc.alrest.xeserv.us"
- name: JUFRA_MIMI_MODEL
- value: "hermes3:70b"
+ value: "hermes3"
- name: JUFRA_FLUX_HOST
value: "http://flux"
- name: JUFRA_CONTEXT_WINDOW
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{