Skip to content

Commit f617346

Browse files
docs(sdk): specify example params
1 parent 78750de commit f617346

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 4
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/isaacus%2Fisaacus-6705b8e0baa0e4aad69a1c04e9876b352e40e0e5caf21e87e7b2c355e70c4e66.yml
33
openapi_spec_hash: 87d3cc80f5ddc5275e8a47d35f1a484e
4-
config_hash: a85580968a69d8d6fadf96e5e2d6870e
4+
config_hash: eb6af7379e9073b3ece2803bfcf65e68

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ embedding_response = client.embeddings.create(
3838
"Are restraints of trade enforceable under English law?",
3939
"What is a non-compete clause?",
4040
],
41+
task="retrieval/query",
4142
)
4243
print(embedding_response.embeddings)
4344
```
@@ -68,6 +69,7 @@ async def main() -> None:
6869
"Are restraints of trade enforceable under English law?",
6970
"What is a non-compete clause?",
7071
],
72+
task="retrieval/query",
7173
)
7274
print(embedding_response.embeddings)
7375

@@ -107,6 +109,7 @@ async def main() -> None:
107109
"Are restraints of trade enforceable under English law?",
108110
"What is a non-compete clause?",
109111
],
112+
task="retrieval/query",
110113
)
111114
print(embedding_response.embeddings)
112115

@@ -167,6 +170,7 @@ try:
167170
"Are restraints of trade enforceable under English law?",
168171
"What is a non-compete clause?",
169172
],
173+
task="retrieval/query",
170174
)
171175
except isaacus.APIConnectionError as e:
172176
print("The server could not be reached")
@@ -216,6 +220,7 @@ client.with_options(max_retries=5).embeddings.create(
216220
"Are restraints of trade enforceable under English law?",
217221
"What is a non-compete clause?",
218222
],
223+
task="retrieval/query",
219224
)
220225
```
221226

@@ -245,6 +250,7 @@ client.with_options(timeout=5.0).embeddings.create(
245250
"Are restraints of trade enforceable under English law?",
246251
"What is a non-compete clause?",
247252
],
253+
task="retrieval/query",
248254
)
249255
```
250256

@@ -289,6 +295,7 @@ client = Isaacus()
289295
response = client.embeddings.with_raw_response.create(
290296
model="kanon-2-embedder",
291297
texts=["Are restraints of trade enforceable under English law?", "What is a non-compete clause?"],
298+
task="retrieval/query",
292299
)
293300
print(response.headers.get('X-My-Header'))
294301

@@ -313,6 +320,7 @@ with client.embeddings.with_streaming_response.create(
313320
"Are restraints of trade enforceable under English law?",
314321
"What is a non-compete clause?",
315322
],
323+
task="retrieval/query",
316324
) as response:
317325
print(response.headers.get("X-My-Header"))
318326

0 commit comments

Comments
 (0)