Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 6cab2b9

Browse files
author
Stainless Bot
committedNov 18, 2024·
chore(tests): limit array example length (#754)
1 parent 4ec986c commit 6cab2b9

File tree

5 files changed

+71
-1231
lines changed

5 files changed

+71
-1231
lines changed
 

‎tests/api_resources/beta/messages/test_batches.py

+23-611
Large diffs are not rendered by default.

‎tests/api_resources/beta/prompt_caching/test_messages.py

+12-156
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def test_method_create_with_all_params_overload_1(self, client: Anthropic) -> No
4343
],
4444
model="claude-3-5-sonnet-20241022",
4545
metadata={"user_id": "13803d75-b4b5-4c3e-b2a2-6f21399b021b"},
46-
stop_sequences=["string", "string", "string"],
46+
stop_sequences=["string"],
4747
stream=False,
4848
system=[
4949
{
@@ -75,47 +75,11 @@ def test_method_create_with_all_params_overload_1(self, client: Anthropic) -> No
7575
"name": "x",
7676
"cache_control": {"type": "ephemeral"},
7777
"description": "Get the current weather in a given location",
78-
},
79-
{
80-
"input_schema": {
81-
"type": "object",
82-
"properties": {
83-
"location": {
84-
"description": "The city and state, e.g. San Francisco, CA",
85-
"type": "string",
86-
},
87-
"unit": {
88-
"description": "Unit for the output - one of (celsius, fahrenheit)",
89-
"type": "string",
90-
},
91-
},
92-
},
93-
"name": "x",
94-
"cache_control": {"type": "ephemeral"},
95-
"description": "Get the current weather in a given location",
96-
},
97-
{
98-
"input_schema": {
99-
"type": "object",
100-
"properties": {
101-
"location": {
102-
"description": "The city and state, e.g. San Francisco, CA",
103-
"type": "string",
104-
},
105-
"unit": {
106-
"description": "Unit for the output - one of (celsius, fahrenheit)",
107-
"type": "string",
108-
},
109-
},
110-
},
111-
"name": "x",
112-
"cache_control": {"type": "ephemeral"},
113-
"description": "Get the current weather in a given location",
114-
},
78+
}
11579
],
11680
top_k=5,
11781
top_p=0.7,
118-
betas=["string", "string", "string"],
82+
betas=["string"],
11983
)
12084
assert_matches_type(PromptCachingBetaMessage, message, path=["response"])
12185

@@ -185,7 +149,7 @@ def test_method_create_with_all_params_overload_2(self, client: Anthropic) -> No
185149
model="claude-3-5-sonnet-20241022",
186150
stream=True,
187151
metadata={"user_id": "13803d75-b4b5-4c3e-b2a2-6f21399b021b"},
188-
stop_sequences=["string", "string", "string"],
152+
stop_sequences=["string"],
189153
system=[
190154
{
191155
"text": "Today's date is 2024-06-01.",
@@ -216,47 +180,11 @@ def test_method_create_with_all_params_overload_2(self, client: Anthropic) -> No
216180
"name": "x",
217181
"cache_control": {"type": "ephemeral"},
218182
"description": "Get the current weather in a given location",
219-
},
220-
{
221-
"input_schema": {
222-
"type": "object",
223-
"properties": {
224-
"location": {
225-
"description": "The city and state, e.g. San Francisco, CA",
226-
"type": "string",
227-
},
228-
"unit": {
229-
"description": "Unit for the output - one of (celsius, fahrenheit)",
230-
"type": "string",
231-
},
232-
},
233-
},
234-
"name": "x",
235-
"cache_control": {"type": "ephemeral"},
236-
"description": "Get the current weather in a given location",
237-
},
238-
{
239-
"input_schema": {
240-
"type": "object",
241-
"properties": {
242-
"location": {
243-
"description": "The city and state, e.g. San Francisco, CA",
244-
"type": "string",
245-
},
246-
"unit": {
247-
"description": "Unit for the output - one of (celsius, fahrenheit)",
248-
"type": "string",
249-
},
250-
},
251-
},
252-
"name": "x",
253-
"cache_control": {"type": "ephemeral"},
254-
"description": "Get the current weather in a given location",
255-
},
183+
}
256184
],
257185
top_k=5,
258186
top_p=0.7,
259-
betas=["string", "string", "string"],
187+
betas=["string"],
260188
)
261189
message_stream.response.close()
262190

