Skip to content

Commit 986682e

Browse files
SDK regeneration (#712)
Co-authored-by: fern-api[bot] <115122769+fern-api[bot]@users.noreply.github.com>
1 parent 82e8b9e commit 986682e

File tree

8 files changed

+52
-106
lines changed

8 files changed

+52
-106
lines changed

.fern/metadata.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
"fastavro": "^1.9.4",
1010
"requests": "^2.0.0",
1111
"types-requests": "^2.0.0",
12-
"tokenizers": ">=0.15,<1",
13-
"httpx-sse": "^0.4.0"
12+
"tokenizers": ">=0.15,<1"
1413
},
1514
"improved_imports": true,
1615
"pydantic_config": {

poetry.lock

Lines changed: 25 additions & 48 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ Repository = 'https://github.com/cohere-ai/cohere-python'
3838
python = "^3.9"
3939
fastavro = "^1.9.4"
4040
httpx = ">=0.21.2"
41-
httpx-sse = "^0.4.0"
4241
pydantic = ">= 1.9.2"
4342
pydantic-core = ">=2.18.2"
4443
requests = "^2.0.0"

reference.md

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1615,7 +1615,7 @@ client.rerank(
16151615
],
16161616
query="What is the capital of the United States?",
16171617
top_n=3,
1618-
model="rerank-v3.5",
1618+
model="rerank-v4.0-pro",
16191619
)
16201620

16211621
```
@@ -2492,10 +2492,7 @@ If tool_choice isn't specified, then the model is free to choose whether to use
24922492
<dl>
24932493
<dd>
24942494

2495-
**priority:** `typing.Optional[int]`
2496-
2497-
The priority of the request (lower means earlier handling; default 0 highest priority).
2498-
Higher priority requests are handled first, and dropped last when the system is under load.
2495+
**priority:** `typing.Optional[int]` — Controls how early the request is handled. Lower numbers indicate higher priority (default: 0, the highest). When the system is under load, higher-priority requests are processed first and are the least likely to be dropped.
24992496

25002497
</dd>
25012498
</dl>
@@ -2793,10 +2790,7 @@ If tool_choice isn't specified, then the model is free to choose whether to use
27932790
<dl>
27942791
<dd>
27952792

2796-
**priority:** `typing.Optional[int]`
2797-
2798-
The priority of the request (lower means earlier handling; default 0 highest priority).
2799-
Higher priority requests are handled first, and dropped last when the system is under load.
2793+
**priority:** `typing.Optional[int]` — Controls how early the request is handled. Lower numbers indicate higher priority (default: 0, the highest). When the system is under load, higher-priority requests are processed first and are the least likely to be dropped.
28002794

28012795
</dd>
28022796
</dl>
@@ -2972,10 +2966,7 @@ If `NONE` is selected, when the input exceeds the maximum input token length an
29722966
<dl>
29732967
<dd>
29742968

2975-
**priority:** `typing.Optional[int]`
2976-
2977-
The priority of the request (lower means earlier handling; default 0 highest priority).
2978-
Higher priority requests are handled first, and dropped last when the system is under load.
2969+
**priority:** `typing.Optional[int]` — Controls how early the request is handled. Lower numbers indicate higher priority (default: 0, the highest). When the system is under load, higher-priority requests are processed first and are the least likely to be dropped.
29792970

29802971
</dd>
29812972
</dl>
@@ -3038,7 +3029,7 @@ client.v2.rerank(
30383029
],
30393030
query="What is the capital of the United States?",
30403031
top_n=3,
3041-
model="rerank-v3.5",
3032+
model="rerank-v4.0-pro",
30423033
)
30433034

30443035
```
@@ -3102,10 +3093,7 @@ For optimal performance we recommend against sending more than 1,000 documents i
31023093
<dl>
31033094
<dd>
31043095

3105-
**priority:** `typing.Optional[int]`
3106-
3107-
The priority of the request (lower means earlier handling; default 0 highest priority).
3108-
Higher priority requests are handled first, and dropped last when the system is under load.
3096+
**priority:** `typing.Optional[int]` — Controls how early the request is handled. Lower numbers indicate higher priority (default: 0, the highest). When the system is under load, higher-priority requests are processed first and are the least likely to be dropped.
31093097

31103098
</dd>
31113099
</dl>

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
fastavro==1.9.4
22
httpx>=0.21.2
3-
httpx-sse==0.4.0
43
pydantic>= 1.9.2
54
pydantic-core>=2.18.2
65
requests==2.0.0

