Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: handle llm error, bump videodb chat #32

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions backend/director/core/reasoning.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,18 @@ def step(self):
logger.info(f"LLM Response: {llm_response}")

if not llm_response.status:
# TODO: Handle llm error
self.output_message.content.append(
TextContent(
text=llm_response.content,
status=MsgStatus.error,
status_message="Error in reasoning",
agent_name="assistant",
)
)
self.output_message.actions.append("Failed to reason the message")
self.output_message.status = MsgStatus.error
self.output_message.publish()
self.stop()
break

if llm_response.tool_calls:
Expand Down Expand Up @@ -234,9 +245,7 @@ def step(self):
)
if self.iterations == self.max_iterations - 1:
# Direct response case
self.summary_content.status_message = (
"Here is the the response"
)
self.summary_content.status_message = "Here is the response"
self.summary_content.text = llm_response.content
self.summary_content.status = MsgStatus.success
else:
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"preview": "vite preview"
},
"dependencies": {
"@videodb/chat-vue": "^0.0.5",
"@videodb/chat-vue": "~0.0.6",
"@videodb/player-vue": "^0.0.2",
"axios": "^1.7.5",
"dayjs": "^1.11.13",
Expand Down