-
Notifications
You must be signed in to change notification settings - Fork 127
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
refactor: use goroutinue instead of mutex to sync messages #842
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #842 +/- ##
===========================================
+ Coverage 64.93% 78.73% +13.79%
===========================================
Files 45 47 +2
Lines 2658 2718 +60
===========================================
+ Hits 1726 2140 +414
+ Misses 820 427 -393
- Partials 112 151 +39 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work 🎆
And I think we'd better improve the comments for code, cause this is way complicated.
Description
The HTTP server startup creates a
CallerProvider
struct, which provides aProvide(credential string)
method that returns aCaller
.The
Caller
andprovider
work together to provide invoke and chat completion functionality.The
Caller
has aCallerSyncer
attribute, which is responsible for synchronizing pub/sub information to the req/res.Impact
The register no longer requires the Factor method, which ensures the correct execution of yomo test-prompt.
On the server-side, it is guaranteed that
llm-sfn
can only have one return, and if there are multiple returns, the first one will be used. If there is no return, the client will be notified of a timeout.Test
Provide a mock
provider
which can record the requests to OpenAI and mock the responses from OpenAI.Provide a
mockDataFlow
which is used to mock the data flow in Yomo, from the source -> handler -> reducer.