-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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: Assistants streaming #737
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #737 +/- ##
==========================================
- Coverage 98.46% 98.24% -0.22%
==========================================
Files 24 26 +2
Lines 1364 1478 +114
==========================================
+ Hits 1343 1452 +109
+ Misses 15 14 -1
- Partials 6 12 +6 ☔ View full report in Codecov by Sentry. |
|
There's an API for inserting message in a thread. Example below: _, err = a.client.CreateMessage(ctx, threadId, openai.MessageRequest{
Role: openai.ChatMessageRoleUser,
Content: messageText,
})
if err != nil {
logger.Error("failed to create message", zap.Error(err))
return err
}
outStream, err = a.client.CreateRunStreaming(ctx, threadId, openai.RunRequest{
AssistantID: assistantId,
}) |
thanks very much |
合并进去了吗?现在很需要这个 |
Hi Sasha, What is needed to get this one through review ? I believe it's the most straightforward of the streaming implementations and will give a good base for further development. Can confirm that has been extensively ran with production workloads for a while by us. |
i have use office openai sdk https://github.com/openai/openai-go/blob/main/api.md |
Supersedes #731
Based on the original fork of @tanzyy96 just brought up to date.
We've been running this for a couple of weeks and has served us well.
Example usage: