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 tool call ID in message object #361

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gurvinder-dhillon
Copy link

@gurvinder-dhillon gurvinder-dhillon commented Nov 1, 2024

Fixes #325

Add tool_call_id attribute to Message class and update methods to handle it.

  • Add tool_call_id attribute to Message class in src/ell/types/message.py.
  • Update __init__ method in Message class to accept tool_call_id parameter.
  • Update model_validate method in Message class to handle tool_call_id.
  • Update translate_to_provider method in src/ell/providers/openai.py to add tool_call_id to Message object.
  • Update translate_from_provider method in src/ell/providers/openai.py to process tool_call_id in Message object.

For more details, open the Copilot Workspace session.

Fixes MadcowD#325

Add `tool_call_id` attribute to `Message` class and update methods to handle it.

* Add `tool_call_id` attribute to `Message` class in `src/ell/types/message.py`.
* Update `__init__` method in `Message` class to accept `tool_call_id` parameter.
* Update `model_validate` method in `Message` class to handle `tool_call_id`.
* Update `translate_to_provider` method in `src/ell/providers/openai.py` to add `tool_call_id` to `Message` object.
* Update `translate_from_provider` method in `src/ell/providers/openai.py` to process `tool_call_id` in `Message` object.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/MadcowD/ell/issues/325?shareId=XXXX-XXXX-XXXX-XXXX).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Message object does not have tool_call_id which is required when we add tool call message to history
1 participant