@@ -329,7 +257,7 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn
329257
],
330258
model="claude-3-5-sonnet-20241022",
331259
metadata={"user_id": "13803d75-b4b5-4c3e-b2a2-6f21399b021b"},
332-
stop_sequences=["string", "string", "string"],
260+
stop_sequences=["string"],
333261
stream=False,
334262
system=[
335263
{
@@ -361,47 +289,11 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn
361289
"name": "x",
362290
"cache_control": {"type": "ephemeral"},
363291
"description": "Get the current weather in a given location",
364-
},
365-
{
366-
"input_schema": {
367-
"type": "object",
368-
"properties": {
369-
"location": {
370-
"description": "The city and state, e.g. San Francisco, CA",
371-
"type": "string",
372-
},
373-
"unit": {
374-
"description": "Unit for the output - one of (celsius, fahrenheit)",
375-
"type": "string",
376-
},
377-
},
378-
},
379-
"name": "x",
380-
"cache_control": {"type": "ephemeral"},
381-
"description": "Get the current weather in a given location",
382-
},
383-
{
384-
"input_schema": {
385-
"type": "object",
386-
"properties": {
387-
"location": {
388-
"description": "The city and state, e.g. San Francisco, CA",
389-
"type": "string",
390-
},
391-
"unit": {
392-
"description": "Unit for the output - one of (celsius, fahrenheit)",
393-
"type": "string",
394-
},
395-
},
396-
},
397-
"name": "x",
398-
"cache_control": {"type": "ephemeral"},
399-
"description": "Get the current weather in a given location",
400-
},
292+
}
401293
],
402294
top_k=5,
403295
top_p=0.7,
404-
betas=["string", "string", "string"],
296+
betas=["string"],
405297
)
406298
assert_matches_type(PromptCachingBetaMessage, message, path=["response"])
407299

@@ -471,7 +363,7 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn
471363
model="claude-3-5-sonnet-20241022",
472364
stream=True,
473365
metadata={"user_id": "13803d75-b4b5-4c3e-b2a2-6f21399b021b"},
474-
stop_sequences=["string", "string", "string"],
366+
stop_sequences=["string"],
475367
system=[
476368
{
477369
"text": "Today's date is 2024-06-01.",
@@ -502,47 +394,11 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn
502394
"name": "x",
503395
"cache_control": {"type": "ephemeral"},
504396
"description": "Get the current weather in a given location",
505-
},
506-
{
507-
"input_schema": {
508-
"type": "object",
509-
"properties": {
510-
"location": {
511-
"description": "The city and state, e.g. San Francisco, CA",
512-
"type": "string",
513-
},
514-
"unit": {
515-
"description": "Unit for the output - one of (celsius, fahrenheit)",
516-
"type": "string",
517-
},
518-
},
519-
},
520-
"name": "x",
521-
"cache_control": {"type": "ephemeral"},
522-
"description": "Get the current weather in a given location",
523-
},
524-
{
525-
"input_schema": {
526-
"type": "object",
527-
"properties": {
528-
"location": {
529-
"description": "The city and state, e.g. San Francisco, CA",
530-
"type": "string",
531-
},
532-
"unit": {
533-
"description": "Unit for the output - one of (celsius, fahrenheit)",
534-
"type": "string",
535-
},
536-
},
537-
},
538-
"name": "x",
539-
"cache_control": {"type": "ephemeral"},
540-
"description": "Get the current weather in a given location",
541-
},
397+
}
542398
],
543399
top_k=5,
544400
top_p=0.7,
545-
betas=["string", "string", "string"],
401+
betas=["string"],
546402
)
547403
await message_stream.response.aclose()
548404

‎tests/api_resources/beta/test_messages.py

