-
Notifications
You must be signed in to change notification settings - Fork 305
feat(go):Support custom configs for all primitives #2883
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
base: main
Are you sure you want to change the base?
Conversation
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.
Can you show usage here? I want to see how you would call Embed()
with custom options for example.
go/ai/embedder.go
Outdated
} | ||
|
||
type EmbedderOptions struct { | ||
ConfigSchema any `json:"configSchema,omitempty"` |
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.
This field is either misnamed or should be a map[string]any
. Schema implies it itself is a schema but based on the code, it seems like we're expecting a value that we then infer the schema of. Probably should just be Config
. Please add a comment explaining what is meant to go into it.
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.
ConfigSchema is to hold the schema for the config in embedder i am not getting when you say it should be map[string]any as it will create problem as we are mapping different config schema directly in each plugin.
Please re-request review when you are done making changes so this ends up in my inbox. |
sample app have the usage of config of embedder
Addition and handling of custom config for Embedder and Retriever for all the plugins
Bug: #2444
Checklist (if applicable):