Skip to content

Commit 3024ac7

Browse files
revert ci version
1 parent b398b55 commit 3024ac7

2 files changed

Lines changed: 106 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: ci
33
on: [push]
44
jobs:
55
compile:
6-
runs-on: ubuntu-20.04
6+
runs-on: ubuntu-22.04
77
steps:
88
- name: Checkout repo
99
uses: actions/checkout@v3
@@ -19,7 +19,7 @@ jobs:
1919
- name: Compile
2020
run: poetry run mypy .
2121
test:
22-
runs-on: ubuntu-20.04
22+
runs-on: ubuntu-22.04
2323
steps:
2424
- name: Checkout repo
2525
uses: actions/checkout@v3
@@ -39,7 +39,7 @@ jobs:
3939
publish:
4040
needs: [compile, test]
4141
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
42-
runs-on: ubuntu-20.04
42+
runs-on: ubuntu-22.04
4343
steps:
4444
- name: Checkout repo
4545
uses: actions/checkout@v3

src/truefoundry_sdk/client.py

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+
3+
import typing
4+
import os
5+
import httpx
6+
7+
from truefoundry_sdk.base_client import AsyncBaseTrueFoundry, BaseTrueFoundry
8+
from truefoundry_sdk.v1._wrapped_clients import (
9+
WrappedAgentVersionsClient,
10+
WrappedArtifactVersionsClient,
11+
WrappedModelVersionsClient,
12+
WrappedPromptVersionsClient,
13+
WrappedToolVersionsClient,
14+
WrappedWorkspacesClient,
15+
WrappedAsyncAgentVersionsClient,
16+
WrappedAsyncArtifactVersionsClient,
17+
WrappedAsyncModelVersionsClient,
18+
WrappedAsyncPromptVersionsClient,
19+
WrappedAsyncToolVersionsClient,
20+
WrappedAsyncWorkspacesClient,
21+
)
22+
23+
24+
class TrueFoundry(BaseTrueFoundry):
25+
def __init__(
26+
self,
27+
*,
28+
base_url: str,
29+
api_key: typing.Optional[
30+
typing.Union[str, typing.Callable[[], str]]
31+
] = os.getenv("TFY_API_KEY"),
32+
timeout: typing.Optional[float] = None,
33+
follow_redirects: typing.Optional[bool] = True,
34+
httpx_client: typing.Optional[httpx.Client] = None,
35+
):
36+
super().__init__(
37+
base_url=base_url,
38+
api_key=api_key,
39+
timeout=timeout,
40+
follow_redirects=follow_redirects,
41+
httpx_client=httpx_client,
42+
)
43+
self.v1.agent_versions = WrappedAgentVersionsClient(
44+
client_wrapper=self.v1._client_wrapper
45+
)
46+
self.v1.artifact_versions = WrappedArtifactVersionsClient(
47+
client_wrapper=self.v1._client_wrapper
48+
)
49+
self.v1.model_versions = WrappedModelVersionsClient(
50+
client_wrapper=self.v1._client_wrapper
51+
)
52+
self.v1.prompt_versions = WrappedPromptVersionsClient(
53+
client_wrapper=self.v1._client_wrapper
54+
)
55+
self.v1.tool_versions = WrappedToolVersionsClient(
56+
client_wrapper=self.v1._client_wrapper
57+
)
58+
self.v1.workspaces = WrappedWorkspacesClient(
59+
client_wrapper=self.v1._client_wrapper
60+
)
61+
62+
63+
class AsyncTrueFoundry(AsyncBaseTrueFoundry):
64+
def __init__(
65+
self,
66+
*,
67+
base_url: str,
68+
api_key: typing.Optional[
69+
typing.Union[str, typing.Callable[[], str]]
70+
] = os.getenv("TFY_API_KEY"),
71+
timeout: typing.Optional[float] = None,
72+
follow_redirects: typing.Optional[bool] = True,
73+
httpx_client: typing.Optional[httpx.AsyncClient] = None,
74+
):
75+
super().__init__(
76+
base_url=base_url,
77+
api_key=api_key,
78+
timeout=timeout,
79+
follow_redirects=follow_redirects,
80+
httpx_client=httpx_client,
81+
)
82+
self.v1.agent_versions = WrappedAsyncAgentVersionsClient(
83+
client_wrapper=self.v1._client_wrapper
84+
)
85+
self.v1.artifact_versions = WrappedAsyncArtifactVersionsClient(
86+
client_wrapper=self.v1._client_wrapper
87+
)
88+
self.v1.model_versions = WrappedAsyncModelVersionsClient(
89+
client_wrapper=self.v1._client_wrapper
90+
)
91+
self.v1.prompt_versions = WrappedAsyncPromptVersionsClient(
92+
client_wrapper=self.v1._client_wrapper
93+
)
94+
self.v1.tool_versions = WrappedAsyncToolVersionsClient(
95+
client_wrapper=self.v1._client_wrapper
96+
)
97+
self.v1.workspaces = WrappedAsyncWorkspacesClient(
98+
client_wrapper=self.v1._client_wrapper
99+
)
100+
101+
102+
TrueFoundry.__doc__ = BaseTrueFoundry.__doc__
103+
AsyncTrueFoundry.__doc__ = AsyncBaseTrueFoundry.__doc__

0 commit comments

Comments
 (0)