src/cohere/base_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1205,7 +1205,7 @@ def rerank(
12051205
],
12061206
query="What is the capital of the United States?",
12071207
top_n=3,
1208-
model="rerank-v3.5",
1208+
model="rerank-v4.0-pro",
12091209
)
12101210
"""
12111211
_response = self._raw_client.rerank(
@@ -2755,7 +2755,7 @@ async def main() -> None:
27552755
],
27562756
query="What is the capital of the United States?",
27572757
top_n=3,
2758-
model="rerank-v3.5",
2758+
model="rerank-v4.0-pro",
27592759
)
27602760
27612761

src/cohere/v2/client.py

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,7 @@ def chat_stream(
160160
thinking : typing.Optional[Thinking]
161161
162162
priority : typing.Optional[int]
163-
The priority of the request (lower means earlier handling; default 0 highest priority).
164-
Higher priority requests are handled first, and dropped last when the system is under load.
163+
Controls how early the request is handled. Lower numbers indicate higher priority (default: 0, the highest). When the system is under load, higher-priority requests are processed first and are the least likely to be dropped.
165164
166165
request_options : typing.Optional[RequestOptions]
167166
Request-specific configuration.
@@ -331,8 +330,7 @@ def chat(
331330
thinking : typing.Optional[Thinking]
332331
333332
priority : typing.Optional[int]
334-
The priority of the request (lower means earlier handling; default 0 highest priority).
335-
Higher priority requests are handled first, and dropped last when the system is under load.
333+
Controls how early the request is handled. Lower numbers indicate higher priority (default: 0, the highest). When the system is under load, higher-priority requests are processed first and are the least likely to be dropped.
336334
337335
request_options : typing.Optional[RequestOptions]
338336
Request-specific configuration.
@@ -451,8 +449,7 @@ def embed(
451449
If `NONE` is selected, when the input exceeds the maximum input token length an error will be returned.
452450
453451
priority : typing.Optional[int]
454-
The priority of the request (lower means earlier handling; default 0 highest priority).
455-
Higher priority requests are handled first, and dropped last when the system is under load.
452+
Controls how early the request is handled. Lower numbers indicate higher priority (default: 0, the highest). When the system is under load, higher-priority requests are processed first and are the least likely to be dropped.
456453
457454
request_options : typing.Optional[RequestOptions]
458455
Request-specific configuration.
@@ -529,8 +526,7 @@ def rerank(
529526
Defaults to `4096`. Long documents will be automatically truncated to the specified number of tokens.
530527
531528
priority : typing.Optional[int]
532-
The priority of the request (lower means earlier handling; default 0 highest priority).
533-
Higher priority requests are handled first, and dropped last when the system is under load.
529+
Controls how early the request is handled. Lower numbers indicate higher priority (default: 0, the highest). When the system is under load, higher-priority requests are processed first and are the least likely to be dropped.
534530
535531
request_options : typing.Optional[RequestOptions]
536532
Request-specific configuration.
@@ -558,7 +554,7 @@ def rerank(
558554
],
559555
query="What is the capital of the United States?",
560556
top_n=3,
561-
model="rerank-v3.5",
557+
model="rerank-v4.0-pro",
562558
)
563559
"""
564560
_response = self._raw_client.rerank(
@@ -704,8 +700,7 @@ async def chat_stream(
704700
thinking : typing.Optional[Thinking]
705701
706702
priority : typing.Optional[int]
707-
The priority of the request (lower means earlier handling; default 0 highest priority).
708-
Higher priority requests are handled first, and dropped last when the system is under load.
703+
Controls how early the request is handled. Lower numbers indicate higher priority (default: 0, the highest). When the system is under load, higher-priority requests are processed first and are the least likely to be dropped.
709704
710705
request_options : typing.Optional[RequestOptions]
711706
Request-specific configuration.
@@ -884,8 +879,7 @@ async def chat(
884879
thinking : typing.Optional[Thinking]
885880
886881
priority : typing.Optional[int]
887-
The priority of the request (lower means earlier handling; default 0 highest priority).
888-
Higher priority requests are handled first, and dropped last when the system is under load.
882+
Controls how early the request is handled. Lower numbers indicate higher priority (default: 0, the highest). When the system is under load, higher-priority requests are processed first and are the least likely to be dropped.
889883
890884
request_options : typing.Optional[RequestOptions]
891885
Request-specific configuration.
@@ -1012,8 +1006,7 @@ async def embed(
10121006
If `NONE` is selected, when the input exceeds the maximum input token length an error will be returned.
10131007
10141008
priority : typing.Optional[int]
1015-
The priority of the request (lower means earlier handling; default 0 highest priority).
1016-
Higher priority requests are handled first, and dropped last when the system is under load.
1009+
Controls how early the request is handled. Lower numbers indicate higher priority (default: 0, the highest). When the system is under load, higher-priority requests are processed first and are the least likely to be dropped.
10171010
10181011
request_options : typing.Optional[RequestOptions]
10191012
Request-specific configuration.
@@ -1098,8 +1091,7 @@ async def rerank(
10981091
Defaults to `4096`. Long documents will be automatically truncated to the specified number of tokens.
10991092
11001093
priority : typing.Optional[int]
1101-
The priority of the request (lower means earlier handling; default 0 highest priority).
1102-
Higher priority requests are handled first, and dropped last when the system is under load.
1094+
Controls how early the request is handled. Lower numbers indicate higher priority (default: 0, the highest). When the system is under load, higher-priority requests are processed first and are the least likely to be dropped.
11031095
11041096
request_options : typing.Optional[RequestOptions]
11051097
Request-specific configuration.
@@ -1132,7 +1124,7 @@ async def main() -> None:
11321124
],
11331125
query="What is the capital of the United States?",
11341126
top_n=3,
1135-
model="rerank-v3.5",
1127+
model="rerank-v4.0-pro",
11361128
)
11371129
11381130

0 commit comments

Comments
 (0)