-
-
Notifications
You must be signed in to change notification settings - Fork 639
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
prompts: FewShotPrompt implementation #199
Conversation
prompts/few_shot.go
Outdated
} | ||
|
||
// FewShotCallOptions contains optional fields for FewShotPrompt. | ||
type FewShotCallOptions struct { |
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.
if we're putting multiple fields in here then the options argument to New shouldn't be variadic
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 wanted to let developers not provide any option instead of passing an empty CallOption instance. I guess we have the same with the llms.options.
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 don't think having options to the constructor is necessary for this.
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.
What about default values?
ExampleSeparator: "\n\n",
TemplateFormat: TemplateFormatGoTemplate,
ValidateTemplate: true,
these are their default values. I can set their type as a pointer to let developers set nil and I set their default. I want them to be able to use default values without explicitly setting them. Thoughts?
@FluffyKebab |
prompts/few_shot.go
Outdated
} | ||
|
||
// FewShotCallOptions contains optional fields for FewShotPrompt. | ||
type FewShotCallOptions struct { |
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 don't think having options to the constructor is necessary for this.
@FluffyKebab @tmc |
Description
Added FewShotPrompt. Fixes #196.
Python source
PR Checklist
memory: add interfaces for X, Y
orutil: add whizzbang helpers
).Fixes #123
).golangci-lint
checks.