Skip to content

Commit

Permalink
Merge branch 'main' into chdeskur/add-hidden-page
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-support authored Aug 20, 2024
2 parents fbccd3b + 0f205ff commit 73728d9
Show file tree
Hide file tree
Showing 12 changed files with 239 additions and 18 deletions.
109 changes: 105 additions & 4 deletions cohere-openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ paths:

asyncio.run(main())
- sdk: curl
name: cURL
name: Default
code: >-
curl --request POST \
--url https://api.cohere.com/v1/chat \
Expand All @@ -328,11 +328,21 @@ paths:
--header "Authorization: bearer $CO_API_KEY" \
--data '{
"chat_history": [
{"role": "USER", "message": "Who discovered gravity?"},
{"role": "CHATBOT", "message": "The man who is widely credited with discovering gravity is Sir Isaac Newton"}
{
"role": "USER",
"message": "Who discovered gravity?"
},
{
"role": "CHATBOT",
"message": "The man who is widely credited with discovering gravity is Sir Isaac Newton"
}
],
"message": "What year was he born?",
"connectors": [{"id": "web-search"}]
"connectors": [
{
"id": "web-search"
}
]
}'
- code-samples:
- sdk: go
Expand Down Expand Up @@ -636,6 +646,35 @@ paths:
])

print(response)
- sdk: curl
name: Documents
code: >-
curl --request POST \
--url https://api.cohere.com/v1/chat \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header "Authorization: bearer $CO_API_KEY" \
--data '{
"message": "Who is more popular: Nsync or Backstreet Boys?",
"documents": [
{
"title": "CSPC: Backstreet Boys Popularity Analysis - ChartMasters",
"snippet": "↓ Skip to Main Content\\n\\nMusic industry – One step closer to being accurate\\n\\nCSPC: Backstreet Boys Popularity Analysis\\n\\nHernán Lopez Posted on February 9, 2017 Posted in CSPC 72 Comments Tagged with Backstreet Boys, Boy band\\n\\nAt one point, Backstreet Boys defined success: massive albums sales across the globe, great singles sales, plenty of chart topping releases, hugely hyped tours and tremendous media coverage.\\n\\nIt is true that they benefited from extraordinarily good market conditions in all markets. After all, the all-time record year for the music business, as far as revenues in billion dollars are concerned, was actually 1999. That is, back when this five men group was at its peak."
},
{
"title": "CSPC: NSYNC Popularity Analysis - ChartMasters",
"snippet": "↓ Skip to Main Content\\n\\nMusic industry – One step closer to being accurate\\n\\nCSPC: NSYNC Popularity Analysis\\n\\nMJD Posted on February 9, 2018 Posted in CSPC 27 Comments Tagged with Boy band, NSync\\n\\nAt the turn of the millennium three teen acts were huge in the US, the Backstreet Boys, Britney Spears and NSYNC. The latter is the only one we haven’t study so far. It took 15 years and Adele to break their record of 2,4 million units sold of No Strings Attached in its first week alone.\\n\\nIt wasn’t a fluke, as the second fastest selling album of the Soundscan era prior 2015, was also theirs since Celebrity debuted with 1,88 million units sold."
},
{
"title": "CSPC: Backstreet Boys Popularity Analysis - ChartMasters",
"snippet": " 1997, 1998, 2000 and 2001 also rank amongst some of the very best years.\\n\\nYet the way many music consumers – especially teenagers and young women’s – embraced their output deserves its own chapter. If Jonas Brothers and more recently One Direction reached a great level of popularity during the past decade, the type of success achieved by Backstreet Boys is in a completely different level as they really dominated the business for a few years all over the world, including in some countries that were traditionally hard to penetrate for Western artists.\\n\\nWe will try to analyze the extent of that hegemony with this new article with final results which will more than surprise many readers."
},
{
"title": "CSPC: NSYNC Popularity Analysis - ChartMasters",
"snippet": " Was the teen group led by Justin Timberlake really that big? Was it only in the US where they found success? Or were they a global phenomenon?\\n\\nAs usual, I’ll be using the Commensurate Sales to Popularity Concept in order to relevantly gauge their results. This concept will not only bring you sales information for all NSYNC‘s albums, physical and download singles, as well as audio and video streaming, but it will also determine their true popularity. If you are not yet familiar with the CSPC method, the next page explains it with a short video. I fully recommend watching the video before getting into the sales figures."
}
]
}'
- code-samples:
- sdk: go
name: Streaming
Expand Down Expand Up @@ -819,6 +858,33 @@ paths:
for event in response:
if event.event_type == "text-generation":
print(event.text, end='')
- sdk: curl
name: Streaming
code: >-
curl --request POST \
--url https://api.cohere.com/v1/chat \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header "Authorization: bearer $CO_API_KEY" \
--data '{
"stream": true,
"chatHistory": [
{
"role": "USER",
"message": "Who discovered gravity?"
},
{
"role": "CHATBOT",
"message": "The man who is widely credited with discovering gravity is Sir Isaac Newton"
}
],
"message": "What year was he born?",
"connectors": [
{
"id": "web-search"
}
]
}'
- code-samples:
- sdk: go
name: Tools
Expand Down Expand Up @@ -1065,6 +1131,41 @@ paths:


