Commit
·
d41f34b
1
Parent(s):
c34a7b1
gfh
Browse files- __pycache__/tools_agent.cpython-310.pyc +0 -0
- app.py +8 -7
- requirements.txt +2 -1
__pycache__/tools_agent.cpython-310.pyc
CHANGED
Binary files a/__pycache__/tools_agent.cpython-310.pyc and b/__pycache__/tools_agent.cpython-310.pyc differ
|
|
app.py
CHANGED
@@ -34,21 +34,22 @@ class BasicAgent:
|
|
34 |
print("Initializing BasicAgent with tools...")
|
35 |
|
36 |
# Load OpenAI token from environment
|
37 |
-
|
38 |
if not openai_token:
|
39 |
raise ValueError("Missing OpenAI API token!")
|
40 |
|
41 |
login(openai_token)
|
42 |
|
43 |
-
model = InferenceClientModel(provider="auto")
|
44 |
|
45 |
|
46 |
# Initialize model and tools
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
|
|
52 |
search_tool = DuckDuckGoSearchTool()
|
53 |
final_answer_tool = FinalAnswerTool()
|
54 |
reverse_tool = ReverseTextTool()
|
|
|
34 |
print("Initializing BasicAgent with tools...")
|
35 |
|
36 |
# Load OpenAI token from environment
|
37 |
+
gemini_api = os.getenv("GEMINI_API")
|
38 |
if not openai_token:
|
39 |
raise ValueError("Missing OpenAI API token!")
|
40 |
|
41 |
login(openai_token)
|
42 |
|
43 |
+
# model = InferenceClientModel(provider="auto")
|
44 |
|
45 |
|
46 |
# Initialize model and tools
|
47 |
+
model = OpenAIServerModel(
|
48 |
+
#api_base="openai",
|
49 |
+
api_key=gemini_api,
|
50 |
+
model_id="gemini-2.0-flash",
|
51 |
+
api_base="https://generativelanguage.googleapis.com/v1beta/openai/",
|
52 |
+
)
|
53 |
search_tool = DuckDuckGoSearchTool()
|
54 |
final_answer_tool = FinalAnswerTool()
|
55 |
reverse_tool = ReverseTextTool()
|
requirements.txt
CHANGED
@@ -2,4 +2,5 @@ gradio
|
|
2 |
requests
|
3 |
smolagents
|
4 |
pandas
|
5 |
-
smolagents[openai]
|
|
|
|
2 |
requests
|
3 |
smolagents
|
4 |
pandas
|
5 |
+
smolagents[openai]
|
6 |
+
duckduckgo-search
|