Skip to content

Commit 340c853

Browse files
committed
Release 0.8.0b12
1 parent 5a1fe00 commit 340c853

34 files changed

+595
-16
lines changed

poetry.lock

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

reference.md

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -941,6 +941,14 @@ client.prompts.upsert(
941941
<dl>
942942
<dd>
943943

944+
**attributes:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` — Additional fields to describe the Prompt. Helpful to separate Prompt versions from each other with details on how they were created or used.
945+
946+
</dd>
947+
</dl>
948+
949+
<dl>
950+
<dd>
951+
944952
**commit_message:** `typing.Optional[str]` — Message describing the changes made.
945953

946954
</dd>
@@ -2205,6 +2213,14 @@ client.tools.upsert(
22052213
<dl>
22062214
<dd>
22072215

2216+
**attributes:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` — Additional fields to describe the Tool. Helpful to separate Tool versions from each other with details on how they were created or used.
2217+
2218+
</dd>
2219+
</dl>
2220+
2221+
<dl>
2222+
<dd>
2223+
22082224
**tool_type:** `typing.Optional[FilesToolType]` — Type of Tool.
22092225

22102226
</dd>
@@ -3256,6 +3272,14 @@ If `"add"` or `"remove"`, one of the `version_id` or `environment` query paramet
32563272
<dl>
32573273
<dd>
32583274

3275+
**attributes:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` — Additional fields to describe the Dataset. Helpful to separate Dataset versions from each other with details on how they were created or used.
3276+
3277+
</dd>
3278+
</dl>
3279+
3280+
<dl>
3281+
<dd>
3282+
32593283
**commit_message:** `typing.Optional[str]` — Message describing the changes made. If provided, a committed version of the Dataset is created. Otherwise, an uncommitted version is created.
32603284

32613285
</dd>
@@ -4162,6 +4186,123 @@ client.datasets.list_environments(
41624186
</dl>
41634187

41644188

4189+
</dd>
4190+
</dl>
4191+
</details>
4192+
4193+
## Files
4194+
<details><summary><code>client.files.<a href="src/humanloop/files/client.py">list</a>(...)</code></summary>
4195+
<dl>
4196+
<dd>
4197+
4198+
#### 📝 Description
4199+
4200+
<dl>
4201+
<dd>
4202+
4203+
<dl>
4204+
<dd>
4205+
4206+
Get a paginated list of files.
4207+
</dd>
4208+
</dl>
4209+
</dd>
4210+
</dl>
4211+
4212+
#### 🔌 Usage
4213+
4214+
<dl>
4215+
<dd>
4216+
4217+
<dl>
4218+
<dd>
4219+
4220+
```python
4221+
from humanloop import Humanloop
4222+
4223+
client = Humanloop(
4224+
api_key="YOUR_API_KEY",
4225+
)
4226+
client.files.list()
4227+
4228+
```
4229+
</dd>
4230+
</dl>
4231+
</dd>
4232+
</dl>
4233+
4234+
#### ⚙️ Parameters
4235+
4236+
<dl>
4237+
<dd>
4238+
4239+
<dl>
4240+
<dd>
4241+
4242+
**page:** `typing.Optional[int]` — Page offset for pagination.
4243+
4244+
</dd>
4245+
</dl>
4246+
4247+
<dl>
4248+
<dd>
4249+
4250+
**size:** `typing.Optional[int]` — Page size for pagination. Number of files to fetch.
4251+
4252+
</dd>
4253+
</dl>
4254+
4255+
<dl>
4256+
<dd>
4257+
4258+
**name:** `typing.Optional[str]` — Case-insensitive filter for file name.
4259+
4260+
</dd>
4261+
</dl>
4262+
4263+
<dl>
4264+
<dd>
4265+
4266+
**type:** `typing.Optional[typing.Union[FileType, typing.Sequence[FileType]]]` — List of file types to filter for.
4267+
4268+
</dd>
4269+
</dl>
4270+
4271+
<dl>
4272+
<dd>
4273+
4274+
**environment:** `typing.Optional[str]` — Case-sensitive filter for files with a deployment in the specified environment. Requires the environment name.
4275+
4276+
</dd>
4277+
</dl>
4278+
4279+
<dl>
4280+
<dd>
4281+
4282+
**sort_by:** `typing.Optional[ProjectSortBy]` — Field to sort files by
4283+
4284+
</dd>
4285+
</dl>
4286+
4287+
<dl>
4288+
<dd>
4289+
4290+
**order:** `typing.Optional[SortOrder]` — Direction to sort by.
4291+
4292+
</dd>
4293+
</dl>
4294+
4295+
<dl>
4296+
<dd>
4297+
4298+
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
4299+
4300+
</dd>
4301+
</dl>
4302+
</dd>
4303+
</dl>
4304+
4305+
41654306
</dd>
41664307
</dl>
41674308
</details>

src/humanloop/__init__.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
FeedbackType,
5252
FileEnvironmentResponse,
5353
FileEnvironmentResponseFile,
54+
FileType,
5455
FilesToolType,
5556
FunctionTool,
5657
FunctionToolChoice,
@@ -82,6 +83,8 @@
8283
PaginatedDataLogResponse,
8384
PaginatedDataPromptResponse,
8485
PaginatedDataToolResponse,
86+
PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponse,
87+
PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseRecordsItem,
8588
PaginatedDatapointResponse,
8689
PaginatedDatasetResponse,
8790
PaginatedEvaluationResponse,
@@ -133,7 +136,7 @@
133136
VersionStatus,
134137
)
135138
from .errors import UnprocessableEntityError
136-
from . import datasets, evaluations, evaluators, logs, prompts, sessions, tools
139+
from . import datasets, evaluations, evaluators, files, logs, prompts, sessions, tools
137140
from .client import AsyncHumanloop, Humanloop
138141
from .environment import HumanloopEnvironment
139142
from .evaluators import (
@@ -222,6 +225,8 @@
222225
PaginatedDataLogResponseParams,
223226
PaginatedDataPromptResponseParams,
224227
PaginatedDataToolResponseParams,
228+
PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseParams,
229+
PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseRecordsItemParams,
225230
PaginatedDatapointResponseParams,
226231
PaginatedDatasetResponseParams,
227232
PaginatedEvaluationResponseParams,
@@ -361,6 +366,7 @@
361366
"FileEnvironmentResponseFile",
362367
"FileEnvironmentResponseFileParams",
363368
"FileEnvironmentResponseParams",
369+
"FileType",
364370
"FilesToolType",
365371
"FunctionTool",
366372
"FunctionToolChoice",
@@ -418,6 +424,10 @@
418424
"PaginatedDataPromptResponseParams",
419425
"PaginatedDataToolResponse",
420426
"PaginatedDataToolResponseParams",
427+
"PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponse",
428+
"PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseParams",
429+
"PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseRecordsItem",
430+
"PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseRecordsItemParams",
421431
"PaginatedDatapointResponse",
422432
"PaginatedDatapointResponseParams",
423433
"PaginatedDatasetResponse",
@@ -519,6 +529,7 @@
519529
"datasets",
520530
"evaluations",
521531
"evaluators",
532+
"files",
522533
"logs",
523534
"prompts",
524535
"sessions",

src/humanloop/client.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from .prompts.client import PromptsClient
1010
from .tools.client import ToolsClient
1111
from .datasets.client import DatasetsClient
12+
from .files.client import FilesClient
1213
from .evaluations.client import EvaluationsClient
1314
from .evaluators.client import EvaluatorsClient
1415
from .logs.client import LogsClient
@@ -17,6 +18,7 @@
1718
from .prompts.client import AsyncPromptsClient
1819
from .tools.client import AsyncToolsClient
1920
from .datasets.client import AsyncDatasetsClient
21+
from .files.client import AsyncFilesClient
2022
from .evaluations.client import AsyncEvaluationsClient
2123
from .evaluators.client import AsyncEvaluatorsClient
2224
from .logs.client import AsyncLogsClient
@@ -88,6 +90,7 @@ def __init__(
8890
self.prompts = PromptsClient(client_wrapper=self._client_wrapper)
8991
self.tools = ToolsClient(client_wrapper=self._client_wrapper)
9092
self.datasets = DatasetsClient(client_wrapper=self._client_wrapper)
93+
self.files = FilesClient(client_wrapper=self._client_wrapper)
9194
self.evaluations = EvaluationsClient(client_wrapper=self._client_wrapper)
9295
self.evaluators = EvaluatorsClient(client_wrapper=self._client_wrapper)
9396
self.logs = LogsClient(client_wrapper=self._client_wrapper)
@@ -159,6 +162,7 @@ def __init__(
159162
self.prompts = AsyncPromptsClient(client_wrapper=self._client_wrapper)
160163
self.tools = AsyncToolsClient(client_wrapper=self._client_wrapper)
161164
self.datasets = AsyncDatasetsClient(client_wrapper=self._client_wrapper)
165+
self.files = AsyncFilesClient(client_wrapper=self._client_wrapper)
162166
self.evaluations = AsyncEvaluationsClient(client_wrapper=self._client_wrapper)
163167
self.evaluators = AsyncEvaluatorsClient(client_wrapper=self._client_wrapper)
164168
self.logs = AsyncLogsClient(client_wrapper=self._client_wrapper)

src/humanloop/datasets/client.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ def upsert(
151151
path: typing.Optional[str] = OMIT,
152152
id: typing.Optional[str] = OMIT,
153153
action: typing.Optional[UpdateDatesetAction] = OMIT,
154+
attributes: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
154155
commit_message: typing.Optional[str] = OMIT,
155156
request_options: typing.Optional[RequestOptions] = None,
156157
) -> DatasetResponse:
@@ -199,6 +200,9 @@ def upsert(
199200
200201
If `"add"` or `"remove"`, one of the `version_id` or `environment` query parameters may be provided.
201202
203+
attributes : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
204+
Additional fields to describe the Dataset. Helpful to separate Dataset versions from each other with details on how they were created or used.
205+
202206
commit_message : typing.Optional[str]
203207
Message describing the changes made. If provided, a committed version of the Dataset is created. Otherwise, an uncommitted version is created.
204208
@@ -247,6 +251,7 @@ def upsert(
247251
object_=datapoints, annotation=typing.Sequence[CreateDatapointRequestParams]
248252
),
249253
"action": action,
254+
"attributes": attributes,
250255
"commit_message": commit_message,
251256
},
252257
request_options=request_options,
@@ -1151,6 +1156,7 @@ async def upsert(
11511156
path: typing.Optional[str] = OMIT,
11521157
id: typing.Optional[str] = OMIT,
11531158
action: typing.Optional[UpdateDatesetAction] = OMIT,
1159+
attributes: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
11541160
commit_message: typing.Optional[str] = OMIT,
11551161
request_options: typing.Optional[RequestOptions] = None,
11561162
) -> DatasetResponse:
@@ -1199,6 +1205,9 @@ async def upsert(
11991205
12001206
If `"add"` or `"remove"`, one of the `version_id` or `environment` query parameters may be provided.
12011207
1208+
attributes : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
1209+
Additional fields to describe the Dataset. Helpful to separate Dataset versions from each other with details on how they were created or used.
1210+
12021211
commit_message : typing.Optional[str]
12031212
Message describing the changes made. If provided, a committed version of the Dataset is created. Otherwise, an uncommitted version is created.
12041213
@@ -1255,6 +1264,7 @@ async def main() -> None:
12551264
object_=datapoints, annotation=typing.Sequence[CreateDatapointRequestParams]
12561265
),
12571266
"action": action,
1267+
"attributes": attributes,
12581268
"commit_message": commit_message,
12591269
},
12601270
request_options=request_options,

src/humanloop/files/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+

0 commit comments

Comments
 (0)