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

Implement assistant API streaming #266

Open
mme opened this issue Mar 14, 2024 · 15 comments
Open

Implement assistant API streaming #266

mme opened this issue Mar 14, 2024 · 15 comments
Assignees
Labels
💎 Bounty feature request New feature or request good first issue Good for newcomers

Comments

@mme
Copy link
Collaborator

mme commented Mar 14, 2024

Is your feature request related to a problem? Please describe.
OpenAI just launched streaming support in the assistant API. CopilotKit should support streaming responses via the assistant API.

Describe the solution you'd like
Modify https://github.com/CopilotKit/CopilotKit/blob/main/CopilotKit/packages/backend/src/lib/openai-assistant-adapter.ts to use streaming. See: https://platform.openai.com/docs/assistants/overview?context=with-streaming

@mme mme added feature request New feature or request good first issue Good for newcomers labels Mar 14, 2024
@CopilotKit
Copy link
Owner

/bounty $15

@algora-pbc
Copy link

algora-pbc commented Mar 14, 2024

💎 $15 bounty • CopilotKit

Steps to solve:

  1. Start working: Comment /attempt #266 with your implementation plan
  2. Submit work: Create a pull request including /claim #266 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

Thank you for contributing to CopilotKit/CopilotKit!

Add a bountyShare on socials

Attempt Started (GMT+0) Solution
🟢 @pi600 Mar 14, 2024, 12:01:11 PM WIP
🔴 @chintanpuggalok Apr 5, 2024, 6:53:07 PM WIP
🟢 @abhijitxy May 3, 2024, 7:24:56 AM WIP
🔴 @hrshkshri May 8, 2024, 6:26:59 AM WIP
🟢 @amaanlari May 8, 2024, 8:50:32 PM WIP

@Bhavyajain21
Copy link

Can I be assigned?

@pi600
Copy link

pi600 commented Mar 14, 2024

/attempt #266

@ataibarkai
Copy link
Collaborator

@Bhavyajain21 yes.

@Bhavyajain21
Copy link

Please assign

@ataibarkai
Copy link
Collaborator

@Bhavyajain21 it's assigned

@Bhavyajain21
Copy link

@ataibarkai Thanks for assigning

@Bhavyajain21
Copy link

Bhavyajain21 commented Mar 14, 2024

@mme / @ataibarkai
The provided code under (https://github.com/CopilotKit/CopilotKit/blob/main/CopilotKit/packages/backend/src/lib/openai-assistant-adapter.ts) already utilizes streaming to communicate with the OpenAI API for assistant interactions.

The provided documentation mentions streaming support but doesn't go into specific implementation details. It emphasizes the ability to continue conversations through threads, which aligns with the current code's approach.

Is there anything different we are expecting out of it?

@mme
Copy link
Collaborator Author

mme commented Mar 14, 2024

Hi @Bhavyajain21 ! According to the OpenAI docs, there should be a new method available called createAndStream. Can you have a look at this method? You would need to update the openai package to the lastest version.

@Bhavyajain21
Copy link

Got that, thanks for the input!

@chintanpuggalok
Copy link

chintanpuggalok commented Apr 5, 2024

/attempt #266

1 similar comment
@abhijitxy
Copy link

abhijitxy commented May 3, 2024

/attempt #266

@hrshkshri
Copy link

hrshkshri commented May 8, 2024

/attempt #266

1 similar comment
@amaanlari
Copy link

amaanlari commented May 8, 2024

/attempt #266

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💎 Bounty feature request New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants