aidial-client 0.15.0.dev2__tar.gz → 0.15.0.dev4__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.dev2 → aidial_client-0.15.0.dev4}/PKG-INFO +49 -34
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/README.md +48 -33
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/pyproject.toml +1 -1
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/LICENSE +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/__init__.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/_auth.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/_client.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/_client_pool.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/_compatibility/__init__.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/_compatibility/openai.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/_compatibility/pydantic.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/_compatibility/pydantic_v1.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/_constants.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/_exception.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/_http_client/__init__.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/_http_client/_async.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/_http_client/_base.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/_http_client/_sse.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/_http_client/_sync.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/_internal_types/__init__.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/_internal_types/_defaults.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/_internal_types/_generic.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/_internal_types/_http_request.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/_internal_types/_json_rpc.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/_internal_types/_model.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/_log.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/_utils/__init__.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/_utils/_alias.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/_utils/_dict.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/_utils/_openai.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/_utils/_response_processing.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/_utils/_type_guard.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/helpers/__init__.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/helpers/_url.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/helpers/storage_resource.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/py.typed +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/resources/__init__.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/resources/application.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/resources/base.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/resources/bucket.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/resources/chat/__init__.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/resources/chat/completions.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/resources/client_channel.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/resources/deployments.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/resources/files.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/resources/metadata.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/resources/model.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/resources/prompts.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/resources/resource_permissions.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/resources/toolset.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/resources/user.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/types/__init__.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/types/application.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/types/bucket.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/types/chat/__init__.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/types/chat/function.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/types/chat/legacy/__init__.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/types/chat/legacy/application_request.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/types/chat/legacy/chat_completion.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/types/chat/request.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/types/chat/request_param.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/types/chat/response.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/types/chat/tool.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/types/client_channel.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/types/deployment.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/types/file.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/types/metadata.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/types/model.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/types/prompt.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/types/toolset.py +0 -0
- {aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/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.15.0.
|
|
3
|
+
Version: 0.15.0.dev4
|
|
4
4
|
Summary: A Python client library for the AI DIAL API
|
|
5
5
|
License-Expression: Apache-2.0
|
|
6
6
|
License-File: LICENSE
|
|
@@ -37,51 +37,55 @@ Description-Content-Type: text/markdown
|
|
|
37
37
|
|
|
38
38
|
- [Usage](#usage)
|
|
39
39
|
- [Authentication](#authentication)
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
- [API Keys](#api-keys)
|
|
41
|
+
- [Bearer Token](#bearer-token)
|
|
42
42
|
- [Lifecycle Management](#lifecycle-management)
|
|
43
43
|
- [Deployments](#deployments)
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
- [Make Chat Completions Requests](#make-completions-requests)
|
|
48
|
-
|
|
49
|
-
|
|
44
|
+
- [List Deployments](#list-deployments)
|
|
45
|
+
- [Get Deployment by Id](#get-deployment-by-id)
|
|
46
|
+
- [Get Deployment Configuration](#get-deployment-configuration)
|
|
47
|
+
- [Make Chat Completions Requests](#make-chat-completions-requests)
|
|
48
|
+
- [Without Streaming](#without-streaming)
|
|
49
|
+
- [With Streaming](#with-streaming)
|
|
50
50
|
- [Working with Files](#working-with-files)
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
- [Working with URLs](#working-with-urls)
|
|
52
|
+
- [Uploading Files](#uploading-files)
|
|
53
|
+
- [Downloading Files](#downloading-files)
|
|
54
|
+
- [Deleting Files](#deleting-files)
|
|
55
|
+
- [Moving and Copying Files](#moving-and-copying-files)
|
|
56
|
+
- [Accessing Metadata](#accessing-metadata)
|
|
56
57
|
- [Prompts](#prompts)
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
- [Save Prompt](#save-prompt)
|
|
59
|
+
- [Get Prompt](#get-prompt)
|
|
60
|
+
- [Get Prompt Metadata](#get-prompt-metadata)
|
|
61
|
+
- [Delete Prompt](#delete-prompt)
|
|
59
62
|
- [Applications](#applications)
|
|
60
|
-
|
|
61
|
-
|
|
63
|
+
- [List Applications](#list-applications)
|
|
64
|
+
- [Get Application by Id](#get-application-by-id)
|
|
62
65
|
- [Models](#models)
|
|
63
|
-
|
|
66
|
+
- [Get Model by Name](#get-model-by-name)
|
|
64
67
|
- [User](#user)
|
|
65
|
-
|
|
68
|
+
- [Get Authenticated User Info](#get-authenticated-user-info)
|
|
66
69
|
- [Toolsets](#toolsets)
|
|
67
|
-
|
|
70
|
+
- [Get Toolset by Id](#get-toolset-by-id)
|
|
68
71
|
- [Resource Permissions](#resource-permissions)
|
|
69
|
-
|
|
72
|
+
- [Grant Permissions](#grant-permissions)
|
|
70
73
|
- [Client Channel](#client-channel)
|
|
71
|
-
|
|
74
|
+
- [Sign In to Toolsets](#sign-in-to-toolsets)
|
|
72
75
|
- [Client Pool](#client-pool)
|
|
73
|
-
|
|
74
|
-
|
|
76
|
+
- [Synchronous Client Pool](#synchronous-client-pool)
|
|
77
|
+
- [Asynchronous Client Pool](#asynchronous-client-pool)
|
|
75
78
|
- [Development](#development)
|
|
76
79
|
- [Pre-requisites](#pre-requisites)
|
|
77
80
|
- [Setup](#setup)
|
|
78
|
-
- [Main commands](#main-commands)
|
|
79
81
|
- [Git hooks](#git-hooks)
|
|
82
|
+
- [Main commands](#main-commands)
|
|
83
|
+
- [Integration tests](#integration-tests)
|
|
80
84
|
|
|
81
85
|
## Usage
|
|
82
86
|
|
|
83
|
-
This section outlines how to use the AI DIAL Python client to interact with the DIAL Core API.
|
|
84
|
-
It covers authentication methods, making chat completion requests, working with files, managing applications,
|
|
87
|
+
This section outlines how to use the AI DIAL Python client to interact with the DIAL Core API.
|
|
88
|
+
It covers authentication methods, making chat completion requests, working with files, managing applications,
|
|
85
89
|
and utilizing client pools for efficient connection management.
|
|
86
90
|
|
|
87
91
|
### Authentication
|
|
@@ -306,7 +310,7 @@ The response is a plain `dict` whose shape is entirely deployment-specific:
|
|
|
306
310
|
}
|
|
307
311
|
```
|
|
308
312
|
|
|
309
|
-
### Make Completions Requests
|
|
313
|
+
### Make Chat Completions Requests
|
|
310
314
|
|
|
311
315
|
#### Without Streaming
|
|
312
316
|
|
|
@@ -488,8 +492,8 @@ ChatCompletionChunk(
|
|
|
488
492
|
|
|
489
493
|
Files are AI DIAL resources that operate with URL-like objects. Use `pathlib.PurePosixPath` or `str` to create to create new URL-like objects or to get a `string` representation of them.
|
|
490
494
|
|
|
491
|
-
|
|
492
|
-
|
|
495
|
+
- Use `client.my_files_home()` to upload a file into your bucket in the AI DIAL storage.
|
|
496
|
+
- Use `await async_client.my_files_home()` to get the URL of your bucket and then use it to upload files.
|
|
493
497
|
|
|
494
498
|
The following example demonstrates how you can use the path-like object returned by `my_files_home()` function:
|
|
495
499
|
|
|
@@ -624,7 +628,6 @@ await result.awrite_to("./some-local-file.txt")
|
|
|
624
628
|
|
|
625
629
|
Use `delete()` to remove files from your storage bucket:
|
|
626
630
|
|
|
627
|
-
|
|
628
631
|
```python
|
|
629
632
|
await sync_client.files.delete(
|
|
630
633
|
url=sync_client.my_files_home() / "relative_folder/my-file.txt"
|
|
@@ -1117,7 +1120,6 @@ second_client = client_pool.create_client(
|
|
|
1117
1120
|
)
|
|
1118
1121
|
```
|
|
1119
1122
|
|
|
1120
|
-
|
|
1121
1123
|
## Development
|
|
1122
1124
|
|
|
1123
1125
|
To set up the development environment and run the project, follow the instructions below.
|
|
@@ -1128,18 +1130,21 @@ The following tools are required to work with the project:
|
|
|
1128
1130
|
|
|
1129
1131
|
1. `Make`
|
|
1130
1132
|
2. `Python 3.10`
|
|
1131
|
-
3. `Poetry 2.*`.
|
|
1133
|
+
3. `Poetry 2.*`. See the [Poetry installation guide](https://python-poetry.org/docs/#installation)
|
|
1132
1134
|
|
|
1133
1135
|
### Setup
|
|
1134
1136
|
|
|
1135
1137
|
1. Create `.env` file in the root of the project. Copy `.env.template` file data to the `.env` and customize the values
|
|
1136
1138
|
if needed. You can customize python and poetry locations.
|
|
1137
1139
|
2. Create and activate virtual environment
|
|
1140
|
+
|
|
1138
1141
|
```bash
|
|
1139
1142
|
make init_env
|
|
1140
1143
|
source .venv/bin/activate
|
|
1141
1144
|
```
|
|
1145
|
+
|
|
1142
1146
|
3. Install dependencies
|
|
1147
|
+
|
|
1143
1148
|
```bash
|
|
1144
1149
|
make install
|
|
1145
1150
|
```
|
|
@@ -1170,3 +1175,13 @@ make install_git_hooks
|
|
|
1170
1175
|
| `make coverage` | Generate test coverage report |
|
|
1171
1176
|
| `make help` | Show available commands |
|
|
1172
1177
|
|
|
1178
|
+
### Integration tests
|
|
1179
|
+
|
|
1180
|
+
`make integration_test` runs against a real DIAL deployment and requires the following environment variables:
|
|
1181
|
+
|
|
1182
|
+
| Variable | Description |
|
|
1183
|
+
|----------------|----------------------------------------------------|
|
|
1184
|
+
| `DIAL_URL` | Base URL of the DIAL Core service |
|
|
1185
|
+
| `DIAL_API_KEY` | API key used to authenticate requests in DIAL Core |
|
|
1186
|
+
| `DIAL_MODEL` | Name of a chat model deployment to run tests with |
|
|
1187
|
+
|
|
@@ -15,51 +15,55 @@
|
|
|
15
15
|
|
|
16
16
|
- [Usage](#usage)
|
|
17
17
|
- [Authentication](#authentication)
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
- [API Keys](#api-keys)
|
|
19
|
+
- [Bearer Token](#bearer-token)
|
|
20
20
|
- [Lifecycle Management](#lifecycle-management)
|
|
21
21
|
- [Deployments](#deployments)
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
- [Make Chat Completions Requests](#make-completions-requests)
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
- [List Deployments](#list-deployments)
|
|
23
|
+
- [Get Deployment by Id](#get-deployment-by-id)
|
|
24
|
+
- [Get Deployment Configuration](#get-deployment-configuration)
|
|
25
|
+
- [Make Chat Completions Requests](#make-chat-completions-requests)
|
|
26
|
+
- [Without Streaming](#without-streaming)
|
|
27
|
+
- [With Streaming](#with-streaming)
|
|
28
28
|
- [Working with Files](#working-with-files)
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
- [Working with URLs](#working-with-urls)
|
|
30
|
+
- [Uploading Files](#uploading-files)
|
|
31
|
+
- [Downloading Files](#downloading-files)
|
|
32
|
+
- [Deleting Files](#deleting-files)
|
|
33
|
+
- [Moving and Copying Files](#moving-and-copying-files)
|
|
34
|
+
- [Accessing Metadata](#accessing-metadata)
|
|
34
35
|
- [Prompts](#prompts)
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
- [Save Prompt](#save-prompt)
|
|
37
|
+
- [Get Prompt](#get-prompt)
|
|
38
|
+
- [Get Prompt Metadata](#get-prompt-metadata)
|
|
39
|
+
- [Delete Prompt](#delete-prompt)
|
|
37
40
|
- [Applications](#applications)
|
|
38
|
-
|
|
39
|
-
|
|
41
|
+
- [List Applications](#list-applications)
|
|
42
|
+
- [Get Application by Id](#get-application-by-id)
|
|
40
43
|
- [Models](#models)
|
|
41
|
-
|
|
44
|
+
- [Get Model by Name](#get-model-by-name)
|
|
42
45
|
- [User](#user)
|
|
43
|
-
|
|
46
|
+
- [Get Authenticated User Info](#get-authenticated-user-info)
|
|
44
47
|
- [Toolsets](#toolsets)
|
|
45
|
-
|
|
48
|
+
- [Get Toolset by Id](#get-toolset-by-id)
|
|
46
49
|
- [Resource Permissions](#resource-permissions)
|
|
47
|
-
|
|
50
|
+
- [Grant Permissions](#grant-permissions)
|
|
48
51
|
- [Client Channel](#client-channel)
|
|
49
|
-
|
|
52
|
+
- [Sign In to Toolsets](#sign-in-to-toolsets)
|
|
50
53
|
- [Client Pool](#client-pool)
|
|
51
|
-
|
|
52
|
-
|
|
54
|
+
- [Synchronous Client Pool](#synchronous-client-pool)
|
|
55
|
+
- [Asynchronous Client Pool](#asynchronous-client-pool)
|
|
53
56
|
- [Development](#development)
|
|
54
57
|
- [Pre-requisites](#pre-requisites)
|
|
55
58
|
- [Setup](#setup)
|
|
56
|
-
- [Main commands](#main-commands)
|
|
57
59
|
- [Git hooks](#git-hooks)
|
|
60
|
+
- [Main commands](#main-commands)
|
|
61
|
+
- [Integration tests](#integration-tests)
|
|
58
62
|
|
|
59
63
|
## Usage
|
|
60
64
|
|
|
61
|
-
This section outlines how to use the AI DIAL Python client to interact with the DIAL Core API.
|
|
62
|
-
It covers authentication methods, making chat completion requests, working with files, managing applications,
|
|
65
|
+
This section outlines how to use the AI DIAL Python client to interact with the DIAL Core API.
|
|
66
|
+
It covers authentication methods, making chat completion requests, working with files, managing applications,
|
|
63
67
|
and utilizing client pools for efficient connection management.
|
|
64
68
|
|
|
65
69
|
### Authentication
|
|
@@ -284,7 +288,7 @@ The response is a plain `dict` whose shape is entirely deployment-specific:
|
|
|
284
288
|
}
|
|
285
289
|
```
|
|
286
290
|
|
|
287
|
-
### Make Completions Requests
|
|
291
|
+
### Make Chat Completions Requests
|
|
288
292
|
|
|
289
293
|
#### Without Streaming
|
|
290
294
|
|
|
@@ -466,8 +470,8 @@ ChatCompletionChunk(
|
|
|
466
470
|
|
|
467
471
|
Files are AI DIAL resources that operate with URL-like objects. Use `pathlib.PurePosixPath` or `str` to create to create new URL-like objects or to get a `string` representation of them.
|
|
468
472
|
|
|
469
|
-
|
|
470
|
-
|
|
473
|
+
- Use `client.my_files_home()` to upload a file into your bucket in the AI DIAL storage.
|
|
474
|
+
- Use `await async_client.my_files_home()` to get the URL of your bucket and then use it to upload files.
|
|
471
475
|
|
|
472
476
|
The following example demonstrates how you can use the path-like object returned by `my_files_home()` function:
|
|
473
477
|
|
|
@@ -602,7 +606,6 @@ await result.awrite_to("./some-local-file.txt")
|
|
|
602
606
|
|
|
603
607
|
Use `delete()` to remove files from your storage bucket:
|
|
604
608
|
|
|
605
|
-
|
|
606
609
|
```python
|
|
607
610
|
await sync_client.files.delete(
|
|
608
611
|
url=sync_client.my_files_home() / "relative_folder/my-file.txt"
|
|
@@ -1095,7 +1098,6 @@ second_client = client_pool.create_client(
|
|
|
1095
1098
|
)
|
|
1096
1099
|
```
|
|
1097
1100
|
|
|
1098
|
-
|
|
1099
1101
|
## Development
|
|
1100
1102
|
|
|
1101
1103
|
To set up the development environment and run the project, follow the instructions below.
|
|
@@ -1106,18 +1108,21 @@ The following tools are required to work with the project:
|
|
|
1106
1108
|
|
|
1107
1109
|
1. `Make`
|
|
1108
1110
|
2. `Python 3.10`
|
|
1109
|
-
3. `Poetry 2.*`.
|
|
1111
|
+
3. `Poetry 2.*`. See the [Poetry installation guide](https://python-poetry.org/docs/#installation)
|
|
1110
1112
|
|
|
1111
1113
|
### Setup
|
|
1112
1114
|
|
|
1113
1115
|
1. Create `.env` file in the root of the project. Copy `.env.template` file data to the `.env` and customize the values
|
|
1114
1116
|
if needed. You can customize python and poetry locations.
|
|
1115
1117
|
2. Create and activate virtual environment
|
|
1118
|
+
|
|
1116
1119
|
```bash
|
|
1117
1120
|
make init_env
|
|
1118
1121
|
source .venv/bin/activate
|
|
1119
1122
|
```
|
|
1123
|
+
|
|
1120
1124
|
3. Install dependencies
|
|
1125
|
+
|
|
1121
1126
|
```bash
|
|
1122
1127
|
make install
|
|
1123
1128
|
```
|
|
@@ -1147,3 +1152,13 @@ make install_git_hooks
|
|
|
1147
1152
|
| `make integration_test` | Run integration tests |
|
|
1148
1153
|
| `make coverage` | Generate test coverage report |
|
|
1149
1154
|
| `make help` | Show available commands |
|
|
1155
|
+
|
|
1156
|
+
### Integration tests
|
|
1157
|
+
|
|
1158
|
+
`make integration_test` runs against a real DIAL deployment and requires the following environment variables:
|
|
1159
|
+
|
|
1160
|
+
| Variable | Description |
|
|
1161
|
+
|----------------|----------------------------------------------------|
|
|
1162
|
+
| `DIAL_URL` | Base URL of the DIAL Core service |
|
|
1163
|
+
| `DIAL_API_KEY` | API key used to authenticate requests in DIAL Core |
|
|
1164
|
+
| `DIAL_MODEL` | Name of a chat model deployment to run tests with |
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/_compatibility/__init__.py
RENAMED
|
File without changes
|
{aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/_compatibility/openai.py
RENAMED
|
File without changes
|
{aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/_compatibility/pydantic.py
RENAMED
|
File without changes
|
{aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/_compatibility/pydantic_v1.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/_http_client/__init__.py
RENAMED
|
File without changes
|
{aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/_http_client/_async.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/_internal_types/__init__.py
RENAMED
|
File without changes
|
{aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/_internal_types/_defaults.py
RENAMED
|
File without changes
|
{aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/_internal_types/_generic.py
RENAMED
|
File without changes
|
|
File without changes
|
{aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/_internal_types/_json_rpc.py
RENAMED
|
File without changes
|
{aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/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.dev2 → aidial_client-0.15.0.dev4}/aidial_client/_utils/_response_processing.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/helpers/storage_resource.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/resources/application.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/resources/chat/__init__.py
RENAMED
|
File without changes
|
{aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/resources/chat/completions.py
RENAMED
|
File without changes
|
{aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/resources/client_channel.py
RENAMED
|
File without changes
|
{aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/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.dev2 → aidial_client-0.15.0.dev4}/aidial_client/types/chat/__init__.py
RENAMED
|
File without changes
|
{aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/types/chat/function.py
RENAMED
|
File without changes
|
{aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/types/chat/legacy/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/types/chat/request_param.py
RENAMED
|
File without changes
|
{aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/aidial_client/types/chat/response.py
RENAMED
|
File without changes
|
|
File without changes
|
{aidial_client-0.15.0.dev2 → aidial_client-0.15.0.dev4}/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
|
|
File without changes
|