Update app.py
Browse files
app.py
CHANGED
|
@@ -199,6 +199,8 @@ The Agent has been provided with context on {self.name} in the form of their sum
|
|
| 199 |
def chat(self, message, history):
|
| 200 |
messages = [{"role": "system", "content": self.system_prompt()}] + history + [{"role": "user", "content": message}]
|
| 201 |
done = False
|
|
|
|
|
|
|
| 202 |
while not done:
|
| 203 |
response = self.openrouter.chat.completions.create(model="meta-llama/llama-3.3-8b-instruct:free", messages=messages, tools=tools)
|
| 204 |
if response.choices[0].finish_reason=="tool_calls":
|
|
|
|
| 199 |
def chat(self, message, history):
|
| 200 |
messages = [{"role": "system", "content": self.system_prompt()}] + history + [{"role": "user", "content": message}]
|
| 201 |
done = False
|
| 202 |
+
|
| 203 |
+
# Generate initial response with tool handling
|
| 204 |
while not done:
|
| 205 |
response = self.openrouter.chat.completions.create(model="meta-llama/llama-3.3-8b-instruct:free", messages=messages, tools=tools)
|
| 206 |
if response.choices[0].finish_reason=="tool_calls":
|