-
Notifications
You must be signed in to change notification settings - Fork 16
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
Use the connect protocol to generate unary AI completions #1559
Conversation
@sourishkrout this is ready for review. |
Sounds good. Feel free to add me as one of the reviewers. A Slack bot reminds me twice a day about pending reviews. |
tests/extension/extension.test.ts
Outdated
@@ -74,6 +74,8 @@ vi.mock('../../src/extension/grpc/runner/v1', () => ({})) | |||
test('initializes all providers', async () => { | |||
const configValues = { | |||
binaryPath: 'bin', | |||
// This is needed for the AIManager to initialize. | |||
'runme.aiBaseURL': 'http://localhost:8080/api', |
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.
I'd suggest using a different port, 8080
, which is over-used. Fine inside container images, but running locally, there's a high likelihood another process bound the port locally.
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.
Good Idea. I changed the default to 8877.
WDYT?
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.
Good choice, @jlewi!
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.
✅ LGTM
Quality Gate passedIssues Measures |
This PR switches from using gRPC and the timostamm client to using the connect client for unary completions. This makes the code consistent with what we are doing for the streaming completions with ghost cells.
The service definition is also published is part of Foyle's protos in the buf schema registry https://buf.build/jlewi/foyle/commits/commit/b69cd71876b144ca900524437d722a84 so we can remove the AI service defined in the runme buf package (https://github.com/stateful/runme/tree/main/pkg/api/proto/runme/ai) after this change is released.
The benefit of this change for users is that we can have a single configuration option AI Base URL for configuring the AIService. This will be used for all AI calls (unary or streaming). We can then remove the option FoyleAddress.
This will also allow us to simplify the Foyle server since we will be able to stop running gRPC and gRPC gateway. see Server Cleanup: Remove GRPC and GRPC Gateway jlewi/foyle#173