Skip to content

Commit 67403ba

Browse files
release: 0.1.0-alpha.5 (#5)
* feat(api): fixing streaming again * feat(api): to_schema and Model class * chore: update @stainless-api/prism-cli to v5.15.0 * chore(internal): update comment in script * feat(api): spec concise * feat(api): logic adj * feat(api): ModelConfig * feat(api): dedalus model update * feat(api): Config update for dedalus-ai/dev * chore(internal): codegen related update * feat(api): manual updates * feat(api): streaming change * feat(api): update types * feat(api): api update * feat(api): polished types * feat(api): chat completions * release: 0.1.0-alpha.5 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent d4fc343 commit 67403ba

33 files changed

Lines changed: 1278 additions & 846 deletions

.github/workflows/release-doctor.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Release Doctor
22
on:
3-
pull_request:
3+
push:
44
branches:
55
- main
66
workflow_dispatch:
@@ -9,6 +9,7 @@ jobs:
99
release_doctor:
1010
name: release doctor
1111
runs-on: ubuntu-latest
12+
environment: production
1213
if: github.repository == 'dedalus-labs/dedalus-sdk-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')
1314

1415
steps:

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.1.0-alpha.4"
2+
".": "0.1.0-alpha.5"
33
}

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 5
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/dedalus-labs--inc-dash%2Fdedalus-sdk-ee9f07b7b22e7f79b906bd0d50bba8c0e1468cc8e481ff915ff85d9105552e7e.yml
3-
openapi_spec_hash: a30e60f624ca75667458982265f5df52
4-
config_hash: 5359ec4b5b515616b95557d9370accb8
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/dedalus-labs--inc-dash%2Fdedalus-sdk-107fbf0e4f3e883dc0579bbb799a9547c65afb64371e2c5b66593d40e3518877.yml
3+
openapi_spec_hash: 8cb05628b456941a4ab8a7e45660b14f
4+
config_hash: f5175e3e1cf0a120b4ef858099d07bc1

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,32 @@
11
# Changelog
22