+24-316
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def test_method_create_with_all_params_overload_1(self, client: Anthropic) -> No
4646
],
4747
model="claude-3-5-sonnet-20241022",
4848
metadata={"user_id": "13803d75-b4b5-4c3e-b2a2-6f21399b021b"},
49-
stop_sequences=["string", "string", "string"],
49+
stop_sequences=["string"],
5050
stream=False,
5151
system=[
5252
{
@@ -79,49 +79,11 @@ def test_method_create_with_all_params_overload_1(self, client: Anthropic) -> No
7979
"cache_control": {"type": "ephemeral"},
8080
"description": "Get the current weather in a given location",
8181
"type": "custom",
82-
},
83-
{
84-
"input_schema": {
85-
"type": "object",
86-
"properties": {
87-
"location": {
88-
"description": "The city and state, e.g. San Francisco, CA",
89-
"type": "string",
90-
},
91-
"unit": {
92-
"description": "Unit for the output - one of (celsius, fahrenheit)",
93-
"type": "string",
94-
},
95-
},
96-
},
97-
"name": "x",
98-
"cache_control": {"type": "ephemeral"},
99-
"description": "Get the current weather in a given location",
100-
"type": "custom",
101-
},
102-
{
103-
"input_schema": {
104-
"type": "object",
105-
"properties": {
106-
"location": {
107-
"description": "The city and state, e.g. San Francisco, CA",
108-
"type": "string",
109-
},
110-
"unit": {
111-
"description": "Unit for the output - one of (celsius, fahrenheit)",
112-
"type": "string",
113-
},
114-
},
115-
},
116-
"name": "x",
117-
"cache_control": {"type": "ephemeral"},
118-
"description": "Get the current weather in a given location",
119-
"type": "custom",
120-
},
82+
}
12183
],
12284
top_k=5,
12385
top_p=0.7,
124-
betas=["string", "string", "string"],
86+
betas=["string"],
12587
)
12688
assert_matches_type(BetaMessage, message, path=["response"])
12789

@@ -191,7 +153,7 @@ def test_method_create_with_all_params_overload_2(self, client: Anthropic) -> No
191153
model="claude-3-5-sonnet-20241022",
192154
stream=True,
193155
metadata={"user_id": "13803d75-b4b5-4c3e-b2a2-6f21399b021b"},
194-
stop_sequences=["string", "string", "string"],
156+
stop_sequences=["string"],
195157
system=[
196158
{
197159
"text": "Today's date is 2024-06-01.",
@@ -223,49 +185,11 @@ def test_method_create_with_all_params_overload_2(self, client: Anthropic) -> No
223185
"cache_control": {"type": "ephemeral"},
224186
"description": "Get the current weather in a given location",
225187
"type": "custom",
226-
},
227-
{
228-
"input_schema": {
229-
"type": "object",
230-
"properties": {
231-
"location": {
232-
"description": "The city and state, e.g. San Francisco, CA",
233-
"type": "string",
234-
},
235-
"unit": {
236-
"description": "Unit for the output - one of (celsius, fahrenheit)",
237-
"type": "string",
238-
},
239-
},
240-
},
241-
"name": "x",
242-
"cache_control": {"type": "ephemeral"},
243-
"description": "Get the current weather in a given location",
244-
"type": "custom",
245-
},
246-
{
247-
"input_schema": {
248-
"type": "object",
249-
"properties": {
250-
"location": {
251-
"description": "The city and state, e.g. San Francisco, CA",
252-
"type": "string",
253-
},
254-
"unit": {
255-
"description": "Unit for the output - one of (celsius, fahrenheit)",
256-
"type": "string",
257-
},
258-
},
259-
},
260-
"name": "x",
261-
"cache_control": {"type": "ephemeral"},
262-
"description": "Get the current weather in a given location",
263-
"type": "custom",
264-
},
188+
}
265189
],
266190
top_k=5,
267191
top_p=0.7,
268-
betas=["string", "string", "string"],
192+
betas=["string"],
269193
)
270194
message_stream.response.close()
271195

