UNPKG

@utcp/sdk

Version:

Universal Tool Calling Protocol (UTCP) client library for TypeScript

15 lines (14 loc) 508 B
/** * UTCP OpenAI Integration Example * * This example demonstrates how to: * 1. Initialize a UTCP client with tool providers from a config file * 2. For each user request, search for relevant tools. * 3. Instruct OpenAI to respond with a JSON for a tool call. * 4. Parse the JSON and execute the tool call using the UTCP client. * 5. Return the results to OpenAI for a final response. * * IMPORTANT: Before running this example, install OpenAI package: * npm install openai dotenv */ export {};