print(response)
- sdk: curl
name: Tools
code: >
curl --request POST \
--url https://api.cohere.com/v1/chat \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header "Authorization: bearer $CO_API_KEY" \
--data '{
"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?",
"tools": [
{
"name": "query_daily_sales_report",
"description": "Connects to a database to retrieve overall sales volumes and sales information for a given day.",
"parameterDefinitions": {
"day": {
"description": "Retrieves sales data for this day, formatted as YYYY-MM-DD.",
"type": "str",
"required": true
}
}
},
{
"name": "query_product_catalog",
"description": "Connects to a a product catalog with information about all the products being sold, including categories, prices, and stock levels.",
"parameterDefinitions": {
"category": {
"description": "Retrieves product information data for all products in this category.",
"type": "str",
"required": true
}
}
}
]
}'
description: |
Generates a text response to a user message.
To learn how to use the Chat API with Streaming and RAG follow our [Text Generation guides](https://docs.cohere.com/docs/chat-api).
Expand Down
2 changes: 2 additions & 0 deletions fern/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ redirects:
# fern redirect rules
- source: "/docs/llmu{/:path}*"
destination: "/docs/llmu-2"
- source: "/docs/llmu"
destination: "/docs/llmu-2"
- source: "/docs/multi-hop-tool-use"
destination: "/docs/multi-step-tool-use"
- source: "/docs/command"
Expand Down
4 changes: 2 additions & 2 deletions fern/pages/cookbooks/embed-jobs-serverless-pinecone.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ cohere.Dataset {
validation_status: validated
created_at: 2024-01-13 02:47:32.563080
updated_at: 2024-01-13 02:47:32.563081
download_urls: ['https://storage.googleapis.com/cohere-user/dataset-api-temp/d489c39a-e152-49da-9ddc-9801bd74d823/96d12a16-2dd4-46f7-9630-1fa9bb0b26ca/sample-file-2gwgxq/000_embed_jobs_sample_data.avro?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=dataset%40cohere-production.iam.gserviceaccount.com%2F20240113%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20240113T024743Z&X-Goog-Expires=14399&X-Goog-Signature=1cc013824d54e4974600e19ec5c5dd6624c3de0c512f1c7d204fa95056b09e19d90c0fe034c59f0eef8bdfd4e1ed03b44c601d290e9b9c9e0643afd7a44fe97c42750304a8f199c9d87abb50fc74d777ab2d36efecca64ad97264f9e0628f2e199b9eb2d505241480a7436191cacaa78efb328567c9303469b653962caf07e6b11fac06ed06bd4597377e87fac58214bab1cd5cde63e19508d903e65ad654a177e27a64105b79c56d0cc156a35b61d45a7dda3b9819ef78dc9861c818b808527a1e16210dc83130be630f1b54c75d280ea20d070566056a6b2c7b1a016409482defc2a1942a801e46f5349adfadb244711da80d103ed831d6927366adc0c1659&X-Goog-SignedHeaders=host']
download_urls: ['']
validation_error: None
validation_warnings: []
}
Expand Down Expand Up @@ -99,7 +99,7 @@ cohere.EmbedJob {
validation_status: validated
created_at: 2024-01-13 02:47:47.850097
updated_at: 2024-01-13 02:47:47.850097
download_urls: ['https://storage.googleapis.com/cohere-user/dataset-api-temp/d489c39a-e152-49da-9ddc-9801bd74d823/96d12a16-2dd4-46f7-9630-1fa9bb0b26ca/embeded-sample-file-mdse2h/001_embeded-sample-file.avro?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=dataset%40cohere-production.iam.gserviceaccount.com%2F20240113%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20240113T024807Z&X-Goog-Expires=14399&X-Goog-Signature=78b0d82e19388aee2926a4ef403d5f286487d0e7fc9a09c75bfb6700b502fa4f55b024977c0aeae26cd501a41e506bf00d3e850d7d9691298963374f04fa129e8dae5a327389c80921bf611a25386f5e4501b11c9d88bc1aee6f6877157a4675c5f8fe06bb25e3ca2b12da46e5b1da3067ca71bed901cd14db26e09987e355c039f96d6514a0931aa5f8753ddc155ca1782c63e3cb000b095d3b29904982ff75686c716329e92b6946485c567dabc3e344c9a0f9a59416415738b67ead0cca3cdb06c1db64c925ea38a2d92ab4079577e5775367260c09916aab5af67326bca4fa1295ee76457f933a6ca26a5d4ac9c59f0f73286627b2bae3e7fa7375c97465&X-Goog-SignedHeaders=host']
download_urls: ['']
validation_error: None
validation_warnings: []
}
Expand Down
4 changes: 2 additions & 2 deletions fern/pages/cookbooks/embed-jobs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ cohere.Dataset {
validation_status: validated
created_at: 2024-01-13 02:51:48.215973
updated_at: 2024-01-13 02:51:48.215973
download_urls: ['https://storage.googleapis.com/cohere-user/dataset-api-temp/d489c39a-e152-49da-9ddc-9801bd74d823/f8bd5ab1-ccdf-45e6-9717-23b8be1ff39d/sample-file-hca4x0/000_embed_jobs_sample_data.avro?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=dataset%40cohere-production.iam.gserviceaccount.com%2F20240113%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20240113T025159Z&X-Goog-Expires=14399&X-Goog-Signature=7f9ed7cb27988e4bf447167160b25940cd106859d1282919604a0d74b882681b5aaa3245f97555bb61ddca7fd9c02fb0bba8391433c70aeb2118607dfd534db444097c5ae9c8d07e66bf6723a64634f5d6f5b2500c82e351807203f5fd3c278b2584c258b4c6afc6ee191e63bcd346e3dd2c7fd4b171c2d3ddfe8e6e68c2522111b6f63e125a052be9ebe3302903f4bef9cd165c8e075b168e621c7c61177a0973bb470cc3535457078e18b338884fb303792a1ba3161ab5ca5ce2adca5676754ee1a735891ccbf64cca03d3fdcabdcccd0d201600b8c70e13487bf897f2b88424cc736f8bf8756ec835b09dacf0aa20dc8151d9249b21d4ca4de82144fcd8be&X-Goog-SignedHeaders=host']
download_urls: ['']
validation_error: None
validation_warnings: []
}
Expand Down Expand Up @@ -91,7 +91,7 @@ cohere.EmbedJob {
validation_status: validated
created_at: 2024-01-13 02:53:33.569362
updated_at: 2024-01-13 02:53:33.569362
download_urls: ['https://storage.googleapis.com/cohere-user/dataset-api-temp/d489c39a-e152-49da-9ddc-9801bd74d823/f8bd5ab1-ccdf-45e6-9717-23b8be1ff39d/embeded-sample-file-drtjf9/001_embeded-sample-file.avro?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=dataset%40cohere-production.iam.gserviceaccount.com%2F20240113%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20240113T025352Z&X-Goog-Expires=14399&X-Goog-Signature=927d2d73947058c95cd73f813e87e81416163dd0ccba1d5ce064a186fdc732550a605ff2122c9087fcc8e16dded9836084be532dac59622f73cb625fa1014fa9b1f9b702ca02be50006d8e2b2239870e3c765f7f8bd4964ccc74f4d9cc28672cd22c0d47008b112bd787eaab19692a5d9d724899f6aac088facdbe6d3b9d74f929fa07e76126656a5b0635a9793d9e85e692ca2d1d40f406869a53aa2e7390570d67e602fc5ea1741686176ce857112d5d68dee1b2fc62a436cd244890ec7c5901941cb10b01c2c41d6eba67dc393370a7c47526a7272f1f70f880b5fea2f69cb4546a633440a538fad7b92fdeb28d98aec1680cafc89142053da915268ea039&X-Goog-SignedHeaders=host']
download_urls: ['']
validation_error: None
validation_warnings: []
}
Expand Down
1 change: 1 addition & 0 deletions fern/v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,7 @@ navigation:
hidden: true
path: pages/command-line-interface/command.mdx
- api: Cohere API
paginated: true
api-name: v1
audiences:
- public
Expand Down
14 changes: 10 additions & 4 deletions scripts/cookbooks-json/embed-jobs-serverless-pinecone.json

Large diffs are not rendered by default.

Loading

0 comments on commit 73728d9

Please sign in to comment.