Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/libs/Cohere/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ paths:
- code: "import cohere\n\nco = cohere.Client()\n\n# tool descriptions that the model has access to\ntools = [\n {\n \"name\": \"query_daily_sales_report\",\n \"description\": \"Connects to a database to retrieve overall sales volumes and sales information for a given day.\",\n \"parameter_definitions\": {\n \"day\": {\n \"description\": \"Retrieves sales data for this day, formatted as YYYY-MM-DD.\",\n \"type\": \"str\",\n \"required\": True,\n }\n },\n },\n {\n \"name\": \"query_product_catalog\",\n \"description\": \"Connects to a a product catalog with information about all the products being sold, including categories, prices, and stock levels.\",\n \"parameter_definitions\": {\n \"category\": {\n \"description\": \"Retrieves product information data for all products in this category.\",\n \"type\": \"str\",\n \"required\": True,\n }\n },\n },\n]\n\n\n# user request\nmessage = \"Can you provide a sales summary for 29th September 2023, and also give me some details about the products in the 'Electronics' category, for example their prices and stock levels?\"\n\nresponse = co.chat(\n message=message,\n tools=tools,\n)\n\nprint(response)\n"
name: Tools
sdk: python
- code: "curl --request POST \\\n --url https://api.cohere.com/v1/chat \\\n --header 'accept: application/json' \\\n --header 'content-type: application/json' \\\n --header \"Authorization: bearer $CO_API_KEY\" \\\n --data '{\n \"message\": \"Can you provide a sales summary for 29th September 2023, and also give me some details about the products in the 'Electronics' category, for example their prices and stock levels?\",\n \"tools\": [\n {\n \"name\": \"query_daily_sales_report\",\n \"description\": \"Connects to a database to retrieve overall sales volumes and sales information for a given day.\",\n \"parameterDefinitions\": {\n \"day\": {\n \"description\": \"Retrieves sales data for this day, formatted as YYYY-MM-DD.\",\n \"type\": \"str\",\n \"required\": true\n }\n }\n },\n {\n \"name\": \"query_product_catalog\",\n \"description\": \"Connects to a a product catalog with information about all the products being sold, including categories, prices, and stock levels.\",\n \"parameterDefinitions\": {\n \"category\": {\n \"description\": \"Retrieves product information data for all products in this category.\",\n \"type\": \"str\",\n \"required\": true\n }\n }\n }\n ]\n }'\n"
- code: "curl --request POST \\\n --url https://api.cohere.com/v1/chat \\\n --header 'accept: application/json' \\\n --header 'content-type: application/json' \\\n --header \"Authorization: bearer $CO_API_KEY\" \\\n --data '{\n \"message\": \"Can you provide a sales summary for 29th September 2023, and also give me some details about the products in the 'Electronics' category, for example their prices and stock levels?\",\n \"tools\": [\n {\n \"name\": \"query_daily_sales_report\",\n \"description\": \"Connects to a database to retrieve overall sales volumes and sales information for a given day.\",\n \"parameter_definitions\": {\n \"day\": {\n \"description\": \"Retrieves sales data for this day, formatted as YYYY-MM-DD.\",\n \"type\": \"str\",\n \"required\": true\n }\n }\n },\n {\n \"name\": \"query_product_catalog\",\n \"description\": \"Connects to a a product catalog with information about all the products being sold, including categories, prices, and stock levels.\",\n \"parameter_definitions\": {\n \"category\": {\n \"description\": \"Retrieves product information data for all products in this category.\",\n \"type\": \"str\",\n \"required\": true\n }\n }\n }\n ]\n }'\n"
name: Tools
sdk: curl
request:
Expand Down
Loading