Spaces:
Sleeping
Sleeping
Update gaia_agent.py
Browse files- gaia_agent.py +7 -12
gaia_agent.py
CHANGED
|
@@ -31,7 +31,6 @@ import chess
|
|
| 31 |
import chess.engine
|
| 32 |
# import tempfile
|
| 33 |
# from PIL import Image
|
| 34 |
-
from langchain.chat_models.openai import OpenAIChat
|
| 35 |
|
| 36 |
|
| 37 |
|
|
@@ -54,19 +53,15 @@ api_key = os.getenv("HF_TOKEN")
|
|
| 54 |
# search_tool = DuckDuckGoSearchRun()
|
| 55 |
|
| 56 |
# Generate the chat interface, including the tools
|
| 57 |
-
|
| 58 |
-
#
|
| 59 |
-
#
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
# )
|
| 64 |
-
llm = OpenAIChat(
|
| 65 |
-
model_name="gpt-4o-mini",
|
| 66 |
-
temperature=0.2,
|
| 67 |
-
openai_api_key=OpenAI_key
|
| 68 |
)
|
| 69 |
|
|
|
|
| 70 |
# # Initialize local Ollama model
|
| 71 |
# llm Ollama(model="qwen2.5-coder", base_url="http://127.0.0.1:11434")
|
| 72 |
|
|
|
|
| 31 |
import chess.engine
|
| 32 |
# import tempfile
|
| 33 |
# from PIL import Image
|
|
|
|
| 34 |
|
| 35 |
|
| 36 |
|
|
|
|
| 53 |
# search_tool = DuckDuckGoSearchRun()
|
| 54 |
|
| 55 |
# Generate the chat interface, including the tools
|
| 56 |
+
llm = HuggingFaceEndpoint(
|
| 57 |
+
#repo_id="Qwen/Qwen2.5-Coder-32B-Instruct",
|
| 58 |
+
#repo_id="deepseek-ai/DeepSeek-R1-0528",
|
| 59 |
+
repo_id="meta-llama/Llama-3.1-8B-Instruct",
|
| 60 |
+
huggingfacehub_api_token=api_key,
|
| 61 |
+
timeout=300,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
)
|
| 63 |
|
| 64 |
+
|
| 65 |
# # Initialize local Ollama model
|
| 66 |
# llm Ollama(model="qwen2.5-coder", base_url="http://127.0.0.1:11434")
|
| 67 |
|