浏览代码

修改参数

gushoubang 9 月之前
父节点
当前提交
b1e3a84441
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      app.py

+ 3 - 2
app.py

@@ -63,11 +63,12 @@ def inputMsg():
 
     try:
         res = ollama.generate(
-            model="qwen2:72b",
+            model="qwen2:7b",
             stream=False,
             prompt=prompt,
             options={"temperature": 0},
-            format="json"
+            format="json",
+            keep_alive=-1
         )
         print(res["response"])
     except Exception as e: