Skip to content

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

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

sahdev77
Copy link
Contributor

@sahdev77 sahdev77 commented May 7, 2025

Addition and handling of custom config for Embedder and Retriever for all the plugins
Bug: #2444
Checklist (if applicable):

Copy link
Collaborator

@apascal07 apascal07 left a 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.

@sahdev77 sahdev77 requested a review from apascal07 June 4, 2025 19:40
@sahdev77 sahdev77 marked this pull request as ready for review June 4, 2025 19:41
}

type EmbedderOptions struct {
ConfigSchema any `json:"configSchema,omitempty"`
Copy link
Collaborator

@apascal07 apascal07 Jun 25, 2025

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.

Copy link
Contributor Author

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.

@apascal07
Copy link
Collaborator

Please re-request review when you are done making changes so this ends up in my inbox.

@sahdev77 sahdev77 dismissed apascal07’s stale review June 27, 2025 11:41

sample app have the usage of config of embedder

@sahdev77 sahdev77 requested a review from apascal07 June 27, 2025 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants