aidial-client 0.15.0.dev5__tar.gz → 0.16.0.dev1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/PKG-INFO +1 -111
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/README.md +0 -110
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/resources/chat/completions.py +17 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/types/chat/__init__.py +7 -1
- aidial_client-0.16.0.dev1/aidial_client/types/chat/cache.py +16 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/types/chat/request.py +6 -1
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/types/chat/request_param.py +20 -13
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/types/toolset.py +2 -2
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/pyproject.toml +1 -1
- aidial_client-0.15.0.dev5/aidial_client/types/chat/cache.py +0 -5
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/LICENSE +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/__init__.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/_auth.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/_client.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/_client_pool.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/_compatibility/__init__.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/_compatibility/openai.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/_compatibility/pydantic.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/_compatibility/pydantic_v1.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/_constants.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/_exception.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/_http_client/__init__.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/_http_client/_async.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/_http_client/_base.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/_http_client/_sse.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/_http_client/_sync.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/_internal_types/__init__.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/_internal_types/_defaults.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/_internal_types/_generic.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/_internal_types/_http_request.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/_internal_types/_json_rpc.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/_internal_types/_model.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/_log.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/_utils/__init__.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/_utils/_alias.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/_utils/_dict.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/_utils/_openai.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/_utils/_response_processing.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/_utils/_type_guard.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/helpers/__init__.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/helpers/_url.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/helpers/storage_resource.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/py.typed +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/resources/__init__.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/resources/application.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/resources/base.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/resources/bucket.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/resources/chat/__init__.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/resources/client_channel.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/resources/deployments.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/resources/files.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/resources/metadata.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/resources/model.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/resources/prompts.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/resources/resource_permissions.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/resources/toolset.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/resources/user.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/types/__init__.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/types/application.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/types/bucket.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/types/chat/function.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/types/chat/legacy/__init__.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/types/chat/legacy/application_request.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/types/chat/legacy/chat_completion.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/types/chat/response.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/types/chat/tool.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/types/client_channel.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/types/deployment.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/types/file.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/types/metadata.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/types/model.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/types/prompt.py +0 -0
- {aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/types/user.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: aidial-client
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.16.0.dev1
|
|
4
4
|
Summary: A Python client library for the AI DIAL API
|
|
5
5
|
License-Expression: Apache-2.0
|
|
6
6
|
License-File: LICENSE
|
|
@@ -47,7 +47,6 @@ Description-Content-Type: text/markdown
|
|
|
47
47
|
- [Make Chat Completions Requests](#make-chat-completions-requests)
|
|
48
48
|
- [Without Streaming](#without-streaming)
|
|
49
49
|
- [With Streaming](#with-streaming)
|
|
50
|
-
- [DIAL-specific and Extended Parameters](#dial-specific-and-extended-parameters)
|
|
51
50
|
- [Working with Files](#working-with-files)
|
|
52
51
|
- [Working with URLs](#working-with-urls)
|
|
53
52
|
- [Uploading Files](#uploading-files)
|
|
@@ -487,115 +486,6 @@ ChatCompletionChunk(
|
|
|
487
486
|
)
|
|
488
487
|
```
|
|
489
488
|
|
|
490
|
-
#### DIAL-specific and Extended Parameters
|
|
491
|
-
|
|
492
|
-
Along with the standard OpenAI parameters, `chat.completions.create` accepts
|
|
493
|
-
the DIAL extensions and the newer OpenAI parameters:
|
|
494
|
-
|
|
495
|
-
```python
|
|
496
|
-
completion = client.chat.completions.create(
|
|
497
|
-
deployment_name="gpt-4o",
|
|
498
|
-
stream=False,
|
|
499
|
-
messages=[
|
|
500
|
-
# Messages support multi-modal content parts,
|
|
501
|
-
# the "developer" role and per-message cache breakpoints
|
|
502
|
-
{
|
|
503
|
-
"role": "developer",
|
|
504
|
-
"content": "Be brief",
|
|
505
|
-
"custom_fields": {"cache_breakpoint": {"expire_at": "1h"}},
|
|
506
|
-
},
|
|
507
|
-
{
|
|
508
|
-
"role": "user",
|
|
509
|
-
"content": [
|
|
510
|
-
{"type": "text", "text": "What is on the picture?"},
|
|
511
|
-
{
|
|
512
|
-
"type": "image_url",
|
|
513
|
-
"image_url": {"url": "https://example.com/image.png"},
|
|
514
|
-
},
|
|
515
|
-
],
|
|
516
|
-
# DIAL attachments, stages and forms
|
|
517
|
-
"custom_content": {
|
|
518
|
-
"attachments": [
|
|
519
|
-
{"type": "image/png", "url": "files/bucket/image.png"}
|
|
520
|
-
]
|
|
521
|
-
},
|
|
522
|
-
},
|
|
523
|
-
],
|
|
524
|
-
tools=[
|
|
525
|
-
{
|
|
526
|
-
"type": "function",
|
|
527
|
-
"function": {"name": "get_weather", "parameters": {}, "strict": True},
|
|
528
|
-
"custom_fields": {"cache_breakpoint": {}},
|
|
529
|
-
},
|
|
530
|
-
# DIAL static tools, resolved by DIAL Core itself
|
|
531
|
-
{
|
|
532
|
-
"type": "static_function",
|
|
533
|
-
"static_function": {"name": "search", "configuration": {}},
|
|
534
|
-
},
|
|
535
|
-
],
|
|
536
|
-
tool_choice="required",
|
|
537
|
-
parallel_tool_calls=False,
|
|
538
|
-
reasoning_effort="high",
|
|
539
|
-
max_completion_tokens=1000,
|
|
540
|
-
response_format={
|
|
541
|
-
"type": "json_schema",
|
|
542
|
-
"json_schema": {"name": "answer", "schema": {"type": "object"}},
|
|
543
|
-
},
|
|
544
|
-
stream_options={"include_usage": True},
|
|
545
|
-
# DIAL-specific parameters
|
|
546
|
-
max_prompt_tokens=8000,
|
|
547
|
-
custom_fields={
|
|
548
|
-
"configuration": {},
|
|
549
|
-
"cache_breakpoint": {"expire_at": "5m"},
|
|
550
|
-
},
|
|
551
|
-
)
|
|
552
|
-
```
|
|
553
|
-
|
|
554
|
-
The response models cover the DIAL extensions as well:
|
|
555
|
-
|
|
556
|
-
```pycon
|
|
557
|
-
>>> completion.choices[0].message.custom_content
|
|
558
|
-
CustomContent(
|
|
559
|
-
stages=[
|
|
560
|
-
Stage(
|
|
561
|
-
index=None,
|
|
562
|
-
name='Thinking',
|
|
563
|
-
status='completed',
|
|
564
|
-
content='...',
|
|
565
|
-
attachments=None
|
|
566
|
-
)
|
|
567
|
-
],
|
|
568
|
-
attachments=None,
|
|
569
|
-
state=None,
|
|
570
|
-
form_value=None,
|
|
571
|
-
form_schema=None
|
|
572
|
-
)
|
|
573
|
-
>>> completion.usage
|
|
574
|
-
CompletionUsage(
|
|
575
|
-
prompt_tokens=11,
|
|
576
|
-
completion_tokens=1,
|
|
577
|
-
total_tokens=12,
|
|
578
|
-
prompt_tokens_details=PromptTokensDetails(
|
|
579
|
-
cached_tokens=8,
|
|
580
|
-
cache_write_tokens=3
|
|
581
|
-
),
|
|
582
|
-
completion_tokens_details=CompletionTokensDetails(reasoning_tokens=1)
|
|
583
|
-
)
|
|
584
|
-
>>> completion.statistics
|
|
585
|
-
Statistics(
|
|
586
|
-
usage_per_model=[
|
|
587
|
-
UsagePerModel(
|
|
588
|
-
index=0,
|
|
589
|
-
model='gpt-4o',
|
|
590
|
-
prompt_tokens=11,
|
|
591
|
-
completion_tokens=1,
|
|
592
|
-
total_tokens=12
|
|
593
|
-
)
|
|
594
|
-
],
|
|
595
|
-
discarded_messages=[0, 1]
|
|
596
|
-
)
|
|
597
|
-
```
|
|
598
|
-
|
|
599
489
|
### Working with Files
|
|
600
490
|
|
|
601
491
|
#### Working with URLs
|
|
@@ -25,7 +25,6 @@
|
|
|
25
25
|
- [Make Chat Completions Requests](#make-chat-completions-requests)
|
|
26
26
|
- [Without Streaming](#without-streaming)
|
|
27
27
|
- [With Streaming](#with-streaming)
|
|
28
|
-
- [DIAL-specific and Extended Parameters](#dial-specific-and-extended-parameters)
|
|
29
28
|
- [Working with Files](#working-with-files)
|
|
30
29
|
- [Working with URLs](#working-with-urls)
|
|
31
30
|
- [Uploading Files](#uploading-files)
|
|
@@ -465,115 +464,6 @@ ChatCompletionChunk(
|
|
|
465
464
|
)
|
|
466
465
|
```
|
|
467
466
|
|
|
468
|
-
#### DIAL-specific and Extended Parameters
|
|
469
|
-
|
|
470
|
-
Along with the standard OpenAI parameters, `chat.completions.create` accepts
|
|
471
|
-
the DIAL extensions and the newer OpenAI parameters:
|
|
472
|
-
|
|
473
|
-
```python
|
|
474
|
-
completion = client.chat.completions.create(
|
|
475
|
-
deployment_name="gpt-4o",
|
|
476
|
-
stream=False,
|
|
477
|
-
messages=[
|
|
478
|
-
# Messages support multi-modal content parts,
|
|
479
|
-
# the "developer" role and per-message cache breakpoints
|
|
480
|
-
{
|
|
481
|
-
"role": "developer",
|
|
482
|
-
"content": "Be brief",
|
|
483
|
-
"custom_fields": {"cache_breakpoint": {"expire_at": "1h"}},
|
|
484
|
-
},
|
|
485
|
-
{
|
|
486
|
-
"role": "user",
|
|
487
|
-
"content": [
|
|
488
|
-
{"type": "text", "text": "What is on the picture?"},
|
|
489
|
-
{
|
|
490
|
-
"type": "image_url",
|
|
491
|
-
"image_url": {"url": "https://example.com/image.png"},
|
|
492
|
-
},
|
|
493
|
-
],
|
|
494
|
-
# DIAL attachments, stages and forms
|
|
495
|
-
"custom_content": {
|
|
496
|
-
"attachments": [
|
|
497
|
-
{"type": "image/png", "url": "files/bucket/image.png"}
|
|
498
|
-
]
|
|
499
|
-
},
|
|
500
|
-
},
|
|
501
|
-
],
|
|
502
|
-
tools=[
|
|
503
|
-
{
|
|
504
|
-
"type": "function",
|
|
505
|
-
"function": {"name": "get_weather", "parameters": {}, "strict": True},
|
|
506
|
-
"custom_fields": {"cache_breakpoint": {}},
|
|
507
|
-
},
|
|
508
|
-
# DIAL static tools, resolved by DIAL Core itself
|
|
509
|
-
{
|
|
510
|
-
"type": "static_function",
|
|
511
|
-
"static_function": {"name": "search", "configuration": {}},
|
|
512
|
-
},
|
|
513
|
-
],
|
|
514
|
-
tool_choice="required",
|
|
515
|
-
parallel_tool_calls=False,
|
|
516
|
-
reasoning_effort="high",
|
|
517
|
-
max_completion_tokens=1000,
|
|
518
|
-
response_format={
|
|
519
|
-
"type": "json_schema",
|
|
520
|
-
"json_schema": {"name": "answer", "schema": {"type": "object"}},
|
|
521
|
-
},
|
|
522
|
-
stream_options={"include_usage": True},
|
|
523
|
-
# DIAL-specific parameters
|
|
524
|
-
max_prompt_tokens=8000,
|
|
525
|
-
custom_fields={
|
|
526
|
-
"configuration": {},
|
|
527
|
-
"cache_breakpoint": {"expire_at": "5m"},
|
|
528
|
-
},
|
|
529
|
-
)
|
|
530
|
-
```
|
|
531
|
-
|
|
532
|
-
The response models cover the DIAL extensions as well:
|
|
533
|
-
|
|
534
|
-
```pycon
|
|
535
|
-
>>> completion.choices[0].message.custom_content
|
|
536
|
-
CustomContent(
|
|
537
|
-
stages=[
|
|
538
|
-
Stage(
|
|
539
|
-
index=None,
|
|
540
|
-
name='Thinking',
|
|
541
|
-
status='completed',
|
|
542
|
-
content='...',
|
|
543
|
-
attachments=None
|
|
544
|
-
)
|
|
545
|
-
],
|
|
546
|
-
attachments=None,
|
|
547
|
-
state=None,
|
|
548
|
-
form_value=None,
|
|
549
|
-
form_schema=None
|
|
550
|
-
)
|
|
551
|
-
>>> completion.usage
|
|
552
|
-
CompletionUsage(
|
|
553
|
-
prompt_tokens=11,
|
|
554
|
-
completion_tokens=1,
|
|
555
|
-
total_tokens=12,
|
|
556
|
-
prompt_tokens_details=PromptTokensDetails(
|
|
557
|
-
cached_tokens=8,
|
|
558
|
-
cache_write_tokens=3
|
|
559
|
-
),
|
|
560
|
-
completion_tokens_details=CompletionTokensDetails(reasoning_tokens=1)
|
|
561
|
-
)
|
|
562
|
-
>>> completion.statistics
|
|
563
|
-
Statistics(
|
|
564
|
-
usage_per_model=[
|
|
565
|
-
UsagePerModel(
|
|
566
|
-
index=0,
|
|
567
|
-
model='gpt-4o',
|
|
568
|
-
prompt_tokens=11,
|
|
569
|
-
completion_tokens=1,
|
|
570
|
-
total_tokens=12
|
|
571
|
-
)
|
|
572
|
-
],
|
|
573
|
-
discarded_messages=[0, 1]
|
|
574
|
-
)
|
|
575
|
-
```
|
|
576
|
-
|
|
577
467
|
### Working with Files
|
|
578
468
|
|
|
579
469
|
#### Working with URLs
|
{aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/resources/chat/completions.py
RENAMED
|
@@ -28,6 +28,7 @@ from aidial_client.types.chat import (
|
|
|
28
28
|
FunctionCallSpecParam,
|
|
29
29
|
FunctionParam,
|
|
30
30
|
Message,
|
|
31
|
+
PromptCacheOptionsParam,
|
|
31
32
|
ReasoningEffort,
|
|
32
33
|
ResponseFormat,
|
|
33
34
|
StaticToolParam,
|
|
@@ -73,6 +74,8 @@ class ChatCompletions(Resource):
|
|
|
73
74
|
seed: int | None = None,
|
|
74
75
|
user: str | None = None,
|
|
75
76
|
reasoning_effort: ReasoningEffort | None = None,
|
|
77
|
+
prompt_cache_key: str | None = None,
|
|
78
|
+
prompt_cache_options: PromptCacheOptionsParam | None = None,
|
|
76
79
|
response_format: ResponseFormat | None = None,
|
|
77
80
|
stream_options: StreamOptions | None = None,
|
|
78
81
|
custom_fields: ChatCompletionRequestCustomFields | None = None,
|
|
@@ -115,6 +118,8 @@ class ChatCompletions(Resource):
|
|
|
115
118
|
seed: int | None = None,
|
|
116
119
|
user: str | None = None,
|
|
117
120
|
reasoning_effort: ReasoningEffort | None = None,
|
|
121
|
+
prompt_cache_key: str | None = None,
|
|
122
|
+
prompt_cache_options: PromptCacheOptionsParam | None = None,
|
|
118
123
|
response_format: ResponseFormat | None = None,
|
|
119
124
|
stream_options: StreamOptions | None = None,
|
|
120
125
|
custom_fields: ChatCompletionRequestCustomFields | None = None,
|
|
@@ -156,6 +161,8 @@ class ChatCompletions(Resource):
|
|
|
156
161
|
seed: int | None = None,
|
|
157
162
|
user: str | None = None,
|
|
158
163
|
reasoning_effort: ReasoningEffort | None = None,
|
|
164
|
+
prompt_cache_key: str | None = None,
|
|
165
|
+
prompt_cache_options: PromptCacheOptionsParam | None = None,
|
|
159
166
|
response_format: ResponseFormat | None = None,
|
|
160
167
|
stream_options: StreamOptions | None = None,
|
|
161
168
|
custom_fields: ChatCompletionRequestCustomFields | None = None,
|
|
@@ -202,6 +209,8 @@ class ChatCompletions(Resource):
|
|
|
202
209
|
"max_completion_tokens": max_completion_tokens,
|
|
203
210
|
"parallel_tool_calls": parallel_tool_calls,
|
|
204
211
|
"reasoning_effort": reasoning_effort,
|
|
212
|
+
"prompt_cache_key": prompt_cache_key,
|
|
213
|
+
"prompt_cache_options": prompt_cache_options,
|
|
205
214
|
"response_format": response_format,
|
|
206
215
|
"stream_options": stream_options,
|
|
207
216
|
}
|
|
@@ -273,6 +282,8 @@ class AsyncChatCompletions(AsyncResource):
|
|
|
273
282
|
seed: int | None = None,
|
|
274
283
|
user: str | None = None,
|
|
275
284
|
reasoning_effort: ReasoningEffort | None = None,
|
|
285
|
+
prompt_cache_key: str | None = None,
|
|
286
|
+
prompt_cache_options: PromptCacheOptionsParam | None = None,
|
|
276
287
|
response_format: ResponseFormat | None = None,
|
|
277
288
|
stream_options: StreamOptions | None = None,
|
|
278
289
|
custom_fields: ChatCompletionRequestCustomFields | None = None,
|
|
@@ -315,6 +326,8 @@ class AsyncChatCompletions(AsyncResource):
|
|
|
315
326
|
seed: int | None = None,
|
|
316
327
|
user: str | None = None,
|
|
317
328
|
reasoning_effort: ReasoningEffort | None = None,
|
|
329
|
+
prompt_cache_key: str | None = None,
|
|
330
|
+
prompt_cache_options: PromptCacheOptionsParam | None = None,
|
|
318
331
|
response_format: ResponseFormat | None = None,
|
|
319
332
|
stream_options: StreamOptions | None = None,
|
|
320
333
|
custom_fields: ChatCompletionRequestCustomFields | None = None,
|
|
@@ -356,6 +369,8 @@ class AsyncChatCompletions(AsyncResource):
|
|
|
356
369
|
seed: int | None = None,
|
|
357
370
|
user: str | None = None,
|
|
358
371
|
reasoning_effort: ReasoningEffort | None = None,
|
|
372
|
+
prompt_cache_key: str | None = None,
|
|
373
|
+
prompt_cache_options: PromptCacheOptionsParam | None = None,
|
|
359
374
|
response_format: ResponseFormat | None = None,
|
|
360
375
|
stream_options: StreamOptions | None = None,
|
|
361
376
|
custom_fields: ChatCompletionRequestCustomFields | None = None,
|
|
@@ -402,6 +417,8 @@ class AsyncChatCompletions(AsyncResource):
|
|
|
402
417
|
"max_completion_tokens": max_completion_tokens,
|
|
403
418
|
"parallel_tool_calls": parallel_tool_calls,
|
|
404
419
|
"reasoning_effort": reasoning_effort,
|
|
420
|
+
"prompt_cache_key": prompt_cache_key,
|
|
421
|
+
"prompt_cache_options": prompt_cache_options,
|
|
405
422
|
"response_format": response_format,
|
|
406
423
|
"stream_options": stream_options,
|
|
407
424
|
}
|
{aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/types/chat/__init__.py
RENAMED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
from .cache import
|
|
1
|
+
from .cache import (
|
|
2
|
+
CacheBreakpointParam,
|
|
3
|
+
PromptCacheBreakpointParam,
|
|
4
|
+
PromptCacheOptionsParam,
|
|
5
|
+
)
|
|
2
6
|
from .function import FunctionCallSpecParam, FunctionParam
|
|
3
7
|
from .request import (
|
|
4
8
|
ChatCompletionRequest,
|
|
@@ -89,6 +93,8 @@ __all__ = [
|
|
|
89
93
|
"MessageContentRefusalPartParam",
|
|
90
94
|
"MessageContentTextPartParam",
|
|
91
95
|
"MessageCustomFieldsParam",
|
|
96
|
+
"PromptCacheBreakpointParam",
|
|
97
|
+
"PromptCacheOptionsParam",
|
|
92
98
|
"PromptTokensDetails",
|
|
93
99
|
"ReasoningEffort",
|
|
94
100
|
"ResponseFormat",
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from typing import Literal
|
|
2
|
+
|
|
3
|
+
from typing_extensions import TypedDict
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class CacheBreakpointParam(TypedDict, total=False):
|
|
7
|
+
expire_at: str | None
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class PromptCacheBreakpointParam(TypedDict):
|
|
11
|
+
mode: Literal["explicit"]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class PromptCacheOptionsParam(TypedDict, total=False):
|
|
15
|
+
mode: Literal["implicit", "explicit"] | None
|
|
16
|
+
ttl: Literal["30m"] | str | None
|
|
@@ -2,7 +2,10 @@ from typing import Any, Literal
|
|
|
2
2
|
|
|
3
3
|
from typing_extensions import TypedDict
|
|
4
4
|
|
|
5
|
-
from aidial_client.types.chat.cache import
|
|
5
|
+
from aidial_client.types.chat.cache import (
|
|
6
|
+
CacheBreakpointParam,
|
|
7
|
+
PromptCacheOptionsParam,
|
|
8
|
+
)
|
|
6
9
|
from aidial_client.types.chat.function import (
|
|
7
10
|
FunctionCallSpecParam,
|
|
8
11
|
FunctionParam,
|
|
@@ -46,6 +49,8 @@ class ChatCompletionRequest(TypedDict, total=False):
|
|
|
46
49
|
logprobs: bool | None
|
|
47
50
|
top_logprobs: int | None
|
|
48
51
|
reasoning_effort: ReasoningEffort | None
|
|
52
|
+
prompt_cache_key: str | None
|
|
53
|
+
prompt_cache_options: PromptCacheOptionsParam | None
|
|
49
54
|
response_format: ResponseFormat | None
|
|
50
55
|
tools: list[ToolParam | StaticToolParam] | None
|
|
51
56
|
tool_choice: Literal["none", "auto", "required"] | ToolCallSpecParam | None
|
{aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/types/chat/request_param.py
RENAMED
|
@@ -2,7 +2,10 @@ from typing import Any, Literal
|
|
|
2
2
|
|
|
3
3
|
from typing_extensions import Required, TypedDict
|
|
4
4
|
|
|
5
|
-
from aidial_client.types.chat.cache import
|
|
5
|
+
from aidial_client.types.chat.cache import (
|
|
6
|
+
CacheBreakpointParam,
|
|
7
|
+
PromptCacheBreakpointParam,
|
|
8
|
+
)
|
|
6
9
|
from aidial_client.types.chat.function import FunctionCallParam
|
|
7
10
|
from aidial_client.types.chat.tool import ToolCallParam
|
|
8
11
|
|
|
@@ -60,9 +63,10 @@ class MessageCustomFieldsParam(TypedDict, total=False):
|
|
|
60
63
|
cache_breakpoint: CacheBreakpointParam | None
|
|
61
64
|
|
|
62
65
|
|
|
63
|
-
class MessageContentTextPartParam(TypedDict):
|
|
64
|
-
type: Literal["text"]
|
|
65
|
-
text: str
|
|
66
|
+
class MessageContentTextPartParam(TypedDict, total=False):
|
|
67
|
+
type: Required[Literal["text"]]
|
|
68
|
+
text: Required[str]
|
|
69
|
+
prompt_cache_breakpoint: PromptCacheBreakpointParam | None
|
|
66
70
|
|
|
67
71
|
|
|
68
72
|
class ImageURLParam(TypedDict, total=False):
|
|
@@ -70,9 +74,10 @@ class ImageURLParam(TypedDict, total=False):
|
|
|
70
74
|
detail: Literal["auto", "low", "high"] | None
|
|
71
75
|
|
|
72
76
|
|
|
73
|
-
class MessageContentImagePartParam(TypedDict):
|
|
74
|
-
type: Literal["image_url"]
|
|
75
|
-
image_url: ImageURLParam
|
|
77
|
+
class MessageContentImagePartParam(TypedDict, total=False):
|
|
78
|
+
type: Required[Literal["image_url"]]
|
|
79
|
+
image_url: Required[ImageURLParam]
|
|
80
|
+
prompt_cache_breakpoint: PromptCacheBreakpointParam | None
|
|
76
81
|
|
|
77
82
|
|
|
78
83
|
class InputFileParam(TypedDict, total=False):
|
|
@@ -81,9 +86,10 @@ class InputFileParam(TypedDict, total=False):
|
|
|
81
86
|
filename: str | None
|
|
82
87
|
|
|
83
88
|
|
|
84
|
-
class MessageContentFilePartParam(TypedDict):
|
|
85
|
-
type: Literal["file"]
|
|
86
|
-
file: InputFileParam
|
|
89
|
+
class MessageContentFilePartParam(TypedDict, total=False):
|
|
90
|
+
type: Required[Literal["file"]]
|
|
91
|
+
file: Required[InputFileParam]
|
|
92
|
+
prompt_cache_breakpoint: PromptCacheBreakpointParam | None
|
|
87
93
|
|
|
88
94
|
|
|
89
95
|
class InputAudioParam(TypedDict):
|
|
@@ -92,9 +98,10 @@ class InputAudioParam(TypedDict):
|
|
|
92
98
|
format: str
|
|
93
99
|
|
|
94
100
|
|
|
95
|
-
class MessageContentAudioPartParam(TypedDict):
|
|
96
|
-
type: Literal["input_audio"]
|
|
97
|
-
input_audio: InputAudioParam
|
|
101
|
+
class MessageContentAudioPartParam(TypedDict, total=False):
|
|
102
|
+
type: Required[Literal["input_audio"]]
|
|
103
|
+
input_audio: Required[InputAudioParam]
|
|
104
|
+
prompt_cache_breakpoint: PromptCacheBreakpointParam | None
|
|
98
105
|
|
|
99
106
|
|
|
100
107
|
class MessageContentRefusalPartParam(TypedDict):
|
|
@@ -5,9 +5,9 @@ from aidial_client.types.deployment import Features
|
|
|
5
5
|
class ToolsetInfo(ExtraAllowModel):
|
|
6
6
|
id: str
|
|
7
7
|
toolset: str
|
|
8
|
-
display_name: str | None = None
|
|
8
|
+
display_name: str | dict[str, str] | None = None
|
|
9
9
|
display_version: str | None = None
|
|
10
|
-
description: str | None = None
|
|
10
|
+
description: str | dict[str, str] | None = None
|
|
11
11
|
icon_url: str | None = None
|
|
12
12
|
owner: str | None = None
|
|
13
13
|
object: str | None = None
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/_compatibility/__init__.py
RENAMED
|
File without changes
|
{aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/_compatibility/openai.py
RENAMED
|
File without changes
|
{aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/_compatibility/pydantic.py
RENAMED
|
File without changes
|
{aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/_compatibility/pydantic_v1.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/_http_client/__init__.py
RENAMED
|
File without changes
|
{aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/_http_client/_async.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/_internal_types/__init__.py
RENAMED
|
File without changes
|
{aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/_internal_types/_defaults.py
RENAMED
|
File without changes
|
{aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/_internal_types/_generic.py
RENAMED
|
File without changes
|
|
File without changes
|
{aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/_internal_types/_json_rpc.py
RENAMED
|
File without changes
|
{aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/_internal_types/_model.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/_utils/_response_processing.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/helpers/storage_resource.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/resources/application.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/resources/chat/__init__.py
RENAMED
|
File without changes
|
{aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/resources/client_channel.py
RENAMED
|
File without changes
|
{aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/resources/deployments.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/types/chat/function.py
RENAMED
|
File without changes
|
{aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/types/chat/legacy/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/types/chat/response.py
RENAMED
|
File without changes
|
|
File without changes
|
{aidial_client-0.15.0.dev5 → aidial_client-0.16.0.dev1}/aidial_client/types/client_channel.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|