forked from tmc/langchaingo
-
Notifications
You must be signed in to change notification settings - Fork 2
feat: enhance tool calling support and improve agent functionality #7
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
danielmerja
wants to merge
22
commits into
taigrr:main
Choose a base branch
from
danielmerja:feat/enhance-tool-calling-and-agents
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat: enhance tool calling support and improve agent functionality #7
danielmerja
wants to merge
22
commits into
taigrr:main
from
danielmerja:feat/enhance-tool-calling-and-agents
Conversation
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
- Deleted `debug_transport.go` and `debug_transport_body.go` as they were no longer needed. - Removed `github.com/fatih/color` dependency from `go.mod` and `go.sum`. - Added documentation for the `httputil` package, detailing HTTP transport and client utilities. - Introduced new logging and debugging clients in `httputil/logging_transport.go` for improved request/response handling. - Updated `httputil` to include user-agent management and custom transport options.
- Add comprehensive SerpAPI testing with httprr integration - Improve OpenAI functions agent tool call handling and parsing - Enhance LLM content generation and marshaling for tool calls - Update agent executor with better tool integration - Refactor conversational and MRKL agents for improved functionality - Add tool ID support throughout agent system - Improve error handling and callback management in agents - Update LLM options to support enhanced tool functionality This update significantly improves the tool calling ecosystem and agent capabilities, providing better integration between LLMs, tools, and agents.
- Removed introductory line from `conversational_prefix.txt` to enhance clarity and conciseness. - Ensured consistent formatting in `conversational_format_instructions.txt` by correcting newline handling. These changes improve the readability and maintainability of the prompt files.
- Introduced `main_test.go` for setting up the testing environment for Weaviate. - Updated Weaviate client dependency from v4 to v5 across multiple files. - Added new options for HTTP client configuration in `options.go`. - Enhanced test cases in `weaviate_test.go` to improve coverage and reliability. - Added various test data files for comprehensive testing of Weaviate functionalities. These changes enhance the testing capabilities and ensure compatibility with the latest Weaviate client version.
- Replaced the use of `maps.Keys` with `slices.AppendSeq` for better performance and clarity in `newInvalidTemplateError`. - Updated import statements to remove the deprecated `golang.org/x/exp/maps` package. These changes enhance the efficiency of template error handling and streamline the codebase.
- Changed the iteration method in `marshalStruct` from `range` to a traditional for loop for better clarity and performance. - Simplified the `AgentAction` struct by removing unnecessary field definitions, enhancing readability and maintainability. These changes streamline the code and improve the overall structure of the output parser and schema definitions.
- Introduced a new test file `callbacks_unit_test.go` to cover various scenarios for the `Handler` interface and its implementations, including `SimpleHandler` and `CombiningHandler`. - Implemented tests for all methods of the `Handler` interface to ensure they execute without errors. - Enhanced test coverage for combining handlers with different callback configurations, including nested handlers and mixed types. - Added tests for the `HandlerHaver` interface to verify correct handler retrieval. These changes significantly improve the test coverage and reliability of the callback handling functionality.
- Introduced comprehensive unit tests in `anthropicllm_test.go` to validate the behavior of the `New` function, message processing, and tool handling. - Added error mapping in `errors.go` to standardize error responses from the Anthropic API. - Created tests for the `anthropicclient` package, covering completion and message creation functionalities. - Updated the HTTP client to use `httputil.DefaultClient` for improved request handling. These changes enhance the reliability and coverage of the Anthropic LLM implementation, ensuring robust error handling and functionality validation.
- Introduced comprehensive unit tests in `embeddings_unit_test.go` to validate the behavior of embedding creation, including handling of various input scenarios and error cases. - Added error mapping in `errors.go` to standardize error responses from the Google AI API. - Created tests for the `googleai` package, covering content validation and embedding output structure. - Updated the default model in `option.go` to `gemini-2.0-flash` for improved performance. These changes enhance the reliability and coverage of the Google AI embeddings implementation, ensuring robust error handling and functionality validation.
…y handling
- Changed variable type from `any` to `interface{}` in `sqlite3_history.go` for better type safety and clarity.
- Adjusted the test function in `sqlite3_history_test.go` to ensure parallel execution is correctly set up.
These changes enhance the readability and maintainability of the SQLite chat message history implementation.
- Updated LLM test files to utilize the httprr package for improved HTTP client handling during tests.
- Replaced direct environment variable checks with a helper function to skip tests if credentials are missing.
- Ensured parallel execution of tests only when not recording to avoid rate limits.
- Changed variable types from `any` to `interface{}` for better type safety in relevant areas.
These changes improve the reliability and maintainability of the LLM testing framework, ensuring better error handling and clearer test execution flow.
- Updated various chain test files to utilize the httprr package for improved HTTP client handling during tests.
- Replaced direct environment variable checks with a helper function to skip tests if credentials are missing.
- Ensured parallel execution of tests only when not recording to avoid rate limits.
- Changed variable types from `any` to `interface{}` for better type safety in relevant areas.
- Introduced context handling in test functions for consistency and clarity.
These changes improve the reliability and maintainability of the chain testing framework, ensuring better error handling and clearer test execution flow.
…nal chain - Updated dependencies in `go.mod` to the latest versions for improved functionality and security. - Refactored test functions in `constitutional_test.go` to utilize the `httprr` package for better HTTP client handling. - Introduced context handling and improved error handling in test cases to ensure reliability during execution. - Added new test data files for comprehensive testing of constitutional chain functionalities. These changes enhance the maintainability and reliability of the testing framework while ensuring compatibility with updated dependencies.
- Deleted the `main.go` file from the `rrtool` package, streamlining the codebase. - Introduced comprehensive unit tests for the `setutil` package, covering functions like `ToSet`, `Difference`, and `Intersection` to ensure correctness and reliability. - Enhanced test structure in `sliceutil` tests for better clarity and organization. These changes improve the maintainability of the codebase and ensure robust testing for utility functions.
- Introduced integration tests for the `DownloadImageData` function in `download_test.go`, covering various scenarios including successful downloads for PNG and JPEG images, handling of invalid URLs, and responses with non-image content types. - Added unit tests in `download_unit_test.go` to validate the behavior of `DownloadImageData` with mocked HTTP responses, ensuring correct MIME type handling and error reporting. - Refactored the `DownloadImageData` function to utilize `httputil.DefaultClient` for improved HTTP request handling. These changes enhance the reliability and coverage of the image downloading functionality, ensuring robust error handling and validation of different response scenarios.
- Introduced a new test file `main_test.go` for MySQL, implementing a `TestMain` function to ensure the test environment is set up correctly. - Updated `sqlite3_test.go` to utilize a context variable for database operations, enhancing consistency in test execution. - Added a new test file `options_test.go` for AlloyDB and Cloud SQL, covering various client options and ensuring proper configuration handling. - Enhanced `engine_test.go` for both AlloyDB and Cloud SQL to use context variables, improving error handling and test reliability. These changes improve the test coverage and reliability of database functionalities, ensuring robust error handling and environment setup.
- Introduced a new DuckDuckGo tool with customizable HTTP client support through the `WithHTTPClient` option. - Enhanced the `New` function to accept options for better flexibility in tool initialization. - Added unit tests in `ddg_test.go` to validate the tool's search functionality and basic construction, ensuring reliable behavior and meaningful results. These changes improve the functionality and test coverage of the DuckDuckGo tool, enhancing its usability and reliability.
- Introduced a comprehensive GitHub toolkit for managing issues, pull requests, and files, enhancing interaction with GitHub repositories. - Added document loaders for fetching issues and files from GitHub, facilitating content retrieval for NLP tasks. - Implemented unit tests for the GitHub toolkit and document loaders, ensuring functionality and reliability. - Updated dependencies in `go.mod` to include `github.com/google/go-github/v74` for improved API interactions. These changes enhance the functionality and test coverage of the GitHub integration, providing robust tools for developers.
- Added defensive checks in the ParseOutput method to handle nil responses and empty choices, preventing potential panics. - Refactored the handling of tool calls and legacy function calls to iterate through all choices, ensuring all actions are captured. - Improved logging and output accumulation for better clarity in responses. These changes enhance the robustness and reliability of the OpenAIFunctionsAgent's output parsing functionality.
- Introduced new Amazon Nova models (Micro, Lite, Pro) with detailed descriptions and usage. - Implemented `createNovaCompletion` function for handling requests to Nova models, including input processing for text and image content. - Added unit tests for Nova model interactions and error handling, ensuring robust functionality. - Enhanced existing tests to utilize the new Nova model capabilities, improving overall test coverage. These changes expand the functionality of the Bedrock LLM implementation, providing support for the latest Amazon Nova models and ensuring reliable performance through comprehensive testing.
- Introduced a new `debug_transport.go` file that implements a custom HTTP transport for logging requests and responses. - The `logTransport` type allows for redacting specified headers during logging to protect sensitive information. - Utilizes `httputil.DumpRequestOut` and `httputil.DumpResponse` for detailed output of HTTP interactions. These changes enhance the debugging capabilities of HTTP clients by providing a way to log full request and response details while ensuring sensitive data is not exposed.
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.
Breaking Changes
feat: enhance tool calling support and improve agent functionality
This update significantly improves the tool calling ecosystem and agent
capabilities, providing better integration between LLMs, tools, and agents.