Skip to content

Commit

Permalink
🦋v0.3.8.dev55 - OpenAIToolModel
Browse files Browse the repository at this point in the history
  • Loading branch information
cobycloud committed Jul 7, 2024
1 parent ada7d67 commit c4e6282
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion swarmauri/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.3.8.dev54"
__version__ = "0.3.8.dev55"
__long_desc__ = """
# swarmaURI sdk
Expand Down
5 changes: 2 additions & 3 deletions swarmauri/standard/llms/concrete/OpenAIToolModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def predict(self,
tool_choice=tool_choice,
)
logging.info(f"tool_response: {tool_response}")
messages = [formatted_messages[-1], tool_response.choices[0].message.content]
messages = [formatted_messages[-1], tool_response.choices[0].message]
tool_calls = tool_response.choices[0].message.tool_calls
if tool_calls:
for tool_call in tool_calls:
Expand All @@ -77,8 +77,7 @@ def predict(self,
"content": func_result,
}
)
logging.debug(messages)
logging.info(conversation.history)
logging.info(f'messages: {messages}')
agent_response = client.chat.completions.create(
model=self.name,
messages=messages,
Expand Down

0 comments on commit c4e6282

Please sign in to comment.