-
Notifications
You must be signed in to change notification settings - Fork 0
docs: Add more examples how to use this sdk #16
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
Merged
Merged
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
…s for SDK usage Signed-off-by: Eden Reich <eden.reich@gmail.com>
…t SDK examples Signed-off-by: Eden Reich <eden.reich@gmail.com>
…EADME Signed-off-by: Eden Reich <eden.reich@gmail.com>
…Gateway SDK - Created a chat example with package.json, tsconfig.json, and index.ts to demonstrate chat completions and streaming responses. - Added a list example with package.json, tsconfig.json, and index.ts for listing models and MCP tools. - Included README.md files for both chat and list examples with instructions for getting started. - Added .gitignore files to exclude node_modules in both list and MCP examples. Signed-off-by: Eden Reich <eden.reich@gmail.com>
- Created a new directory with sample files for the MCP filesystem server, including `sample.txt`, `data.json`, and `config.yaml`. - Added a README.md file to describe the purpose and usage of the sample data. - Implemented a TypeScript configuration file (`tsconfig.json`) for the MCP example. - Created a package.json and package-lock.json for managing dependencies in the examples directory. - Updated the OpenAPI specification to include new endpoints and improved formatting for consistency. Signed-off-by: Eden Reich <eden.reich@gmail.com>
Signed-off-by: Eden Reich <eden.reich@gmail.com>
…ng the example Signed-off-by: Eden Reich <eden.reich@gmail.com>
…llback - Created a new MCP Web Search Server with a package.json file. - Updated the main MCP package.json to include example scripts for remote and local tools. - Added a .gitignore file in the shared directory to exclude unnecessary files. - Removed outdated README.md, config.yaml, data.json, and sample.txt files from the shared directory. - Introduced a new sample_sales_data.csv file for demonstration purposes. - Enhanced the client.ts to support MCP tool callbacks and improved streaming response processing. Signed-off-by: Eden Reich <eden.reich@gmail.com>
…andling and token tracking - Updated docker-compose.yml to set environment to production and commented out optional Ollama service. - Enhanced example-mcp-tools.ts to use console.info for logging and added model availability checks. - Modified index.ts to implement token tracking for prompt and completion tokens, displaying usage metrics at the end. - Improved filesystem MCP server (index.js) to use console.info for logging and ensure consistent messaging. - Updated web-search MCP server (index-http.js and index.js) to use console.info for logging and improved request handling. - Enhanced InferenceGatewayClient to handle mid-stream errors and added type definitions for stream chunks that may contain errors. Signed-off-by: Eden Reich <eden.reich@gmail.com>
Signed-off-by: Eden Reich <eden.reich@gmail.com>
… and project management tools Signed-off-by: Eden Reich <eden.reich@gmail.com>
…s-sdk Signed-off-by: Eden Reich <eden.reich@gmail.com>
…mmand timeouts - Renamed mcp-context7-server to context7-http-bridge and updated description in package.json. - Updated dependencies: - Changed @modelcontextprotocol/sdk version to ^0.5.0. - Added @upstash/context7-mcp as a dependency. - Updated zod to ^3.22.4. - Changed dev script to use nodemon for development. - Increased timeout for npm command execution from 30 seconds to 5 minutes. - Increased timeout for project creation from 3 minutes to 10 minutes. - Added a clean script to remove shared directories in mcp package.json. - Renamed example:context7 to example:agent in mcp package.json. - Increased default timeout in InferenceGatewayClient to 60 seconds. Signed-off-by: Eden Reich <eden.reich@gmail.com>
…pt for Context7 agent I need to fix in the Inference Gateway or find a solution for DeepSeek 30seconds timeout - it's annoying. Signed-off-by: Eden Reich <eden.reich@gmail.com>
…ion and update system prompt Signed-off-by: Eden Reich <eden.reich@gmail.com>
…n application development - Deleted example-npm.ts and example-tool-demo.ts as they are no longer needed. - Introduced example-vite-agent.ts to facilitate the creation of Vite-based applications. - Updated package.json to reflect the removal of old examples and the addition of the new Vite agent. - Cleaned up filesystem server code by removing unnecessary comments and simplifying allowed directories. - Removed sample_sales_data.csv as it is no longer relevant to the current examples. Signed-off-by: Eden Reich <eden.reich@gmail.com>
- Created a new package.json for the Vite agent with necessary dependencies and scripts. - Added a Docker Compose configuration file to manage multiple agents including Kubernetes, Vite, and Next.js. - Removed the outdated README for MCP servers as part of the restructuring. Signed-off-by: Eden Reich <eden.reich@gmail.com>
…overy Signed-off-by: Eden Reich <eden.reich@gmail.com>
…d rename tool callback to onMCPTool Signed-off-by: Eden Reich <eden.reich@gmail.com>
…etion to MCP filesystem server Signed-off-by: Eden Reich <eden.reich@gmail.com>
Signed-off-by: Eden Reich <eden.reich@gmail.com>
…index.ts' Signed-off-by: Eden Reich <eden.reich@gmail.com>
… Inference Gateway and MCP Server Signed-off-by: Eden Reich <eden.reich@gmail.com>
…rror handling - Introduced a standardized Winston logger for consistent logging across the MCP server. - Added middleware for logging incoming requests and their completion details. - Enhanced error handling in tools, providing structured error responses. - Implemented HTML content extraction using Cheerio, with options for plain text extraction. - Updated the fetch_url tool to log detailed fetch operations and handle various content types. - Improved logging for web search and page title extraction tools. - Added health check endpoint logging. - Updated package dependencies to include Winston for logging. Signed-off-by: Eden Reich <eden.reich@gmail.com>
…options Signed-off-by: Eden Reich <eden.reich@gmail.com>
…r service Still need to figure out why I cannot connect to the other services using the inspector Signed-off-by: Eden Reich <eden.reich@gmail.com>
Signed-off-by: Eden Reich <eden.reich@gmail.com>
Signed-off-by: Eden Reich <eden.reich@gmail.com>
…ilesystem Server Signed-off-by: Eden Reich <eden.reich@gmail.com>
Signed-off-by: Eden Reich <eden.reich@gmail.com>
… model configuration in multiple agents Signed-off-by: Eden Reich <eden.reich@gmail.com>
…_tokens settings Signed-off-by: Eden Reich <eden.reich@gmail.com>
…mory Server Signed-off-by: Eden Reich <eden.reich@gmail.com>
…logging consistency Signed-off-by: Eden Reich <eden.reich@gmail.com>
… optimize request handling Signed-off-by: Eden Reich <eden.reich@gmail.com>
…ry operations - Removed healthcheck from docker-compose.yml for the MCP service. - Introduced MemoryManager class for efficient in-memory storage with background persistence. - Replaced file I/O operations with in-memory methods in index.js for saving, restoring, and managing session data. - Implemented automatic background persistence for dirty sessions in MemoryManager. - Enhanced error handling and logging throughout the memory management process. - Updated server startup and shutdown procedures to integrate MemoryManager lifecycle. Signed-off-by: Eden Reich <eden.reich@gmail.com>
…uration - Created package.json for the MCP Brave Search server with necessary dependencies and scripts. - Added tsconfig.json for TypeScript configuration, specifying compiler options and file inclusion/exclusion. Signed-off-by: Eden Reich <eden.reich@gmail.com>
Signed-off-by: Eden Reich <eden.reich@gmail.com>
Signed-off-by: Eden Reich <eden.reich@gmail.com>
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.
Summary
Add more examples for MCP usage.
Changelog