Skip to content

Commit 268a122

Browse files
committed
Add VAPI agent
1 parent 0889d54 commit 268a122

31 files changed

+987
-168
lines changed

fishjam/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
FishjamClient,
2121
Peer,
2222
PeerOptions,
23+
PeerOptionsVapi,
2324
Room,
2425
RoomOptions,
2526
)
@@ -32,6 +33,7 @@
3233
"receive_binary",
3334
"PeerMetadata",
3435
"PeerOptions",
36+
"PeerOptionsVapi",
3537
"RoomOptions",
3638
"AgentOptions",
3739
"AgentOutputOptions",

fishjam/_openapi_client/api/room/add_peer.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ def _parse_response(
4848
response_401 = Error.from_dict(response.json())
4949

5050
return response_401
51+
if response.status_code == 402:
52+
response_402 = Error.from_dict(response.json())
53+
54+
return response_402
5155
if response.status_code == 404:
5256
response_404 = Error.from_dict(response.json())
5357

fishjam/_openapi_client/api/room/create_room.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ def _parse_response(
4545
response_401 = Error.from_dict(response.json())
4646

4747
return response_401
48+
if response.status_code == 402:
49+
response_402 = Error.from_dict(response.json())
50+
51+
return response_402
4852
if response.status_code == 503:
4953
response_503 = Error.from_dict(response.json())
5054

fishjam/_openapi_client/api/stream/create_stream.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
from ... import errors
77
from ...client import AuthenticatedClient, Client
88
from ...models.error import Error
9-
from ...models.stream import Stream
109
from ...models.stream_config import StreamConfig
10+
from ...models.stream_details_response import StreamDetailsResponse
1111
from ...types import Response
1212

1313

@@ -32,9 +32,9 @@ def _get_kwargs(
3232

3333
def _parse_response(
3434
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
35-
) -> Optional[Union[Error, Stream]]:
35+
) -> Optional[Union[Error, StreamDetailsResponse]]:
3636
if response.status_code == 201:
37-
response_201 = Stream.from_dict(response.json())
37+
response_201 = StreamDetailsResponse.from_dict(response.json())
3838

3939
return response_201
4040
if response.status_code == 400:
@@ -57,7 +57,7 @@ def _parse_response(
5757

5858
def _build_response(
5959
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
60-
) -> Response[Union[Error, Stream]]:
60+
) -> Response[Union[Error, StreamDetailsResponse]]:
6161
return Response(
6262
status_code=HTTPStatus(response.status_code),
6363
content=response.content,
@@ -70,7 +70,7 @@ def sync_detailed(
7070
*,
7171
client: AuthenticatedClient,
7272
body: StreamConfig,
73-
) -> Response[Union[Error, Stream]]:
73+
) -> Response[Union[Error, StreamDetailsResponse]]:
7474
"""Creates stream
7575
7676
Args:
@@ -81,7 +81,7 @@ def sync_detailed(
8181
httpx.TimeoutException: If the request takes longer than Client.timeout.
8282
8383
Returns:
84-
Response[Union[Error, Stream]]
84+
Response[Union[Error, StreamDetailsResponse]]
8585
"""
8686

8787
kwargs = _get_kwargs(
@@ -99,7 +99,7 @@ def sync(
9999
*,
100100
client: AuthenticatedClient,
101101
body: StreamConfig,
102-
) -> Optional[Union[Error, Stream]]:
102+
) -> Optional[Union[Error, StreamDetailsResponse]]:
103103
"""Creates stream
104104
105105
Args:
@@ -110,7 +110,7 @@ def sync(
110110
httpx.TimeoutException: If the request takes longer than Client.timeout.
111111
112112
Returns:
113-
Union[Error, Stream]
113+
Union[Error, StreamDetailsResponse]
114114
"""
115115

116116
return sync_detailed(
@@ -123,7 +123,7 @@ async def asyncio_detailed(
123123
*,
124124
client: AuthenticatedClient,
125125
body: StreamConfig,
126-
) -> Response[Union[Error, Stream]]:
126+
) -> Response[Union[Error, StreamDetailsResponse]]:
127127
"""Creates stream
128128
129129
Args:
@@ -134,7 +134,7 @@ async def asyncio_detailed(
134134
httpx.TimeoutException: If the request takes longer than Client.timeout.
135135
136136
Returns:
137-
Response[Union[Error, Stream]]
137+
Response[Union[Error, StreamDetailsResponse]]
138138
"""
139139

140140
kwargs = _get_kwargs(
@@ -150,7 +150,7 @@ async def asyncio(
150150
*,
151151
client: AuthenticatedClient,
152152
body: StreamConfig,
153-
) -> Optional[Union[Error, Stream]]:
153+
) -> Optional[Union[Error, StreamDetailsResponse]]:
154154
"""Creates stream
155155
156156
Args:
@@ -161,7 +161,7 @@ async def asyncio(
161161
httpx.TimeoutException: If the request takes longer than Client.timeout.
162162
163163
Returns:
164-
Union[Error, Stream]
164+
Union[Error, StreamDetailsResponse]
165165
"""
166166

167167
return (

fishjam/_openapi_client/api/stream/get_stream.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from ... import errors
77
from ...client import AuthenticatedClient, Client
88
from ...models.error import Error
9-
from ...models.stream import Stream
9+
from ...models.stream_details_response import StreamDetailsResponse
1010
from ...types import Response
1111

1212

@@ -25,9 +25,9 @@ def _get_kwargs(
2525

2626
def _parse_response(
2727
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
28-
) -> Optional[Union[Error, Stream]]:
28+
) -> Optional[Union[Error, StreamDetailsResponse]]:
2929
if response.status_code == 200:
30-
response_200 = Stream.from_dict(response.json())
30+
response_200 = StreamDetailsResponse.from_dict(response.json())
3131

3232
return response_200
3333
if response.status_code == 401:
@@ -50,7 +50,7 @@ def _parse_response(
5050

5151
def _build_response(
5252
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
53-
) -> Response[Union[Error, Stream]]:
53+
) -> Response[Union[Error, StreamDetailsResponse]]:
5454
return Response(
5555
status_code=HTTPStatus(response.status_code),
5656
content=response.content,
@@ -63,7 +63,7 @@ def sync_detailed(
6363
stream_id: str,
6464
*,
6565
client: AuthenticatedClient,
66-
) -> Response[Union[Error, Stream]]:
66+
) -> Response[Union[Error, StreamDetailsResponse]]:
6767
"""Shows information about the stream
6868
6969
Args:
@@ -74,7 +74,7 @@ def sync_detailed(
7474
httpx.TimeoutException: If the request takes longer than Client.timeout.
7575
7676
Returns:
77-
Response[Union[Error, Stream]]
77+
Response[Union[Error, StreamDetailsResponse]]
7878
"""
7979

8080
kwargs = _get_kwargs(
@@ -92,7 +92,7 @@ def sync(
9292
stream_id: str,
9393
*,
9494
client: AuthenticatedClient,
95-
) -> Optional[Union[Error, Stream]]:
95+
) -> Optional[Union[Error, StreamDetailsResponse]]:
9696
"""Shows information about the stream
9797
9898
Args:
@@ -103,7 +103,7 @@ def sync(
103103
httpx.TimeoutException: If the request takes longer than Client.timeout.
104104
105105
Returns:
106-
Union[Error, Stream]
106+
Union[Error, StreamDetailsResponse]
107107
"""
108108

109109
return sync_detailed(
@@ -116,7 +116,7 @@ async def asyncio_detailed(
116116
stream_id: str,
117117
*,
118118
client: AuthenticatedClient,
119-
) -> Response[Union[Error, Stream]]:
119+
) -> Response[Union[Error, StreamDetailsResponse]]:
120120
"""Shows information about the stream
121121
122122
Args:
@@ -127,7 +127,7 @@ async def asyncio_detailed(
127127
httpx.TimeoutException: If the request takes longer than Client.timeout.
128128
129129
Returns:
130-
Response[Union[Error, Stream]]
130+
Response[Union[Error, StreamDetailsResponse]]
131131
"""
132132

133133
kwargs = _get_kwargs(
@@ -143,7 +143,7 @@ async def asyncio(
143143
stream_id: str,
144144
*,
145145
client: AuthenticatedClient,
146-
) -> Optional[Union[Error, Stream]]:
146+
) -> Optional[Union[Error, StreamDetailsResponse]]:
147147
"""Shows information about the stream
148148
149149
Args:
@@ -154,7 +154,7 @@ async def asyncio(
154154
httpx.TimeoutException: If the request takes longer than Client.timeout.
155155
156156
Returns:
157-
Union[Error, Stream]
157+
Union[Error, StreamDetailsResponse]
158158
"""
159159

160160
return (

fishjam/_openapi_client/api/streamer/create_streamer.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from ... import errors
77
from ...client import AuthenticatedClient, Client
88
from ...models.error import Error
9-
from ...models.streamer import Streamer
9+
from ...models.streamer_details_response import StreamerDetailsResponse
1010
from ...types import Response
1111

1212

@@ -25,9 +25,9 @@ def _get_kwargs(
2525

2626
def _parse_response(
2727
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
28-
) -> Optional[Union[Error, Streamer]]:
28+
) -> Optional[Union[Error, StreamerDetailsResponse]]:
2929
if response.status_code == 201:
30-
response_201 = Streamer.from_dict(response.json())
30+
response_201 = StreamerDetailsResponse.from_dict(response.json())
3131

3232
return response_201
3333
if response.status_code == 401:
@@ -50,7 +50,7 @@ def _parse_response(
5050

5151
def _build_response(
5252
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
53-
) -> Response[Union[Error, Streamer]]:
53+
) -> Response[Union[Error, StreamerDetailsResponse]]:
5454
return Response(
5555
status_code=HTTPStatus(response.status_code),
5656
content=response.content,
@@ -63,7 +63,7 @@ def sync_detailed(
6363
stream_id: str,
6464
*,
6565
client: AuthenticatedClient,
66-
) -> Response[Union[Error, Streamer]]:
66+
) -> Response[Union[Error, StreamerDetailsResponse]]:
6767
"""Creates streamer
6868
6969
Args:
@@ -74,7 +74,7 @@ def sync_detailed(
7474
httpx.TimeoutException: If the request takes longer than Client.timeout.
7575
7676
Returns:
77-
Response[Union[Error, Streamer]]
77+
Response[Union[Error, StreamerDetailsResponse]]
7878
"""
7979

8080
kwargs = _get_kwargs(
@@ -92,7 +92,7 @@ def sync(
9292
stream_id: str,
9393
*,
9494
client: AuthenticatedClient,
95-
) -> Optional[Union[Error, Streamer]]:
95+
) -> Optional[Union[Error, StreamerDetailsResponse]]:
9696
"""Creates streamer
9797
9898
Args:
@@ -103,7 +103,7 @@ def sync(
103103
httpx.TimeoutException: If the request takes longer than Client.timeout.
104104
105105
Returns:
106-
Union[Error, Streamer]
106+
Union[Error, StreamerDetailsResponse]
107107
"""
108108

109109
return sync_detailed(
@@ -116,7 +116,7 @@ async def asyncio_detailed(
116116
stream_id: str,
117117
*,
118118
client: AuthenticatedClient,
119-
) -> Response[Union[Error, Streamer]]:
119+
) -> Response[Union[Error, StreamerDetailsResponse]]:
120120
"""Creates streamer
121121
122122
Args:
@@ -127,7 +127,7 @@ async def asyncio_detailed(
127127
httpx.TimeoutException: If the request takes longer than Client.timeout.
128128
129129
Returns:
130-
Response[Union[Error, Streamer]]
130+
Response[Union[Error, StreamerDetailsResponse]]
131131
"""
132132

133133
kwargs = _get_kwargs(
@@ -143,7 +143,7 @@ async def asyncio(
143143
stream_id: str,
144144
*,
145145
client: AuthenticatedClient,
146-
) -> Optional[Union[Error, Streamer]]:
146+
) -> Optional[Union[Error, StreamerDetailsResponse]]:
147147
"""Creates streamer
148148
149149
Args:
@@ -154,7 +154,7 @@ async def asyncio(
154154
httpx.TimeoutException: If the request takes longer than Client.timeout.
155155
156156
Returns:
157-
Union[Error, Streamer]
157+
Union[Error, StreamerDetailsResponse]
158158
"""
159159

160160
return (
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Contains endpoint functions for accessing the API"""

0 commit comments

Comments
 (0)