Skip to content

Commit

Permalink
Switch from Azure OpenAI to Bedrock
Browse files Browse the repository at this point in the history
  • Loading branch information
mbklein committed Dec 12, 2024
1 parent a8effff commit a075cfa
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 391 deletions.
3 changes: 2 additions & 1 deletion chat/src/agent/agent_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ def on_tool_end(self, output: ToolMessage, **kwargs: Dict[str, Any]):
pass
case "search":
try:
docs: List[Dict[str, Any]] = [doc.metadata for doc in output.artifact]
result_fields = ("id", "title", "visibility", "work_type", "thumbnail")
docs: List[Dict[str, Any]] = [{k: doc.metadata.get(k) for k in result_fields} for doc in output.artifact]
self.socket.send({"type": "search_result", "ref": self.ref, "message": docs})
except json.decoder.JSONDecodeError as e:
print(f"Invalid json ({e}) returned from {output.name} tool: {output.content}")
Expand Down
59 changes: 0 additions & 59 deletions chat/src/agent/dynamodb_cleaner.py

This file was deleted.

306 changes: 0 additions & 306 deletions chat/src/agent/dynamodb_saver.py

This file was deleted.

Loading

0 comments on commit a075cfa

Please sign in to comment.