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: add conversation streaming #8

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

tharropoulos
Copy link
Contributor

Change Summary

This pull request includes significant changes to the dataset/indexInTypesense.ts, src/components, and src/lib/actions.ts files to streamline the data collection, conversation handling, and form submission processes. The most important changes include the consolidation of collection creation, the introduction of streaming client handling, and updates to the Form component.

Key Changes:

Data Collection and Indexing:

  • Consolidated the creation of the conversation_store collection within the createDataCollection function, removing the redundant createConversationHistoryCollection function. [1] [2]
  • Updated the typesense package version in package.json to ^2.1.0-2.

Conversation Handling:

  • Added a streaming client for handling conversation data in EmptyChat and Form components, improving the handling of conversation streams and error management. [1] [2] [3] [4]

Form Component:

  • Removed the onRequest prop from the Form component and integrated the conversation handling logic directly within the component, simplifying the form submission process.

Context and State Management:

  • Exported ConversationContext from ConversationContext.tsx to allow its use in other components, ensuring consistent state management across the application.

Utility Functions:

  • Updated the hitsToSources function in actions.ts to handle optional hits and return a promise, enhancing the flexibility and reliability of source extraction.

PR Checklist

Copy link

vercel bot commented Mar 28, 2025

@tharropoulos is attempting to deploy a commit to the Typesense Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

vercel bot commented Apr 2, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
showcase-conversational-search-pg-essays ❌ Failed (Inspect) Apr 2, 2025 4:50pm

Copy link
Member

@jasonbosco jasonbosco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tharropoulos The deployment is failing with a build error. Could you take a look?

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.

3 participants