@@ -315,15 +239,7 @@ def test_method_count_tokens(self, client: Anthropic) -> None:
315239
{
316240
"content": "string",
317241
"role": "user",
318-
},
319-
{
320-
"content": "string",
321-
"role": "user",
322-
},
323-
{
324-
"content": "string",
325-
"role": "user",
326-
},
242+
}
327243
],
328244
model="string",
329245
)
@@ -336,15 +252,7 @@ def test_method_count_tokens_with_all_params(self, client: Anthropic) -> None:
336252
{
337253
"content": "string",
338254
"role": "user",
339-
},
340-
{
341-
"content": "string",
342-
"role": "user",
343-
},
344-
{
345-
"content": "string",
346-
"role": "user",
347-
},
255+
}
348256
],
349257
model="string",
350258
system=[
@@ -377,47 +285,9 @@ def test_method_count_tokens_with_all_params(self, client: Anthropic) -> None:
377285
"cache_control": {"type": "ephemeral"},
378286
"description": "Get the current weather in a given location",
379287
"type": "custom",
380-
},
381-
{
382-
"input_schema": {
383-
"type": "object",
384-
"properties": {
385-
"location": {
386-
"description": "The city and state, e.g. San Francisco, CA",
387-
"type": "string",
388-
},
389-
"unit": {
390-
"description": "Unit for the output - one of (celsius, fahrenheit)",
391-
"type": "string",
392-
},
393-
},
394-
},
395-
"name": "x",
396-
"cache_control": {"type": "ephemeral"},
397-
"description": "Get the current weather in a given location",
398-
"type": "custom",
399-
},
400-
{
401-
"input_schema": {
402-
"type": "object",
403-
"properties": {
404-
"location": {
405-
"description": "The city and state, e.g. San Francisco, CA",
406-
"type": "string",
407-
},
408-
"unit": {
409-
"description": "Unit for the output - one of (celsius, fahrenheit)",
410-
"type": "string",
411-
},
412-
},
413-
},
414-
"name": "x",
415-
"cache_control": {"type": "ephemeral"},
416-
"description": "Get the current weather in a given location",
417-
"type": "custom",
418-
},
288+
}
419289
],
420-
betas=["string", "string", "string"],
290+
betas=["string"],
421291
)
422292
assert_matches_type(BetaMessageTokensCount, message, path=["response"])
423293

@@ -428,15 +298,7 @@ def test_raw_response_count_tokens(self, client: Anthropic) -> None:
428298
{
429299
"content": "string",
430300
"role": "user",
431-
},
432-
{
433-
"content": "string",
434-
"role": "user",
435-
},
436-
{
437-
"content": "string",
438-
"role": "user",
439-
},
301+
}
440302
],
441303
model="string",
442304
)
@@ -453,15 +315,7 @@ def test_streaming_response_count_tokens(self, client: Anthropic) -> None:
453315
{
454316
"content": "string",
455317
"role": "user",
456-
},
457-
{
458-
"content": "string",
459-
"role": "user",
460-
},
461-
{
462-
"content": "string",
463-
"role": "user",
464-
},
318+
}
465319
],
466320
model="string",
467321
) as response:
@@ -503,7 +357,7 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn
503357
],
504358
model="claude-3-5-sonnet-20241022",
505359
metadata={"user_id": "13803d75-b4b5-4c3e-b2a2-6f21399b021b"},
506-
stop_sequences=["string", "string", "string"],
360+
stop_sequences=["string"],
507361
stream=False,
508362
system=[
509363
{
@@ -536,49 +390,11 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn
536390
"cache_control": {"type": "ephemeral"},
537391
"description": "Get the current weather in a given location",
538392
"type": "custom",
539-
},
540-
{
541-
"input_schema": {
542-
"type": "object",
543-
"properties": {
544-
"location": {
545-
"description": "The city and state, e.g. San Francisco, CA",
546-
"type": "string",
547-
},
548-
"unit": {
549-
"description": "Unit for the output - one of (celsius, fahrenheit)",
550-
"type": "string",
551-
},
552-
},
553-
},
554-
"name": "x",
555-
"cache_control": {"type": "ephemeral"},
556-
"description": "Get the current weather in a given location",
557-
"type": "custom",
558-
},
559-
{
560-
"input_schema": {
561-
"type": "object",
562-
"properties": {
563-
"location": {
564-
"description": "The city and state, e.g. San Francisco, CA",
565-
"type": "string",
566-
},
567-
"unit": {
568-
"description": "Unit for the output - one of (celsius, fahrenheit)",
569-
"type": "string",
570-
},
571-
},
572-
},
573-
"name": "x",
574-
"cache_control": {"type": "ephemeral"},
575-
"description": "Get the current weather in a given location",
576-
"type": "custom",
577-
},
393+
}
578394
],
579395
top_k=5,
580396
top_p=0.7,
581-
betas=["string", "string", "string"],
397+
betas=["string"],
582398
)
583399
assert_matches_type(BetaMessage, message, path=["response"])
584400

