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

feat(solidjs): add experimental attachments support in useChat hook #4587

Closed
wants to merge 4 commits into from

Conversation

Jaikant
Copy link
Contributor

@Jaikant Jaikant commented Jan 29, 2025

Added experimental attachments support to SolidJS useChat hook by:

Mirroring React implementation's by:
Implementing prepareAttachmentsForRequest in:

  • append() method
  • handleSubmit() handler

Adding experimental_attachments to:

  • Message object construction

Ensures feature parity with React implementation while maintaining SolidJS reactivity patterns.

@Jaikant
Copy link
Contributor Author

Jaikant commented Jan 29, 2025

Fixes #4565

@lgrammel
Copy link
Collaborator

Can you run prettier, add examples, add tests (see examples & tests in the React version for reference)?

@Jaikant
Copy link
Contributor Author

Jaikant commented Jan 29, 2025

Can you run prettier, add examples, add tests (see examples & tests in the React version for reference)?
@lgrammel Can you please check if it is okay now.

@lgrammel
Copy link
Collaborator

@Jaikant did you run and test out the example? the backend part seems missing

@Jaikant
Copy link
Contributor Author

Jaikant commented Jan 30, 2025

@lgrammel yes it works. The same api works for the attachment as well, since it is added as part of the messages array. No other changes needed in the backend.

@lgrammel
Copy link
Collaborator

Great. Please run prettier; update the docs tables (see #4567 for example) and add a changeset (path for ui/solid).

@lgrammel
Copy link
Collaborator

pnpm prettier-fix

@Jaikant
Copy link
Contributor Author

Jaikant commented Jan 30, 2025

Weird because I had run that, maybe I missed something. Let me check my workspace again.

@Jaikant
Copy link
Contributor Author

Jaikant commented Jan 30, 2025

@lgrammel Done. Please check.

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.

2 participants