Commit Graph

20 Commits

Author SHA1 Message Date
Dmitry Ng aa2dd71269 Merge branch 'main' into release/v0.1.14-update.1 2026-01-24 02:07:00 +03:00
Travis Cline db2a947ba4 agents: fix ChainCallOption silent failure (#1420)
* llms/openai: sanitize HTTP errors to prevent API key exposure (#1393)

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

* agents: fix ChainCallOption silent failure (#1416)

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.
2025-10-19 17:03:11 -07:00
Travis Cline dd61fd90f4 test: improve test resilience and update provider APIs (#1377)
test: improve test resilience with better HTTP recording handling

Add hasExistingRecording helper to detect available recordings and skip tests
gracefully when recordings are unavailable. Replace generic credential checks
with specific recording validation and provide clear error messages.
2025-08-22 18:13:13 +02:00
Dmitry Ng 02e034d152 Merge branch 'main-pull-requests' into main-vxcontrol 2025-07-11 20:16:52 +03:00
Dmitry Ng 98a49b683c Merge branch 'main' into main-pull-requests 2025-07-11 18:18:41 +03:00
xiazemin c2f9ad7f34 agents: Add more robust response handling to executor.go (#1316)
* agents: fix handling of observation suffix in tool inputs

Add test coverage to ensure the executor properly trims nObservation:
suffix from tool inputs before passing them to tools. This prevents
tools from receiving malformed input that includes the observation
marker.

- Add TestExecutorTrimsObservationSuffix to verify trimming behavior
- Add test case in MRKL output parser for action inputs with observation suffix
- Add tools field to testAgent to support tool testing

---------

Co-authored-by: Travis Cline <travis.cline@gmail.com>
2025-06-29 01:09:12 +02:00
Dmitry Ng eee90d9059 fix: multiple linter issues and logic in tests 2025-06-23 13:43:06 +03:00
Dmitry Ng 019056baba feat: setup repository for fork 2025-06-22 02:27:21 +03:00
Dmitry Ng fbd4bc67ec fix: open issues in the tests 2025-06-22 01:55:59 +03:00
Travis Cline 77504b877f all: expand test coverage (#1312)
* scripts: cleanup test scripts
* lint: add test pattern and architectural linting
* internal/httprr: expand httprr testing
* test: add comprehensive unit test coverage
* docs: add comprehensive testing guide to CONTRIBUTING.md
* examples: standardize module versions and cleanup dependencies
* all: re-record several httprr recordings
2025-06-16 18:14:02 +02:00
Travis Cline c544fb77bd all: add broad httprr coverage, update dependencies, organize go.mod file, bump to 1.23 (#1299)
* all: add broad httprr coverage, update dependencies, organize go.mod file, bump to 1.23

update go version to 1.23
add lots of test coverage via httprr recordings
update dependencies and organize go.mod
add testutil/testctr which helps work around a testcontainers-go+colima bug
expand the huggingface implementation and tests
expand capabilities of the ollama package
2025-06-04 11:41:45 -07:00
Travis Cline 6c81282073 examples: Fix examples and complete linting upgrade (#1288)
* examples: update examples, clean up module declarations

- Fix and relax lint rules (for now)
- Clean up and fix module declarations
- Add .gitattributes to mark go.sum as binary

* ci: separate and enhance CI workflows

- Split example builds into dedicated workflow
- Add comprehensive test coverage reporting
- Improve CI structure with matrix testing
- Add race condition testing
- Add automated PR coverage comments

* test: improve test reliability and agent message handling

- Simplify MRKL agent test to use basic math calculation
- Update OpenAI functions agent to use ToolChatMessage
- Add proper environment checks for Zep integration tests

* agents: fix issue in tool call handling for openai function agent
2025-06-03 07:52:03 -07:00
Augustinas Malinauskas 7b5d90adbb agents: GetTools added to Agent interface (#831)
* feat: serpapi api key options

* feat: agent tools interface
2024-05-11 19:33:36 -04:00
Dévin.YF 4c0c4f9e19 bug fix: openai_functions_agent not compatible with the new llms.Model interface (#536)
bug fix: openai_functions_agent not compatible with the new llm.Model interface
2024-01-20 06:30:32 -08:00
lujingxuan 135207caa3 fix initialize 2024-01-02 15:02:31 +08:00
lujingxuan 377594f85a format 2023-12-26 18:04:57 +08:00
lujingxuan fbc4ed6c9e format 2023-12-26 17:54:01 +08:00
lujingxuan 9dd6da65e6 add openai functions agent 2023-12-26 17:29:14 +08:00
Aksel 543f504f47 agents: add parser error handler (#345)
* agents: add ParserErrorHandler

* chains: return result when error in chain

* agents: fix lint
2023-12-04 22:38:29 -08:00
FluffyKebab 2cd0d13ccf agents: refactor options 2023-06-07 19:24:38 +02:00