@@ -648,7 +464,7 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn
648464
model="claude-3-5-sonnet-20241022",
649465
stream=True,
650466
metadata={"user_id": "13803d75-b4b5-4c3e-b2a2-6f21399b021b"},
651-
stop_sequences=["string", "string", "string"],
467+
stop_sequences=["string"],
652468
system=[
653469
{
654470
"text": "Today's date is 2024-06-01.",
@@ -680,49 +496,11 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn
680496
"cache_control": {"type": "ephemeral"},
681497
"description": "Get the current weather in a given location",
682498
"type": "custom",
683-
},
684-
{
685-
"input_schema": {
686-
"type": "object",
687-
"properties": {
688-
"location": {
689-
"description": "The city and state, e.g. San Francisco, CA",
690-
"type": "string",
691-
},
692-
"unit": {
693-
"description": "Unit for the output - one of (celsius, fahrenheit)",
694-
"type": "string",
695-
},
696-
},
697-
},
698-
"name": "x",
699-
"cache_control": {"type": "ephemeral"},
700-
"description": "Get the current weather in a given location",
701-
"type": "custom",
702-
},
703-
{
704-
"input_schema": {
705-
"type": "object",
706-
"properties": {
707-
"location": {
708-
"description": "The city and state, e.g. San Francisco, CA",
709-
"type": "string",
710-
},
711-
"unit": {
712-
"description": "Unit for the output - one of (celsius, fahrenheit)",
713-
"type": "string",
714-
},
715-
},
716-
},
717-
"name": "x",
718-
"cache_control": {"type": "ephemeral"},
719-
"description": "Get the current weather in a given location",
720-
"type": "custom",
721-
},
499+
}
722500
],
723501
top_k=5,
724502
top_p=0.7,
725-
betas=["string", "string", "string"],
503+
betas=["string"],
726504
)
727505
await message_stream.response.aclose()
728506

@@ -772,15 +550,7 @@ async def test_method_count_tokens(self, async_client: AsyncAnthropic) -> None:
772550
{
773551
"content": "string",
774552
"role": "user",
775-
},
776-
{
777-
"content": "string",
778-
"role": "user",
779-
},
780-
{
781-
"content": "string",
782-
"role": "user",
783-
},
553+
}
784554
],
785555
model="string",
786556
)
@@ -793,15 +563,7 @@ async def test_method_count_tokens_with_all_params(self, async_client: AsyncAnth
793563
{
794564
"content": "string",
795565
"role": "user",
796-
},
797-
{
798-
"content": "string",
799-
"role": "user",
800-
},
801-
{
802-
"content": "string",
803-
"role": "user",
804-
},
566+
}
805567
],
806568
model="string",
807569
system=[
@@ -834,47 +596,9 @@ async def test_method_count_tokens_with_all_params(self, async_client: AsyncAnth
834596
"cache_control": {"type": "ephemeral"},
835597
"description": "Get the current weather in a given location",
836598
"type": "custom",
837-
},
838-
{
839-
"input_schema": {
840-
"type": "object",
841-
"properties": {
842-
"location": {
843-
"description": "The city and state, e.g. San Francisco, CA",
844-
"type": "string",
845-
},
846-
"unit": {
847-
"description": "Unit for the output - one of (celsius, fahrenheit)",
848-
"type": "string",
849-
},
850-
},
851-
},
852-
"name": "x",
853-
"cache_control": {"type": "ephemeral"},
854-
"description": "Get the current weather in a given location",
855-
"type": "custom",
856-
},
857-
{
858-
"input_schema": {
859-
"type": "object",
860-
"properties": {
861-
"location": {
862-
"description": "The city and state, e.g. San Francisco, CA",
863-
"type": "string",
864-
},
865-
"unit": {
866-
"description": "Unit for the output - one of (celsius, fahrenheit)",
867-
"type": "string",
868-
},
869-
},
870-
},
871-
"name": "x",
872-
"cache_control": {"type": "ephemeral"},
873-
"description": "Get the current weather in a given location",
874-
"type": "custom",
875-
},
599+
}
876600
],
877-
betas=["string", "string", "string"],
601+
betas=["string"],
878602
)
879603
assert_matches_type(BetaMessageTokensCount, message, path=["response"])
880604