3+
## 0.1.0-alpha.5 (2025-08-18)
4+
5+
Full Changelog: [v0.1.0-alpha.4...v0.1.0-alpha.5](https://github.com/dedalus-labs/dedalus-sdk-python/compare/v0.1.0-alpha.4...v0.1.0-alpha.5)
6+
7+
### Features
8+
9+
* **api:** api update ([8f0cc6e](https://github.com/dedalus-labs/dedalus-sdk-python/commit/8f0cc6eb025ab9c77959390cf26031383bd07001))
10+
* **api:** chat completions ([8ac1a23](https://github.com/dedalus-labs/dedalus-sdk-python/commit/8ac1a23d9c1c37d4de90073dfad6149c83bba2fa))
11+
* **api:** Config update for dedalus-ai/dev ([628cad2](https://github.com/dedalus-labs/dedalus-sdk-python/commit/628cad286ab5da905070f3b8cfb6745b9d9fa29d))
12+
* **api:** dedalus model update ([5556fa3](https://github.com/dedalus-labs/dedalus-sdk-python/commit/5556fa35efbc79ebca565e2cc343b5352c1b10d7))
13+
* **api:** fixing streaming again ([5941d46](https://github.com/dedalus-labs/dedalus-sdk-python/commit/5941d4689192cd099836d201b386ab1503c1fe2b))
14+
* **api:** logic adj ([a45af92](https://github.com/dedalus-labs/dedalus-sdk-python/commit/a45af925e9dcf78e96759532fefdf107f011177e))
15+
* **api:** manual updates ([c4e5b78](https://github.com/dedalus-labs/dedalus-sdk-python/commit/c4e5b787260c849d231961f5cd22369914f41485))
16+
* **api:** ModelConfig ([984626d](https://github.com/dedalus-labs/dedalus-sdk-python/commit/984626d0bc599656a3cdf9c475f4555d1008983a))
17+
* **api:** polished types ([8630870](https://github.com/dedalus-labs/dedalus-sdk-python/commit/863087056b6ccbdcfd40aaf6d4f4e7f203504e97))
18+
* **api:** spec concise ([a38503a](https://github.com/dedalus-labs/dedalus-sdk-python/commit/a38503a65686e3d621f1824536ec1ab6c81515d3))
19+
* **api:** streaming change ([9a6fd36](https://github.com/dedalus-labs/dedalus-sdk-python/commit/9a6fd36da06e70617706dbd4ca4d5a918eea63bb))
20+
* **api:** to_schema and Model class ([3bd4b91](https://github.com/dedalus-labs/dedalus-sdk-python/commit/3bd4b9173773b28ddda3707dfd0dc2fc408dc0a7))
21+
* **api:** update types ([c4baf45](https://github.com/dedalus-labs/dedalus-sdk-python/commit/c4baf451c36f6148aa9e4ab0bc2e8b47c863a8c4))
22+
23+
24+
### Chores
25+
26+
* **internal:** codegen related update ([11afb95](https://github.com/dedalus-labs/dedalus-sdk-python/commit/11afb95b52fbb39f028b3af9671caf5d3971ecb1))
27+
* **internal:** update comment in script ([9c49fad](https://github.com/dedalus-labs/dedalus-sdk-python/commit/9c49fad176ac16c1b204261229a1e385df62df0f))
28+
* update @stainless-api/prism-cli to v5.15.0 ([ce42854](https://github.com/dedalus-labs/dedalus-sdk-python/commit/ce428545f33a6d02b9b1497a2cd93f4af0cb1740))
29+
330
## 0.1.0-alpha.4 (2025-08-07)
431

532
Full Changelog: [v0.1.0-alpha.3...v0.1.0-alpha.4](https://github.com/dedalus-labs/dedalus-sdk-python/compare/v0.1.0-alpha.3...v0.1.0-alpha.4)

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2025 dedalus
1+
Copyright 2025 Dedalus
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
44

README.md

Lines changed: 91 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ It is generated with [Stainless](https://www.stainless.com/).
1111

1212
## Documentation
1313

14-
The full API of this library can be found in [api.md](api.md).
14+
The REST API documentation can be found on [docs.dedaluslabs.ai](https://docs.dedaluslabs.ai). The full API of this library can be found in [api.md](api.md).
1515

1616
## Installation
1717

@@ -30,18 +30,20 @@ from dedalus_labs import Dedalus
3030

3131
client = Dedalus(
3232
api_key=os.environ.get("DEDALUS_API_KEY"), # This is the default and can be omitted
33+
# or 'production' | 'development'; defaults to "production".
34+
environment="staging",
3335
)
3436

35-
completion = client.chat.create(
36-
input=[
37+
stream_chunk = client.chat.completions.create(
38+
messages=[
3739
{
3840
"role": "user",
39-
"content": "You are Stephen Dedalus. Respond in morose Joycean malaise.",
41+
"content": "Hello, how are you today?",
4042
}
4143
],
42-
model="gpt-4o-mini",
44+
model="openai/gpt-5",
4345
)
44-
print(completion.id)
46+
print(stream_chunk.id)
4547
```
4648

4749
While you can provide an `api_key` keyword argument,
@@ -60,20 +62,22 @@ from dedalus_labs import AsyncDedalus
6062

6163
client = AsyncDedalus(
6264
api_key=os.environ.get("DEDALUS_API_KEY"), # This is the default and can be omitted
65+
# or 'production' | 'development'; defaults to "production".
66+
environment="staging",
6367
)
6468

6569

6670
async def main() -> None:
67-
completion = await client.chat.create(
68-
input=[
71+
stream_chunk = await client.chat.completions.create(
72+
messages=[
6973
{
7074
"role": "user",
71-
"content": "You are Stephen Dedalus. Respond in morose Joycean malaise.",
75+
"content": "Hello, how are you today?",
7276
}
7377
],
74-
model="gpt-4o-mini",
78+
model="openai/gpt-5",
7579
)
76-
print(completion.id)
80+
print(stream_chunk.id)
7781

7882

7983
asyncio.run(main())
@@ -105,21 +109,73 @@ async def main() -> None:
105109
api_key="My API Key",
106110
http_client=DefaultAioHttpClient(),
107111
) as client:
108-
completion = await client.chat.create(
109-
input=[
112+
stream_chunk = await client.chat.completions.create(
113+
messages=[
110114
{
111115
"role": "user",
112-
"content": "You are Stephen Dedalus. Respond in morose Joycean malaise.",
116+
"content": "Hello, how are you today?",
113117
}
114118
],
115-
model="gpt-4o-mini",
119+
model="openai/gpt-5",
116120
)
117-
print(completion.id)
121+
print(stream_chunk.id)
118122

119123

120124
asyncio.run(main())
121125
```
122126

127+
## Streaming responses
128+
129+
We provide support for streaming responses using Server Side Events (SSE).
130+
131+
```python
132+
from dedalus_labs import Dedalus
133+
134+
client = Dedalus()
135+
136+
stream = client.chat.completions.create(
137+
stream=True,
138+
messages=[
139+
{
140+
"role": "system",
141+
"content": "You are Stephen Dedalus. Respond in morose Joycean malaise.",
142+
},
143+
{
144+
"role": "user",
145+
"content": "What do you think of artificial intelligence?",
146+
},
147+
],
148+
model="openai/gpt-5",
149+
)
150+
for stream_chunk in stream:
151+
print(stream_chunk.id)
152+
```
153+
154+
The async client uses the exact same interface.
155+
156+
```python
157+
from dedalus_labs import AsyncDedalus
158+
159+
client = AsyncDedalus()
160+
161+
stream = await client.chat.completions.create(
162+
stream=True,
163+
messages=[
164+
{
165+
"role": "system",
166+
"content": "You are Stephen Dedalus. Respond in morose Joycean malaise.",
167+
},
168+
{
169+
"role": "user",
170+
"content": "What do you think of artificial intelligence?",
171+
},
172+
],
173+
model="openai/gpt-5",
174+
)
175+
async for stream_chunk in stream:
176+
print(stream_chunk.id)
177+
```
178+
123179
## Using types
124180

125181
Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev) which also provide helper methods for things like:
@@ -218,6 +274,25 @@ On timeout, an `APITimeoutError` is thrown.
218274

219275
Note that requests that time out are [retried twice by default](#retries).
220276

277+
## Default Headers
278+
279+
We automatically send the following headers with all requests.
280+
281+
| Header | Value |
282+
| --------------- | ------------- |
283+
| `User-Agent` | `Dedalus-SDK` |
284+
| `X-SDK-Version` | `1.0.0` |
285+
286+
If you need to, you can override these headers by setting default headers per-request or on the client object.
287+
288+
```python
289+
from dedalus_labs import Dedalus
290+
291+
client = Dedalus(
292+
default_headers={"User-Agent": "My-Custom-Value"},
293+
)
294+
```
295+
221296
## Advanced
222297

223298
### Logging

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ or products provided by Dedalus, please follow the respective company's security
2020

2121
### Dedalus Terms and Policies
2222

23-
Please contact founders@dedaluslabs.ai for any questions or concerns regarding the security of our services.
23+
Please contact security@dedaluslabs.ai for any questions or concerns regarding the security of our services.
2424

2525
---
2626

api.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,20 @@ Methods:
3737

3838
# Chat
3939

40+
## Completions
41+
4042
Types:
4143

4244
```python
43-
from dedalus_labs.types import Completion, CompletionRequest, StreamChunk
45+
from dedalus_labs.types.chat import (
46+
ChatCompletionTokenLogprob,
47+
Completion,
48+
CompletionRequest,
49+
StreamChunk,
50+
TopLogprob,
51+
)
4452
```
4553

4654
Methods:
4755

48-
- <code title="post /v1/chat">client.chat.<a href="./src/dedalus_labs/resources/chat.py">create</a>(\*\*<a href="src/dedalus_labs/types/chat_create_params.py">params</a>) -> <a href="./src/dedalus_labs/types/completion.py">Completion</a></code>
56+
- <code title="post /v1/chat/completions">client.chat.completions.<a href="./src/dedalus_labs/resources/chat/completions.py">create</a>(\*\*<a href="src/dedalus_labs/types/chat/completion_create_params.py">params</a>) -> <a href="./src/dedalus_labs/types/chat/stream_chunk.py">StreamChunk</a></code>

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[project]
22
name = "dedalus_labs"
3-
version = "0.1.0-alpha.4"
4-
description = "The official Python library for the dedalus API"
3+
version = "0.1.0-alpha.5"
4+
description = "The official Python library for the Dedalus API"
55
dynamic = ["readme"]
66
license = "MIT"
77
authors = [

scripts/mock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ echo "==> Starting mock server with URL ${URL}"
2121

2222
# Run prism mock on the given spec
2323
if [ "$1" == "--daemon" ]; then
24-
npm exec --package=@stainless-api/prism-cli@5.8.5 -- prism mock "$URL" &> .prism.log &
24+
npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log &
2525

2626
# Wait for server to come online
2727
echo -n "Waiting for server"
@@ -37,5 +37,5 @@ if [ "$1" == "--daemon" ]; then
3737

3838
echo
3939
else
40-
npm exec --package=@stainless-api/prism-cli@5.8.5 -- prism mock "$URL"
40+
npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL"
4141
fi

0 commit comments

Comments
 (0)