-
-
Notifications
You must be signed in to change notification settings - Fork 687
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
Feature/llm multi prompt #1070
base: main
Are you sure you want to change the base?
Feature/llm multi prompt #1070
Conversation
2492913
to
33faf24
Compare
Fix linter errors FIx linter comment Added backwards compatibility
33faf24
to
8724ddd
Compare
} | ||
|
||
return chain | ||
} | ||
|
||
func (c *LLMChain) EnableMultiPrompt() { |
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.
Maybe this should can be adjusted using a ChainCallOption?
const _llmChainDefaultOutputKey = "text" | ||
const ( | ||
_llmChainDefaultOutputKey = "text" | ||
_llmChainMultiPromptOutputKey = "choices" |
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.
Is it necessary to change the output key of the chain by default when using multipromt?
if err != nil { | ||
return nil, fmt.Errorf("llm generate content: %w", err) | ||
} | ||
|
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.
It should be documented somewhere that output parsers does not work with multiprompt.
This PR introduces support for multi-prompt calls in llms, while maintaining backward compatibility with the LLMChain implementation for the call function. That said we believe the default of
LLMChain.Call
behaviour should not flatten prompts into a single message.Key Features
Backward Compatibility
No breaking changes have been introduced. Tracing is optional and does not affect existing functionality when disabled.
PR Checklist
memory: add interfaces for X, Y
orutil: add whizzbang helpers
).Fixes #123
).golangci-lint
checks.