@@ -885,15 +609,7 @@ async def test_raw_response_count_tokens(self, async_client: AsyncAnthropic) ->
885609
{
886610
"content": "string",
887611
"role": "user",
888-
},
889-
{
890-
"content": "string",
891-
"role": "user",
892-
},
893-
{
894-
"content": "string",
895-
"role": "user",
896-
},
612+
}
897613
],
898614
model="string",
899615
)
@@ -910,15 +626,7 @@ async def test_streaming_response_count_tokens(self, async_client: AsyncAnthropi
910626
{
911627
"content": "string",
912628
"role": "user",
913-
},
914-
{
915-
"content": "string",
916-
"role": "user",
917-
},
918-
{
919-
"content": "string",
920-
"role": "user",
921-
},
629+
}
922630
],
923631
model="string",
924632
) as response:

‎tests/api_resources/test_completions.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def test_method_create_with_all_params_overload_1(self, client: Anthropic) -> No
3333
model="string",
3434
prompt="\n\nHuman: Hello, world!\n\nAssistant:",
3535
metadata={"user_id": "13803d75-b4b5-4c3e-b2a2-6f21399b021b"},
36-
stop_sequences=["string", "string", "string"],
36+
stop_sequences=["string"],
3737
stream=False,
3838
temperature=1,
3939
top_k=5,
@@ -87,7 +87,7 @@ def test_method_create_with_all_params_overload_2(self, client: Anthropic) -> No
8787
prompt="\n\nHuman: Hello, world!\n\nAssistant:",
8888
stream=True,
8989
metadata={"user_id": "13803d75-b4b5-4c3e-b2a2-6f21399b021b"},
90-
stop_sequences=["string", "string", "string"],
90+
stop_sequences=["string"],
9191
temperature=1,
9292
top_k=5,
9393
top_p=0.7,
@@ -143,7 +143,7 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn
143143
model="string",
144144
prompt="\n\nHuman: Hello, world!\n\nAssistant:",
145145
metadata={"user_id": "13803d75-b4b5-4c3e-b2a2-6f21399b021b"},
146-
stop_sequences=["string", "string", "string"],
146+
stop_sequences=["string"],
147147
stream=False,
148148
temperature=1,
149149
top_k=5,
@@ -197,7 +197,7 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn
197197
prompt="\n\nHuman: Hello, world!\n\nAssistant:",
198198
stream=True,
199199
metadata={"user_id": "13803d75-b4b5-4c3e-b2a2-6f21399b021b"},
200-
stop_sequences=["string", "string", "string"],
200+
stop_sequences=["string"],
201201
temperature=1,
202202
top_k=5,
203203
top_p=0.7,

‎tests/api_resources/test_messages.py

