Skip to content

Commit fb7ddf7

Browse files
SDK regeneration (#59)
Co-authored-by: fern-api[bot] <115122769+fern-api[bot]@users.noreply.github.com>
1 parent c0a9bf9 commit fb7ddf7

File tree

14 files changed

+40
-28
lines changed

14 files changed

+40
-28
lines changed

.fern/metadata.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"cliVersion": "1.1.0",
3+
"generatorName": "fernapi/fern-python-sdk",
4+
"generatorVersion": "4.36.2"
5+
}

.github/workflows/ci.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
name: ci
2-
32
on: [push]
43
jobs:
5-
compile:
64
runs-on: ubuntu-latest
75
steps:
86
- name: Checkout repo
97
uses: actions/checkout@v4
108
- name: Set up python
119
uses: actions/setup-python@v4
1210
with:
13-
python-version: 3.8
14-
- name: Bootstrap poetry
1511
run: |
1612
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
1713
- name: Install dependencies

poetry.lock

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

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "credal"
33

44
[tool.poetry]
55
name = "credal"
6-
version = "0.1.10"
6+
version = "0.1.11"
77
description = ""
88
readme = "README.md"
99
authors = []
@@ -30,7 +30,7 @@ packages = [
3030
{ include = "credal", from = "src"}
3131
]
3232

33-
[project.urls]
33+
[tool.poetry.urls]
3434
Repository = 'https://github.com/credal-ai/credal-python-sdk'
3535

3636
[tool.poetry.dependencies]

src/credal/common/types/resource_identifier.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,6 @@ class Config:
4040
extra = pydantic.Extra.allow
4141

4242

43-
ResourceIdentifier = typing.Union[ResourceIdentifier_ExternalResourceId, ResourceIdentifier_Url]
43+
ResourceIdentifier = typing_extensions.Annotated[
44+
typing.Union[ResourceIdentifier_ExternalResourceId, ResourceIdentifier_Url], pydantic.Field(discriminator="type")
45+
]

src/credal/copilots/types/filter.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,7 @@ class Config:
7676
extra = pydantic.Extra.allow
7777

7878

79-
Filter = typing.Union[Filter_String, Filter_Number, Filter_Boolean, Filter_Datetime]
79+
Filter = typing_extensions.Annotated[
80+
typing.Union[Filter_String, Filter_Number, Filter_Boolean, Filter_Datetime],
81+
pydantic.Field(discriminator="fieldType"),
82+
]

src/credal/copilots/types/response_chunk.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class ResponseChunk(UniversalBaseModel):
1212
message: str
1313
data_chunk: typing_extensions.Annotated[str, FieldMetadata(alias="dataChunk")]
1414
structured_output: typing_extensions.Annotated[
15-
typing.Optional[typing.Optional[typing.Any]], FieldMetadata(alias="structuredOutput")
15+
typing.Optional[typing.Any], FieldMetadata(alias="structuredOutput")
1616
] = None
1717

1818
if IS_PYDANTIC_V2:

src/credal/copilots/types/send_message_response.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,7 @@ class Config:
5959
extra = pydantic.Extra.allow
6060

6161

62-
SendMessageResponse = typing.Union[SendMessageResponse_AiResponseResult, SendMessageResponse_BlockedResult]
62+
SendMessageResponse = typing_extensions.Annotated[
63+
typing.Union[SendMessageResponse_AiResponseResult, SendMessageResponse_BlockedResult],
64+
pydantic.Field(discriminator="type"),
65+
]

src/credal/copilots/types/streaming_chunk.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,14 @@ class Config:
105105
extra = pydantic.Extra.allow
106106

107107

108-
StreamingChunk = typing.Union[
109-
StreamingChunk_Initial,
110-
StreamingChunk_DataChunk,
111-
StreamingChunk_EndOfMessage,
112-
StreamingChunk_FinalChunk,
113-
StreamingChunk_Blocked,
114-
StreamingChunk_ErrorChunk,
108+
StreamingChunk = typing_extensions.Annotated[
109+
typing.Union[
110+
StreamingChunk_Initial,
111+
StreamingChunk_DataChunk,
112+
StreamingChunk_EndOfMessage,
113+
StreamingChunk_FinalChunk,
114+
StreamingChunk_Blocked,
115+
StreamingChunk_ErrorChunk,
116+
],
117+
pydantic.Field(discriminator="event"),
115118
]

src/credal/core/client_wrapper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ def __init__(
2222

2323
def get_headers(self) -> typing.Dict[str, str]:
2424
headers: typing.Dict[str, str] = {
25-
"User-Agent": "credal/0.1.10",
25+
"User-Agent": "credal/0.1.11",
2626
"X-Fern-Language": "Python",
2727
"X-Fern-SDK-Name": "credal",
28-
"X-Fern-SDK-Version": "0.1.10",
28+
"X-Fern-SDK-Version": "0.1.11",
2929
**(self.get_custom_headers() or {}),
3030
}
3131
headers["Authorization"] = f"Bearer {self._get_api_key()}"

0 commit comments

Comments
 (0)