Merged
Conversation
Fix security issue where context deadline errors could expose API keys and sensitive request details in error messages. Added sanitizeHTTPError function to detect context timeouts and network errors, then return generic error messages without exposing sensitive information. Changes: - Added sanitizeHTTPError() function to sanitize HTTP client errors - Updated chat.go to use sanitizeHTTPError() for http.Do() errors - Updated embeddings.go to use sanitizeHTTPError() for http.Do() errors - Added comprehensive test cases to prevent regression
Fix issue where ChainCallOption parameters were silently ignored by Executor.Call() and Agent implementations. Changes: - Updated Agent.Plan() interface signature to accept variadic ChainCallOption parameters - Updated Executor.Call() to accept and propagate options to Agent.Plan() - Updated Executor.doIteration() to propagate options through the chain - Updated OneShotZeroAgent.Plan() to accept and pass options to chains.Predict() - Updated ConversationalAgent.Plan() to accept and pass options to chains.Predict() - Updated OpenAIFunctionsAgent.Plan() to accept and pass options to LLM.GenerateContent() - Exported GetLLMCallOptions() function for option conversion (was getLLMCallOptions) - Updated test mock to match new Agent interface signature Now users can pass LLM configuration options (temperature, max tokens, etc.) through executors to agents.
|
I need this! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1416
Problem
ChainCallOption parameters were being silently ignored in agent.Plan() calls, preventing LLM options like temperature, max_tokens, and streaming functions from being applied.
Solution
Side Effects
chains.WithTemperature(1)not getting set in OpenAI #1250: Temperature now properly applied in OpenAI with agentsTesting