+8-144
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def test_method_create_with_all_params_overload_1(self, client: Anthropic) -> No
4444
],
4545
model="claude-3-5-sonnet-20241022",
4646
metadata={"user_id": "13803d75-b4b5-4c3e-b2a2-6f21399b021b"},
47-
stop_sequences=["string", "string", "string"],
47+
stop_sequences=["string"],
4848
stream=False,
4949
system=[
5050
{
@@ -74,41 +74,7 @@ def test_method_create_with_all_params_overload_1(self, client: Anthropic) -> No
7474
},
7575
"name": "x",
7676
"description": "Get the current weather in a given location",
77-
},
78-
{
79-
"input_schema": {
80-
"type": "object",
81-
"properties": {
82-
"location": {
83-
"description": "The city and state, e.g. San Francisco, CA",
84-
"type": "string",
85-
},
86-
"unit": {
87-
"description": "Unit for the output - one of (celsius, fahrenheit)",
88-
"type": "string",
89-
},
90-
},
91-
},
92-
"name": "x",
93-
"description": "Get the current weather in a given location",
94-
},
95-
{
96-
"input_schema": {
97-
"type": "object",
98-
"properties": {
99-
"location": {
100-
"description": "The city and state, e.g. San Francisco, CA",
101-
"type": "string",
102-
},
103-
"unit": {
104-
"description": "Unit for the output - one of (celsius, fahrenheit)",
105-
"type": "string",
106-
},
107-
},
108-
},
109-
"name": "x",
110-
"description": "Get the current weather in a given location",
111-
},
77+
}
11278
],
11379
top_k=5,
11480
top_p=0.7,
@@ -181,7 +147,7 @@ def test_method_create_with_all_params_overload_2(self, client: Anthropic) -> No
181147
model="claude-3-5-sonnet-20241022",
182148
stream=True,
183149
metadata={"user_id": "13803d75-b4b5-4c3e-b2a2-6f21399b021b"},
184-
stop_sequences=["string", "string", "string"],
150+
stop_sequences=["string"],
185151
system=[
186152
{
187153
"text": "Today's date is 2024-06-01.",
@@ -210,41 +176,7 @@ def test_method_create_with_all_params_overload_2(self, client: Anthropic) -> No
210176
},
211177
"name": "x",
212178
"description": "Get the current weather in a given location",
213-
},
214-
{
215-
"input_schema": {
216-
"type": "object",
217-
"properties": {
218-
"location": {
219-
"description": "The city and state, e.g. San Francisco, CA",
220-
"type": "string",
221-
},
222-
"unit": {
223-
"description": "Unit for the output - one of (celsius, fahrenheit)",
224-
"type": "string",
225-
},
226-
},
227-
},
228-
"name": "x",
229-
"description": "Get the current weather in a given location",
230-
},
231-
{
232-
"input_schema": {
233-
"type": "object",
234-
"properties": {
235-
"location": {
236-
"description": "The city and state, e.g. San Francisco, CA",
237-
"type": "string",
238-
},
239-
"unit": {
240-
"description": "Unit for the output - one of (celsius, fahrenheit)",
241-
"type": "string",
242-
},
243-
},
244-
},
245-
"name": "x",
246-
"description": "Get the current weather in a given location",
247-
},
179+
}
248180
],
249181
top_k=5,
250182
top_p=0.7,
@@ -330,7 +262,7 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn
330262
],
331263
model="claude-3-5-sonnet-20241022",
332264
metadata={"user_id": "13803d75-b4b5-4c3e-b2a2-6f21399b021b"},
333-
stop_sequences=["string", "string", "string"],
265+
stop_sequences=["string"],
334266
stream=False,
335267
system=[
336268
{
@@ -360,41 +292,7 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn
360292
},
361293
"name": "x",
362294
"description": "Get the current weather in a given location",
363-
},
364-
{
365-
"input_schema": {
366-
"type": "object",
367-
"properties": {
368-
"location": {
369-
"description": "The city and state, e.g. San Francisco, CA",
370-
"type": "string",
371-
},
372-
"unit": {
373-
"description": "Unit for the output - one of (celsius, fahrenheit)",
374-
"type": "string",
375-
},
376-
},
377-
},
378-
"name": "x",
379-
"description": "Get the current weather in a given location",
380-
},
381-
{
382-
"input_schema": {
383-
"type": "object",
384-
"properties": {
385-
"location": {
386-
"description": "The city and state, e.g. San Francisco, CA",
387-
"type": "string",
388-
},
389-
"unit": {
390-
"description": "Unit for the output - one of (celsius, fahrenheit)",
391-
"type": "string",
392-
},
393-
},
394-
},
395-
"name": "x",
396-
"description": "Get the current weather in a given location",
397-
},
295+
}
398296
],
399297
top_k=5,
400298
top_p=0.7,
@@ -467,7 +365,7 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn
467365
model="claude-3-5-sonnet-20241022",
468366
stream=True,
469367
metadata={"user_id": "13803d75-b4b5-4c3e-b2a2-6f21399b021b"},
470-
stop_sequences=["string", "string", "string"],
368+
stop_sequences=["string"],
471369
system=[
472370
{
473371
"text": "Today's date is 2024-06-01.",
@@ -496,41 +394,7 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn
496394
},
497395
"name": "x",
498396
"description": "Get the current weather in a given location",
499-
},
500-
{
501-
"input_schema": {
502-
"type": "object",
503-
"properties": {
504-
"location": {
505-
"description": "The city and state, e.g. San Francisco, CA",
506-
"type": "string",
507-
},
508-
"unit": {
509-
"description": "Unit for the output - one of (celsius, fahrenheit)",
510-
"type": "string",
511-
},
512-
},
513-
},
514-
"name": "x",
515-
"description": "Get the current weather in a given location",
516-
},
517-
{
518-
"input_schema": {
519-
"type": "object",
520-
"properties": {
521-
"location": {
522-
"description": "The city and state, e.g. San Francisco, CA",
523-
"type": "string",
524-
},
525-
"unit": {
526-
"description": "Unit for the output - one of (celsius, fahrenheit)",
527-
"type": "string",
528-
},
529-
},
530-
},
531-
"name": "x",
532-
"description": "Get the current weather in a given location",
533-
},
397+
}
534398
],
535399
top_k=5,
536400
top_p=0.7,

0 commit comments

Comments
 (0)
Please sign in to comment.