Spaces:
Sleeping
Sleeping
Ben Beinke
commited on
Commit
·
eeb84e8
1
Parent(s):
2915f7a
added todos for tommorw
Browse files- app.py +1 -0
- kiss_agent.py +2 -1
app.py
CHANGED
|
@@ -200,6 +200,7 @@ class GradioUI:
|
|
| 200 |
):
|
| 201 |
if isinstance(msg, gr.ChatMessage):
|
| 202 |
messages[-1].metadata["status"] = "done"
|
|
|
|
| 203 |
messages.append(msg)
|
| 204 |
elif isinstance(msg, str): # Then it's only a completion delta
|
| 205 |
msg = msg.replace("<", r"\<").replace(
|
|
|
|
| 200 |
):
|
| 201 |
if isinstance(msg, gr.ChatMessage):
|
| 202 |
messages[-1].metadata["status"] = "done"
|
| 203 |
+
# TODO make it so that only the final answer is shown, rest in drop down
|
| 204 |
messages.append(msg)
|
| 205 |
elif isinstance(msg, str): # Then it's only a completion delta
|
| 206 |
msg = msg.replace("<", r"\<").replace(
|
kiss_agent.py
CHANGED
|
@@ -341,7 +341,7 @@ class KISSAgent(ToolCallingAgent):
|
|
| 341 |
prompt_template: str | None = None,
|
| 342 |
**kwargs,
|
| 343 |
):
|
| 344 |
-
model_id = model_id or settings.
|
| 345 |
api_base_url = api_base_url or settings.api_base_url
|
| 346 |
api_key = api_key or settings.api_key
|
| 347 |
self.prompt_template = prompt_template or PROMPT_TEMPLATE
|
|
@@ -366,6 +366,7 @@ class KISSAgent(ToolCallingAgent):
|
|
| 366 |
add_base_tools=False,
|
| 367 |
**kwargs,
|
| 368 |
)
|
|
|
|
| 369 |
|
| 370 |
def run(self, task: str, **kwargs) -> str:
|
| 371 |
"""Override run method to format prompt with task before calling parent run."""
|
|
|
|
| 341 |
prompt_template: str | None = None,
|
| 342 |
**kwargs,
|
| 343 |
):
|
| 344 |
+
model_id = model_id or settings.model_id
|
| 345 |
api_base_url = api_base_url or settings.api_base_url
|
| 346 |
api_key = api_key or settings.api_key
|
| 347 |
self.prompt_template = prompt_template or PROMPT_TEMPLATE
|
|
|
|
| 366 |
add_base_tools=False,
|
| 367 |
**kwargs,
|
| 368 |
)
|
| 369 |
+
# TODO: add callback to manage memory to limit context window
|
| 370 |
|
| 371 |
def run(self, task: str, **kwargs) -> str:
|
| 372 |
"""Override run method to format prompt with task before calling parent run."""
|