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: examples: refactor agent_store method to use Document instead of Attachment #179

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

Conversation

EmilienM
Copy link

@EmilienM EmilienM commented Feb 19, 2025

What does this PR do?

This change updates the chat method in AgentStore to use Document instead of Attachment when handling file inputs.

  • Removed the unused Attachment import.
  • Renamed the attachments parameter to documents for clarity.
  • Updated the logic to convert file inputs into Document instances instead of Attachment.
  • Ensured proper handling of mime_type, currently hardcoded as text/plain.

This refactor aligns with API expectations and improves consistency in document handling.

Related change: https://github.com/meta-llama/llama-stack-client-python/pull/73/files#diff-b38e3fcdf146b8d15b63f07ee0a4b6f0080d202da0381373bac8e8edf289f5c1L71

Closes #178

… Attachment

This change updates the `chat` method in `AgentStore` to use `Document` instead of `Attachment` when handling file inputs.

- Removed the unused `Attachment` import.
- Renamed the `attachments` parameter to `documents` for clarity.
- Updated the logic to convert file inputs into `Document` instances instead of `Attachment`.
- Ensured proper handling of `mime_type`, currently hardcoded as `text/plain`.

This refactor aligns with API expectations and improves consistency in document handling.
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

llama-stack-client doesn't have Attachment object in types
2 participants