Conversation
- Added `mcps` package with `CreateMCPClients` function to initialize MCP clients. - Updated `PolyLLM` to support MCP server configurations and tools. - Modified `GetProvider` to `preProcess` to handle model tools and MCP server initialization. - Updated `Providers` JSON and Go code to remove unnecessary fields. - Added `WithMCPServerConfig` and `WithProviders` options for `PolyLLM` configuration.
- Updated SSE handling to skip chunks without choices. - Added new function `llmToolToMCPToolRequest` to convert LLM tool calls to MCP tool requests. - Refactored `ChatCompletion` method to introduce `chatCompletion` and `streamingFunc` for better separation of concerns. - Implemented tool invocation logic within `streamingFunc` to handle and return tool responses.
- Introduced `finalToolCalls` to accumulate tool calls across streaming responses. - Modified `streamingFunc` to accept `finalToolCalls` and update it based on new tool calls. - Added logic to handle `FinishReasonToolCalls` to invoke MCP tools and send their results to the user. - Updated `toolCalls` extraction to use `choice.Delta.ToolCalls` directly. - Ensured `finalToolCalls` is reset after invoking MCP tools to prevent repeated usage.
…ients (main) - Updated log message to specify "mcp server" instead of just "server" - Added log message after server initialization to confirm successful setup
- Added comprehensive documentation on configuration, including JSON configuration file and MCP configuration. - Introduced new sections in README for using configuration files and MCP with code examples. - Updated Features section to highlight MCP Support and Configuration File capabilities. - Modified CLI usage examples to include configuration file support. - Renamed `providers.json` to `builtin-llm-providers.json` and refactored provider-related files into the `llms` package. - Added new files for LLM interface and model management: `llm.go`, `llm_models.go`, and others. - Created utility functions for converting between MCP tools and LLM tools. - Refactored project structure to better organize LLM and MCP providers, client implementations, and options. - Enhanced logging with color-coded outputs and structured logging using `slog`. - Introduced configuration loading functionality for initializing PolyLLM with custom settings.
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.
No description provided.