Skip to content

Commit dbe0fb9

Browse files
Update 2025-06-05 (friendliai#63)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 3bb202e commit dbe0fb9

13 files changed

Lines changed: 1383 additions & 192 deletions

File tree

.speakeasy/gen.lock

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
lockVersion: 2.0.0
22
id: 37076cef-26b6-4da9-bb49-e710061cab77
33
management:
4-
docChecksum: 10eeeafdfa9bf84e4c034d8c4464fdbd
4+
docChecksum: 394eead63f70eaaeb118d6663db1a426
55
docVersion: 0.1.0
66
speakeasyVersion: 1.548.3
77
generationVersion: 2.605.6
8-
releaseVersion: 0.10.0
9-
configChecksum: cd3fabc1f6e72d72d80f2e467a4be20d
8+
releaseVersion: 0.10.1
9+
configChecksum: da867d28e85c89ff5b8a4ec27ab8b40e
1010
repoURL: https://github.com/friendliai/friendli-python.git
1111
installationURL: https://github.com/friendliai/friendli-python.git
12+
published: true
1213
features:
1314
python:
1415
additionalDependencies: 1.0.0

.speakeasy/gen.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ generation:
1616
oAuth2ClientCredentialsEnabled: true
1717
oAuth2PasswordEnabled: true
1818
python:
19-
version: 0.10.0
19+
version: 0.10.1
2020
additionalDependencies:
2121
dev: {}
2222
main: {}

.speakeasy/workflow.lock

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@ speakeasyVersion: 1.548.3
22
sources:
33
Friendli-API-Schema:
44
sourceNamespace: friendli-api-schema
5-
sourceRevisionDigest: sha256:0edcd928bef3a876471d95af46bb05cb1a7c47cede6eb4cc2ca3c249204e8d7e
6-
sourceBlobDigest: sha256:e2d9c85d9f4cc5819b2b109f919e692d2fa9baa2833b19257fa01dc9bbd3aa43
5+
sourceRevisionDigest: sha256:a08513faaad341054f136a6954151ad144fa18b593e64ed3a9bb0079b49a1bfb
6+
sourceBlobDigest: sha256:9fd7c5cd47290161ef36478f317089db122919843273f8b426fef6bc85b5c3fe
77
tags:
88
- latest
99
targets:
1010
friendli:
1111
source: Friendli-API-Schema
1212
sourceNamespace: friendli-api-schema
13-
sourceRevisionDigest: sha256:0edcd928bef3a876471d95af46bb05cb1a7c47cede6eb4cc2ca3c249204e8d7e
14-
sourceBlobDigest: sha256:e2d9c85d9f4cc5819b2b109f919e692d2fa9baa2833b19257fa01dc9bbd3aa43
13+
sourceRevisionDigest: sha256:a08513faaad341054f136a6954151ad144fa18b593e64ed3a9bb0079b49a1bfb
14+
sourceBlobDigest: sha256:9fd7c5cd47290161ef36478f317089db122919843273f8b426fef6bc85b5c3fe
15+
codeSamplesNamespace: friendli-api-schema-code-samples
16+
codeSamplesRevisionDigest: sha256:d1b929640e67dba633c588e7f4a8ce925a6f71914d79dd5b1c12ba62f3d58999
1517
workflow:
1618
workflowVersion: 1.0.0
1719
speakeasyVersion: 1.548.3
@@ -25,11 +27,10 @@ workflow:
2527
friendli:
2628
target: python
2729
source: Friendli-API-Schema
28-
publish:
29-
pypi:
30-
token: $pypi_token
31-
codeSamples:
32-
registry:
33-
location: registry.speakeasyapi.dev/friendliai/friendliai/friendli-api-schema-code-samples
34-
blocking: false
35-
30+
publish:
31+
pypi:
32+
token: $pypi_token
33+
codeSamples:
34+
registry:
35+
location: registry.speakeasyapi.dev/friendliai/friendliai/friendli-api-schema-code-samples
36+
blocking: false

README.md

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@ When using Friendli Python SDK, you need to provide a Friendli Token for authent
4343
<!-- Start SDK Installation [installation] -->
4444
## SDK Installation
4545

46-
> [!TIP]
47-
> To finish publishing your SDK to PyPI you must [run your first generation action](https://www.speakeasy.com/docs/github-setup#step-by-step-guide).
48-
49-
5046
> [!NOTE]
5147
> **Python version upgrade policy**
5248
>
@@ -269,7 +265,7 @@ from friendli import SyncFriendli
269265
with SyncFriendli(
270266
token=os.getenv("FRIENDLI_TOKEN", ""),
271267
) as friendli:
272-
res = friendli.container.chat.complete(
268+
res = friendli.dedicated.chat.complete(
273269
messages=[
274270
{
275271
"content": "You are a helpful assistant.",
@@ -429,7 +425,7 @@ with SyncFriendli(
429425
operations. These operations will expose the stream as [Generator][generator] that
430426
can be consumed using a simple `for` loop. The loop will
431427
terminate when the server no longer has any events to send and closes the
432-
underlying connection.
428+
underlying connection.
433429

434430
The stream is also a [Context Manager][context-manager] and can be used with the `with` statement and will close the
435431
underlying connection when the context is exited.
@@ -442,7 +438,7 @@ from friendli import SyncFriendli
442438
with SyncFriendli(
443439
token=os.getenv("FRIENDLI_TOKEN", ""),
444440
) as friendli:
445-
res = friendli.container.chat.stream(
441+
res = friendli.dedicated.chat.stream(
446442
messages=[
447443
{
448444
"content": "You are a helpful assistant.",
@@ -453,8 +449,8 @@ with SyncFriendli(
453449
"role": "user",
454450
},
455451
],
452+
model="(endpoint-id)",
456453
max_tokens=200,
457-
model="(adapter-route)",
458454
)
459455

460456
with res as event_stream:
@@ -515,7 +511,7 @@ from friendli.utils import BackoffStrategy, RetryConfig
515511
with SyncFriendli(
516512
token=os.getenv("FRIENDLI_TOKEN", ""),
517513
) as friendli:
518-
res = friendli.container.chat.complete(
514+
res = friendli.dedicated.chat.complete(
519515
messages=[
520516
{
521517
"content": "You are a helpful assistant.",
@@ -546,7 +542,7 @@ with SyncFriendli(
546542
retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False),
547543
token=os.getenv("FRIENDLI_TOKEN", ""),
548544
) as friendli:
549-
res = friendli.container.chat.complete(
545+
res = friendli.dedicated.chat.complete(
550546
messages=[
551547
{
552548
"content": "You are a helpful assistant.",
@@ -628,7 +624,7 @@ with SyncFriendli(
628624
server_url="https://api.friendli.ai",
629625
token=os.getenv("FRIENDLI_TOKEN", ""),
630626
) as friendli:
631-
res = friendli.container.chat.complete(
627+
res = friendli.dedicated.chat.complete(
632628
messages=[
633629
{
634630
"content": "You are a helpful assistant.",
@@ -658,7 +654,7 @@ from friendli import SyncFriendli
658654
with SyncFriendli(
659655
token=os.getenv("FRIENDLI_TOKEN", ""),
660656
) as friendli:
661-
res = friendli.container.chat.complete(
657+
res = friendli.dedicated.chat.complete(
662658
messages=[
663659
{
664660
"content": "You are a helpful assistant.",

docs/models/addsamplesrequest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
| `dataset_id` | *str* | :heavy_check_mark: | ID of the dataset. |
99
| `split_id` | *str* | :heavy_check_mark: | ID of the split. |
1010
| `x_friendli_team` | *OptionalNullable[str]* | :heavy_minus_sign: | ID of team to run requests as (optional parameter). |
11-
| `request_body` | List[*bytes*] | :heavy_check_mark: | N/A |
11+
| `request_body` | List[*str*] | :heavy_check_mark: | N/A |

docs/sdks/dataset/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -529,9 +529,9 @@ with SyncFriendli(
529529
dataset_id="304268",
530530
split_id="345943",
531531
request_body=[
532-
"0xA76F67a260".encode(),
533-
"0x0274A1ADf1".encode(),
534-
"0x626BF2e0Df".encode(),
532+
"0xA76F67a260",
533+
"0x0274A1ADf1",
534+
"0x626BF2e0Df",
535535
],
536536
)
537537

@@ -545,7 +545,7 @@ with SyncFriendli(
545545
| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- |
546546
| `dataset_id` | *str* | :heavy_check_mark: | ID of the dataset. |
547547
| `split_id` | *str* | :heavy_check_mark: | ID of the split. |
548-
| `request_body` | List[*bytes*] | :heavy_check_mark: | N/A |
548+
| `request_body` | List[*str*] | :heavy_check_mark: | N/A |
549549
| `x_friendli_team` | *OptionalNullable[str]* | :heavy_minus_sign: | ID of team to run requests as (optional parameter). |
550550
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
551551

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "friendli"
3-
version = "0.10.0"
3+
version = "0.10.1"
44
description = "Python Client SDK Generated by Speakeasy."
55
authors = [{ name = "Speakeasy" },]
66
readme = "README-PYPI.md"

0 commit comments

Comments
 (0)