-
Notifications
You must be signed in to change notification settings - Fork 566
[Go] proposal: revised API #379
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
Conversation
0d8a148 to
6c9aeab
Compare
|
I believe this is complete and correct. Open questions:
|
|
A vector DB plugin is useless if you don't have both an indexer and a retriever, so I would vote for defining them together. Maybe |
|
I imagine that it would be common in larger setups to have one process doing the indexing, in the background as it were, while the frontend retrieves. Much like pkgsite or indeed Google Search. |
|
Fair enough. |
|
@pavelgj Can you comment? I believe this is the design we discussed over VC. I want to make sure you're OK with it before proceeding. |
In this API, configuration (defining actions) should still happen
at the beginning of the program, but can be done incrementally by
calling functions on a plugin. For example:
err := googleai.Init(...) // creates state common to all actions
m1 := googleai.DefineModel("gemini-1.0-pro")
e1 := googleai.DefineEmbedder("emb-01")
When everything has been configured, the program must call genkit.Init.
This has two effects:
- Attempts to register additional actions will fail.
- Servers are started.
This API combines the convenience and clarity of building and storing
actions individually with the requirement that everything that the
program needs is registered early.
In this API, configuration (defining actions) should still happen
at the beginning of the program, but can be done incrementally by
calling functions on a plugin. For example:
When everything has been configured, the program must call genkit.Init.
This has two effects:
This API combines the convenience and clarity of building and storing
actions individually with the requirement that everything that the
program needs is registered early.
DO NOT SUBMIT. Implementation is incomplete. For discussion only.