Spaces:
Sleeping
Sleeping
zasharepw77
commited on
Commit
·
27b0c70
1
Parent(s):
f8d7e03
Cod Calling
Browse files
app.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
from smolagents import ToolCallingAgent, DuckDuckGoSearchTool, LiteLLMModel
|
| 2 |
import os
|
| 3 |
#import litellm
|
| 4 |
#litellm._turn_on_debug() # Enable debugging for litellm
|
|
@@ -33,12 +33,13 @@ os.environ['SAMBANOVA_API_KEY'] = os.getenv('sambanova_token')
|
|
| 33 |
model = LiteLLMModel(
|
| 34 |
model_id="sambanova/Meta-Llama-3.3-70B-Instruct", # Explicitly specify the sambanova provider
|
| 35 |
max_tokens=2096,
|
| 36 |
-
temperature=0.
|
| 37 |
api_base="https://api.sambanova.ai/v1", # Specify the base URL for Sambanova, as in your working requests example
|
| 38 |
)
|
| 39 |
|
| 40 |
# Create the agent
|
| 41 |
-
agent = ToolCallingAgent(
|
|
|
|
| 42 |
tools=[DuckDuckGoSearchTool()],
|
| 43 |
model=model
|
| 44 |
)
|
|
|
|
| 1 |
+
from smolagents import ToolCallingAgent, CodeAgent, DuckDuckGoSearchTool, LiteLLMModel
|
| 2 |
import os
|
| 3 |
#import litellm
|
| 4 |
#litellm._turn_on_debug() # Enable debugging for litellm
|
|
|
|
| 33 |
model = LiteLLMModel(
|
| 34 |
model_id="sambanova/Meta-Llama-3.3-70B-Instruct", # Explicitly specify the sambanova provider
|
| 35 |
max_tokens=2096,
|
| 36 |
+
temperature=0.5,
|
| 37 |
api_base="https://api.sambanova.ai/v1", # Specify the base URL for Sambanova, as in your working requests example
|
| 38 |
)
|
| 39 |
|
| 40 |
# Create the agent
|
| 41 |
+
#agent = ToolCallingAgent(
|
| 42 |
+
agent = CodeAgent(
|
| 43 |
tools=[DuckDuckGoSearchTool()],
|
| 44 |
model=model
|
| 45 |
)
|