Commit
·
fcb4b73
1
Parent(s):
80b16e1
Switch to local LLM with updated API endpoint
Browse files
app.py
CHANGED
@@ -19,21 +19,21 @@ from tools.final_answer import FinalAnswerTool
|
|
19 |
|
20 |
final_answer = FinalAnswerTool()
|
21 |
|
22 |
-
# Remote LLM
|
23 |
-
model = HfApiModel(
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
)
|
29 |
-
|
30 |
-
# # Local LLM
|
31 |
-
# model = OpenAIServerModel(
|
32 |
-
# model_id="Qwen/Qwen2.5-Coder-14B-Instruct-GGUF",
|
33 |
-
# api_base="http://100.81.11.125:1234/v1",
|
34 |
-
# api_key="lm-studio",
|
35 |
# )
|
36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
# Import tool from Hub
|
38 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
39 |
|
|
|
19 |
|
20 |
final_answer = FinalAnswerTool()
|
21 |
|
22 |
+
# # Remote LLM
|
23 |
+
# model = HfApiModel(
|
24 |
+
# max_tokens=2096,
|
25 |
+
# temperature=0.5,
|
26 |
+
# model_id="https://wxknx1kg971u7k1n.us-east-1.aws.endpoints.huggingface.cloud", # it is possible that this model may be overloaded
|
27 |
+
# custom_role_conversions=None,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
# )
|
29 |
|
30 |
+
# Local LLM
|
31 |
+
model = OpenAIServerModel(
|
32 |
+
model_id="Qwen/Qwen2.5-Coder-14B-Instruct-GGUF",
|
33 |
+
api_base="http://llm.cobanov.cloud/v1",
|
34 |
+
api_key="lm-studio",
|
35 |
+
)
|
36 |
+
|
37 |
# Import tool from Hub
|
38 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
39 |
|