From b08b073a5cfd38786c9c84e2d7ad96c957d43bdd Mon Sep 17 00:00:00 2001 From: platform-endpoints Date: Sun, 1 Dec 2024 20:53:13 +0000 Subject: [PATCH] Add spec changes Co-authored-by: Michael --- cohere-openapi.yaml | 22 +++++++++---------- snippets/snippets/curl/rerank-post.sh | 2 +- .../java/app/src/main/java/RerankPost.java | 2 +- snippets/snippets/node/rerank-post.ts | 2 +- snippets/snippets/python-async/rerank-post.py | 2 +- snippets/snippets/python/rerank-post.py | 2 +- snippets/snippets/requests/rerank-post.yaml | 2 +- .../snippets/requests/rerank-v2-post.yaml | 2 +- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/cohere-openapi.yaml b/cohere-openapi.yaml index dffe695e..c819fc86 100644 --- a/cohere-openapi.yaml +++ b/cohere-openapi.yaml @@ -16118,7 +16118,7 @@ paths: text: 'Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district.', }, { - text: 'Capital punishment (the death penalty) has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states.', + text: 'Capital punishment has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states.', }, ], query: 'What is the capital of the United States?', @@ -16142,7 +16142,7 @@ paths: "The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.", "Capitalization or capitalisation in English grammar is the use of a capital letter at the start of a word. English usage varies from capitalization in other languages.", "Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district.", - "Capital punishment (the death penalty) has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states.", + "Capital punishment has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states.", ] @@ -16170,7 +16170,7 @@ paths: "The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.", "Capitalization or capitalisation in English grammar is the use of a capital letter at the start of a word. English usage varies from capitalization in other languages.", "Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district.", - "Capital punishment (the death penalty) has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states.", + "Capital punishment has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states.", ] @@ -16234,7 +16234,7 @@ paths: + " capital of the United States. It is" + " a federal district."), RerankRequestDocumentsItem.of( - "Capital punishment (the death penalty) has" + "Capital punishment has" + " existed in the United States since" + " beforethe United States was a" + " country. As of 2017, capital" @@ -16263,7 +16263,7 @@ paths: "The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.", "Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district.", "Capitalization or capitalisation in English grammar is the use of a capital letter at the start of a word. English usage varies from capitalization in other languages.", - "Capital punishment (the death penalty) has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states."] + "Capital punishment has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states."] }' request: documents: @@ -16276,9 +16276,9 @@ paths: - text: Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district. - - text: Capital punishment (the death penalty) has existed in the United States - since beforethe United States was a country. As of 2017, - capital punishment is legal in 30 of the 50 states. + - text: Capital punishment has existed in the United States since beforethe United + States was a country. As of 2017, capital punishment is legal + in 30 of the 50 states. query: What is the capital of the United States? top_n: 3 model: rerank-english-v3.0 @@ -16603,9 +16603,9 @@ paths: - Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district. - - Capital punishment (the death penalty) has existed in the United - States since beforethe United States was a country. As of 2017, - capital punishment is legal in 30 of the 50 states. + - Capital punishment has existed in the United States since + beforethe United States was a country. As of 2017, capital + punishment is legal in 30 of the 50 states. query: What is the capital of the United States? top_n: 3 model: rerank-english-v3.0 diff --git a/snippets/snippets/curl/rerank-post.sh b/snippets/snippets/curl/rerank-post.sh index 11dead44..f2afc9aa 100644 --- a/snippets/snippets/curl/rerank-post.sh +++ b/snippets/snippets/curl/rerank-post.sh @@ -11,5 +11,5 @@ curl --request POST \ "The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.", "Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district.", "Capitalization or capitalisation in English grammar is the use of a capital letter at the start of a word. English usage varies from capitalization in other languages.", - "Capital punishment (the death penalty) has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states."] + "Capital punishment has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states."] }' \ No newline at end of file diff --git a/snippets/snippets/java/app/src/main/java/RerankPost.java b/snippets/snippets/java/app/src/main/java/RerankPost.java index 11bd102a..8a2294ea 100644 --- a/snippets/snippets/java/app/src/main/java/RerankPost.java +++ b/snippets/snippets/java/app/src/main/java/RerankPost.java @@ -37,7 +37,7 @@ public static void main(String[] args) { + " capital of the United States. It is" + " a federal district."), RerankRequestDocumentsItem.of( - "Capital punishment (the death penalty) has" + "Capital punishment has" + " existed in the United States since" + " beforethe United States was a" + " country. As of 2017, capital" diff --git a/snippets/snippets/node/rerank-post.ts b/snippets/snippets/node/rerank-post.ts index 576990fb..2dcc69c1 100644 --- a/snippets/snippets/node/rerank-post.ts +++ b/snippets/snippets/node/rerank-post.ts @@ -16,7 +16,7 @@ const cohere = new CohereClient({}); text: 'Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district.', }, { - text: 'Capital punishment (the death penalty) has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states.', + text: 'Capital punishment has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states.', }, ], query: 'What is the capital of the United States?', diff --git a/snippets/snippets/python-async/rerank-post.py b/snippets/snippets/python-async/rerank-post.py index 567937fa..14c42683 100644 --- a/snippets/snippets/python-async/rerank-post.py +++ b/snippets/snippets/python-async/rerank-post.py @@ -8,7 +8,7 @@ "The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.", "Capitalization or capitalisation in English grammar is the use of a capital letter at the start of a word. English usage varies from capitalization in other languages.", "Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district.", - "Capital punishment (the death penalty) has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states.", + "Capital punishment has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states.", ] diff --git a/snippets/snippets/python/rerank-post.py b/snippets/snippets/python/rerank-post.py index b3be77bf..d366d0a6 100644 --- a/snippets/snippets/python/rerank-post.py +++ b/snippets/snippets/python/rerank-post.py @@ -7,7 +7,7 @@ "The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.", "Capitalization or capitalisation in English grammar is the use of a capital letter at the start of a word. English usage varies from capitalization in other languages.", "Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district.", - "Capital punishment (the death penalty) has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states.", + "Capital punishment has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states.", ] response = co.rerank( diff --git a/snippets/snippets/requests/rerank-post.yaml b/snippets/snippets/requests/rerank-post.yaml index 36cbc39c..0a062f8d 100644 --- a/snippets/snippets/requests/rerank-post.yaml +++ b/snippets/snippets/requests/rerank-post.yaml @@ -8,7 +8,7 @@ documents: - text: Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district. - - text: Capital punishment (the death penalty) has existed in the United States + - text: Capital punishment has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states. query: What is the capital of the United States? diff --git a/snippets/snippets/requests/rerank-v2-post.yaml b/snippets/snippets/requests/rerank-v2-post.yaml index e89dc6e1..56f01d01 100644 --- a/snippets/snippets/requests/rerank-v2-post.yaml +++ b/snippets/snippets/requests/rerank-v2-post.yaml @@ -8,7 +8,7 @@ documents: - Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district. - - Capital punishment (the death penalty) has existed in the United States + - Capital punishment has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states. query: What is the capital of the United States?