From 213b4de45d065901c20a04be33a8cf18bda26bf3 Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Tue, 15 Apr 2025 20:01:09 +0000 Subject: [PATCH 1/2] Release 0.8.20 --- package.json | 50 +- reference.md | 2810 +++++++++++++---- src/Client.ts | 6 + src/api/resources/agents/client/Client.ts | 1754 ++++++++++ src/api/resources/agents/client/index.ts | 1 + .../agents/client/requests/AgentLogRequest.ts | 90 + .../agents/client/requests/AgentRequest.ts | 70 + .../client/requests/AgentsCallRequest.ts | 64 + .../requests/AgentsCallStreamRequest.ts | 64 + .../client/requests/AgentsContinueRequest.ts | 23 + .../requests/AgentsContinueStreamRequest.ts | 23 + .../client/requests/GetAgentsIdGetRequest.ts | 18 + .../client/requests/ListAgentsGetRequest.ts | 36 + .../ListVersionsAgentsIdVersionsGetRequest.ts | 14 + ...sIdEnvironmentsEnvironmentIdPostRequest.ts | 16 + .../client/requests/UpdateAgentLogRequest.ts | 24 + .../client/requests/UpdateAgentRequest.ts | 16 + .../resources/agents/client/requests/index.ts | 12 + src/api/resources/agents/index.ts | 2 + .../agents/types/AgentLogRequestToolChoice.ts | 14 + .../types/AgentRequestReasoningEffort.ts | 10 + .../agents/types/AgentRequestStop.ts | 8 + .../agents/types/AgentRequestTemplate.ts | 15 + .../agents/types/AgentRequestToolsItem.ts | 7 + .../types/AgentsCallRequestToolChoice.ts | 14 + .../AgentsCallStreamRequestToolChoice.ts | 14 + src/api/resources/agents/types/index.ts | 7 + src/api/resources/datasets/client/Client.ts | 149 +- ...odyUploadCsvDatasetsIdDatapointsCsvPost.ts | 10 +- .../client/requests/DatasetRequest.ts | 12 +- ...istVersionsDatasetsIdVersionsGetRequest.ts | 12 +- src/api/resources/datasets/index.ts | 1 + ...tsIdVersionsGetRequestIncludeDatapoints.ts | 12 + src/api/resources/datasets/types/index.ts | 1 + .../resources/directories/client/Client.ts | 20 +- .../resources/evaluations/client/Client.ts | 56 +- src/api/resources/evaluators/client/Client.ts | 121 +- .../client/requests/EvaluatorRequest.ts | 9 +- ...tVersionsEvaluatorsIdVersionsGetRequest.ts | 6 - src/api/resources/files/client/Client.ts | 12 +- ...veByPathFilesRetrieveByPathPostResponse.ts | 3 +- src/api/resources/flows/client/Client.ts | 127 +- .../flows/client/requests/FlowRequest.ts | 9 +- .../ListVersionsFlowsIdVersionsGetRequest.ts | 10 +- src/api/resources/index.ts | 6 +- src/api/resources/logs/client/Client.ts | 12 +- src/api/resources/prompts/client/Client.ts | 151 +- ...ListVersionsPromptsIdVersionsGetRequest.ts | 10 +- ...> PopulatePromptsIdPopulatePostRequest.ts} | 2 +- .../client/requests/PromptLogRequest.ts | 2 +- .../client/requests/PromptLogUpdateRequest.ts | 2 +- .../prompts/client/requests/PromptRequest.ts | 13 +- .../client/requests/PromptsCallRequest.ts | 2 +- .../requests/PromptsCallStreamRequest.ts | 2 +- .../prompts/client/requests/index.ts | 2 +- .../types/PromptLogRequestToolChoice.ts | 2 +- .../types/PromptLogUpdateRequestToolChoice.ts | 2 +- .../types/PromptRequestReasoningEffort.ts | 10 + .../types/PromptsCallRequestToolChoice.ts | 2 +- .../PromptsCallStreamRequestToolChoice.ts | 2 +- src/api/resources/prompts/types/index.ts | 1 + src/api/resources/tools/client/Client.ts | 497 ++- .../ListVersionsToolsIdVersionsGetRequest.ts | 10 +- .../tools/client/requests/ToolCallRequest.ts | 50 + .../tools/client/requests/ToolLogRequest.ts | 4 +- .../tools/client/requests/ToolRequest.ts | 9 +- .../resources/tools/client/requests/index.ts | 1 + src/api/types/AgentCallResponse.ts | 53 + src/api/types/AgentCallResponseToolChoice.ts | 14 + src/api/types/AgentCallStreamResponse.ts | 15 + .../types/AgentCallStreamResponsePayload.ts | 7 + src/api/types/AgentContinueResponse.ts | 53 + .../types/AgentContinueResponseToolChoice.ts | 14 + src/api/types/AgentContinueStreamResponse.ts | 15 + .../AgentContinueStreamResponsePayload.ts | 10 + src/api/types/AgentInlineTool.ts | 11 + src/api/types/AgentKernelRequest.ts | 55 + .../AgentKernelRequestReasoningEffort.ts | 10 + src/api/types/AgentKernelRequestStop.ts | 8 + src/api/types/AgentKernelRequestTemplate.ts | 15 + src/api/types/AgentKernelRequestToolsItem.ts | 7 + src/api/types/AgentLinkedFileRequest.ts | 11 + src/api/types/AgentLinkedFileResponse.ts | 12 + ...Item.ts => AgentLinkedFileResponseFile.ts} | 5 +- src/api/types/AgentLogResponse.ts | 87 + src/api/types/AgentLogResponseToolChoice.ts | 14 + src/api/types/AgentLogStreamResponse.ts | 41 + src/api/types/AgentResponse.ts | 103 + src/api/types/AgentResponseReasoningEffort.ts | 10 + src/api/types/AgentResponseStop.ts | 8 + src/api/types/AgentResponseTemplate.ts | 15 + src/api/types/AgentResponseToolsItem.ts | 7 + .../types/AnthropicRedactedThinkingContent.ts | 9 + src/api/types/AnthropicThinkingContent.ts | 11 + src/api/types/ChatMessage.ts | 2 + src/api/types/ChatMessageThinkingItem.ts | 7 + src/api/types/CommitRequest.ts | 8 - src/api/types/CreateAgentLogResponse.ts | 19 + src/api/types/DatasetResponse.ts | 14 +- ...WithParentsAndChildrenResponseFilesItem.ts | 3 +- src/api/types/EvaluatorResponse.ts | 13 +- src/api/types/EventType.ts | 34 + src/api/types/FileEnvironmentResponseFile.ts | 3 +- .../types/FileEnvironmentVariableRequest.ts | 10 + src/api/types/FileType.ts | 3 +- src/api/types/FilesToolType.ts | 10 +- src/api/types/FlowResponse.ts | 14 +- src/api/types/LinkedFileRequest.ts | 9 + src/api/types/ListAgents.ts | 10 + src/api/types/LogResponse.ts | 3 +- src/api/types/LogStreamResponse.ts | 7 + src/api/types/ModelProviders.ts | 20 +- ...ningEffort.ts => OpenAiReasoningEffort.ts} | 4 +- src/api/types/PaginatedDataAgentResponse.ts | 12 + ...uatorResponseFlowResponseAgentResponse.ts} | 4 +- ...nseFlowResponseAgentResponseRecordsItem.ts | 14 + src/api/types/PopulateTemplateResponse.ts | 18 +- ...PopulateTemplateResponseReasoningEffort.ts | 10 + src/api/types/PromptCallResponse.ts | 2 +- src/api/types/PromptCallResponseToolChoice.ts | 2 +- src/api/types/PromptKernelRequest.ts | 9 +- .../PromptKernelRequestReasoningEffort.ts | 10 + src/api/types/PromptLogResponse.ts | 2 +- src/api/types/PromptLogResponseToolChoice.ts | 2 +- src/api/types/PromptResponse.ts | 18 +- .../types/PromptResponseReasoningEffort.ts | 10 + src/api/types/RunVersionResponse.ts | 3 +- src/api/types/StopAgentEnum.ts | 12 + src/api/types/ToolCallResponse.ts | 63 + src/api/types/ToolResponse.ts | 12 +- src/api/types/UpdateVersionRequest.ts | 10 + .../types/VersionDeploymentResponseFile.ts | 3 +- src/api/types/VersionIdResponseVersion.ts | 3 +- src/api/types/index.ts | 48 +- .../resources/agents/client/index.ts | 2 + .../agents/client/listEnvironments.ts | 17 + .../agents/client/requests/AgentLogRequest.ts | 92 + .../agents/client/requests/AgentRequest.ts | 74 + .../client/requests/AgentsCallRequest.ts | 61 + .../requests/AgentsCallStreamRequest.ts | 64 + .../client/requests/AgentsContinueRequest.ts | 26 + .../requests/AgentsContinueStreamRequest.ts | 26 + .../client/requests/UpdateAgentLogRequest.ts | 32 + .../client/requests/UpdateAgentRequest.ts | 24 + .../resources/agents/client/requests/index.ts | 8 + src/serialization/resources/agents/index.ts | 2 + .../agents/types/AgentLogRequestToolChoice.ts | 22 + .../types/AgentRequestReasoningEffort.ts | 17 + .../agents/types/AgentRequestStop.ts | 17 + .../agents/types/AgentRequestTemplate.ts | 17 + .../agents/types/AgentRequestToolsItem.ts | 18 + .../types/AgentsCallRequestToolChoice.ts | 22 + .../AgentsCallStreamRequestToolChoice.ts | 22 + .../resources/agents/types/index.ts | 7 + .../client/requests/DatasetRequest.ts | 6 +- src/serialization/resources/datasets/index.ts | 1 + ...tsIdVersionsGetRequestIncludeDatapoints.ts | 16 + .../resources/datasets/types/index.ts | 1 + .../client/requests/EvaluatorRequest.ts | 6 +- ...veByPathFilesRetrieveByPathPostResponse.ts | 4 +- .../flows/client/requests/FlowRequest.ts | 6 +- src/serialization/resources/index.ts | 6 +- .../resources/prompts/client/index.ts | 2 +- .../{populateTemplate.ts => populate.ts} | 2 +- .../prompts/client/requests/PromptRequest.ts | 12 +- .../types/PromptRequestReasoningEffort.ts | 17 + .../resources/prompts/types/index.ts | 1 + .../tools/client/addEnvironmentVariable.ts | 26 + .../tools/client/deleteEnvironmentVariable.ts | 17 + .../tools/client/getEnvironmentVariables.ts | 17 + .../resources/tools/client/index.ts | 3 + .../tools/client/requests/ToolCallRequest.ts | 50 + .../tools/client/requests/ToolLogRequest.ts | 6 +- .../tools/client/requests/ToolRequest.ts | 6 +- .../resources/tools/client/requests/index.ts | 1 + src/serialization/types/AgentCallResponse.ts | 58 + .../types/AgentCallResponseToolChoice.ts | 22 + .../types/AgentCallStreamResponse.ts | 28 + .../types/AgentCallStreamResponsePayload.ts | 22 + .../types/AgentContinueResponse.ts | 58 + .../types/AgentContinueResponseToolChoice.ts | 22 + .../types/AgentContinueStreamResponse.ts | 28 + .../AgentContinueStreamResponsePayload.ts | 22 + src/serialization/types/AgentInlineTool.ts | 26 + src/serialization/types/AgentKernelRequest.ts | 62 + .../AgentKernelRequestReasoningEffort.ts | 17 + .../types/AgentKernelRequestStop.ts | 19 + .../types/AgentKernelRequestTemplate.ts | 17 + .../types/AgentKernelRequestToolsItem.ts | 18 + .../types/AgentLinkedFileRequest.ts | 26 + .../types/AgentLinkedFileResponse.ts | 28 + .../types/AgentLinkedFileResponseFile.ts | 30 + src/serialization/types/AgentLogResponse.ts | 103 + .../types/AgentLogResponseToolChoice.ts | 22 + .../types/AgentLogStreamResponse.ts | 49 + src/serialization/types/AgentResponse.ts | 119 + .../types/AgentResponseReasoningEffort.ts | 17 + src/serialization/types/AgentResponseStop.ts | 19 + .../types/AgentResponseTemplate.ts | 17 + .../types/AgentResponseToolsItem.ts | 20 + .../types/AnthropicRedactedThinkingContent.ts | 22 + .../types/AnthropicThinkingContent.ts | 24 + src/serialization/types/ChatMessage.ts | 3 + .../types/ChatMessageThinkingItem.ts | 18 + src/serialization/types/CommitRequest.ts | 18 - .../types/CreateAgentLogResponse.ts | 27 + src/serialization/types/DatasetResponse.ts | 15 +- ...WithParentsAndChildrenResponseFilesItem.ts | 4 +- src/serialization/types/EvaluatorResponse.ts | 15 +- src/serialization/types/EventType.ts | 39 + .../types/FileEnvironmentResponseFile.ts | 4 +- .../types/FileEnvironmentVariableRequest.ts | 22 + src/serialization/types/FileType.ts | 4 +- src/serialization/types/FilesToolType.ts | 4 +- src/serialization/types/FlowResponse.ts | 15 +- src/serialization/types/LinkedFileRequest.ts | 24 + src/serialization/types/ListAgents.ts | 18 + src/serialization/types/LogResponse.ts | 4 +- src/serialization/types/LogStreamResponse.ts | 18 + src/serialization/types/ModelProviders.ts | 20 +- ...ningEffort.ts => OpenAiReasoningEffort.ts} | 8 +- .../types/PaginatedDataAgentResponse.ts | 26 + ...uatorResponseFlowResponseAgentResponse.ts} | 14 +- ...seFlowResponseAgentResponseRecordsItem.ts} | 12 +- .../types/PopulateTemplateResponse.ts | 24 +- ...PopulateTemplateResponseReasoningEffort.ts | 17 + .../types/PromptKernelRequest.ts | 6 +- .../PromptKernelRequestReasoningEffort.ts | 17 + src/serialization/types/PromptResponse.ts | 21 +- .../types/PromptResponseReasoningEffort.ts | 17 + src/serialization/types/RunVersionResponse.ts | 4 +- src/serialization/types/StopAgentEnum.ts | 14 + src/serialization/types/ToolCallResponse.ts | 83 + src/serialization/types/ToolResponse.ts | 13 +- .../types/UpdateVersionRequest.ts | 22 + .../types/VersionDeploymentResponseFile.ts | 4 +- .../types/VersionIdResponseVersion.ts | 4 +- src/serialization/types/index.ts | 48 +- src/version.ts | 2 +- yarn.lock | 1284 ++++---- 240 files changed, 9204 insertions(+), 2025 deletions(-) create mode 100644 src/api/resources/agents/client/Client.ts create mode 100644 src/api/resources/agents/client/index.ts create mode 100644 src/api/resources/agents/client/requests/AgentLogRequest.ts create mode 100644 src/api/resources/agents/client/requests/AgentRequest.ts create mode 100644 src/api/resources/agents/client/requests/AgentsCallRequest.ts create mode 100644 src/api/resources/agents/client/requests/AgentsCallStreamRequest.ts create mode 100644 src/api/resources/agents/client/requests/AgentsContinueRequest.ts create mode 100644 src/api/resources/agents/client/requests/AgentsContinueStreamRequest.ts create mode 100644 src/api/resources/agents/client/requests/GetAgentsIdGetRequest.ts create mode 100644 src/api/resources/agents/client/requests/ListAgentsGetRequest.ts create mode 100644 src/api/resources/agents/client/requests/ListVersionsAgentsIdVersionsGetRequest.ts create mode 100644 src/api/resources/agents/client/requests/SetDeploymentAgentsIdEnvironmentsEnvironmentIdPostRequest.ts create mode 100644 src/api/resources/agents/client/requests/UpdateAgentLogRequest.ts create mode 100644 src/api/resources/agents/client/requests/UpdateAgentRequest.ts create mode 100644 src/api/resources/agents/client/requests/index.ts create mode 100644 src/api/resources/agents/index.ts create mode 100644 src/api/resources/agents/types/AgentLogRequestToolChoice.ts create mode 100644 src/api/resources/agents/types/AgentRequestReasoningEffort.ts create mode 100644 src/api/resources/agents/types/AgentRequestStop.ts create mode 100644 src/api/resources/agents/types/AgentRequestTemplate.ts create mode 100644 src/api/resources/agents/types/AgentRequestToolsItem.ts create mode 100644 src/api/resources/agents/types/AgentsCallRequestToolChoice.ts create mode 100644 src/api/resources/agents/types/AgentsCallStreamRequestToolChoice.ts create mode 100644 src/api/resources/agents/types/index.ts create mode 100644 src/api/resources/datasets/types/ListVersionsDatasetsIdVersionsGetRequestIncludeDatapoints.ts create mode 100644 src/api/resources/datasets/types/index.ts rename src/api/resources/prompts/client/requests/{PopulateTemplatePromptsIdPopulatePostRequest.ts => PopulatePromptsIdPopulatePostRequest.ts} (87%) create mode 100644 src/api/resources/prompts/types/PromptRequestReasoningEffort.ts create mode 100644 src/api/resources/tools/client/requests/ToolCallRequest.ts create mode 100644 src/api/types/AgentCallResponse.ts create mode 100644 src/api/types/AgentCallResponseToolChoice.ts create mode 100644 src/api/types/AgentCallStreamResponse.ts create mode 100644 src/api/types/AgentCallStreamResponsePayload.ts create mode 100644 src/api/types/AgentContinueResponse.ts create mode 100644 src/api/types/AgentContinueResponseToolChoice.ts create mode 100644 src/api/types/AgentContinueStreamResponse.ts create mode 100644 src/api/types/AgentContinueStreamResponsePayload.ts create mode 100644 src/api/types/AgentInlineTool.ts create mode 100644 src/api/types/AgentKernelRequest.ts create mode 100644 src/api/types/AgentKernelRequestReasoningEffort.ts create mode 100644 src/api/types/AgentKernelRequestStop.ts create mode 100644 src/api/types/AgentKernelRequestTemplate.ts create mode 100644 src/api/types/AgentKernelRequestToolsItem.ts create mode 100644 src/api/types/AgentLinkedFileRequest.ts create mode 100644 src/api/types/AgentLinkedFileResponse.ts rename src/api/types/{PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseRecordsItem.ts => AgentLinkedFileResponseFile.ts} (62%) create mode 100644 src/api/types/AgentLogResponse.ts create mode 100644 src/api/types/AgentLogResponseToolChoice.ts create mode 100644 src/api/types/AgentLogStreamResponse.ts create mode 100644 src/api/types/AgentResponse.ts create mode 100644 src/api/types/AgentResponseReasoningEffort.ts create mode 100644 src/api/types/AgentResponseStop.ts create mode 100644 src/api/types/AgentResponseTemplate.ts create mode 100644 src/api/types/AgentResponseToolsItem.ts create mode 100644 src/api/types/AnthropicRedactedThinkingContent.ts create mode 100644 src/api/types/AnthropicThinkingContent.ts create mode 100644 src/api/types/ChatMessageThinkingItem.ts delete mode 100644 src/api/types/CommitRequest.ts create mode 100644 src/api/types/CreateAgentLogResponse.ts create mode 100644 src/api/types/EventType.ts create mode 100644 src/api/types/FileEnvironmentVariableRequest.ts create mode 100644 src/api/types/LinkedFileRequest.ts create mode 100644 src/api/types/ListAgents.ts create mode 100644 src/api/types/LogStreamResponse.ts rename src/api/types/{ReasoningEffort.ts => OpenAiReasoningEffort.ts} (63%) create mode 100644 src/api/types/PaginatedDataAgentResponse.ts rename src/api/types/{PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponse.ts => PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseAgentResponse.ts} (69%) create mode 100644 src/api/types/PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseAgentResponseRecordsItem.ts create mode 100644 src/api/types/PopulateTemplateResponseReasoningEffort.ts create mode 100644 src/api/types/PromptKernelRequestReasoningEffort.ts create mode 100644 src/api/types/PromptResponseReasoningEffort.ts create mode 100644 src/api/types/StopAgentEnum.ts create mode 100644 src/api/types/ToolCallResponse.ts create mode 100644 src/api/types/UpdateVersionRequest.ts create mode 100644 src/serialization/resources/agents/client/index.ts create mode 100644 src/serialization/resources/agents/client/listEnvironments.ts create mode 100644 src/serialization/resources/agents/client/requests/AgentLogRequest.ts create mode 100644 src/serialization/resources/agents/client/requests/AgentRequest.ts create mode 100644 src/serialization/resources/agents/client/requests/AgentsCallRequest.ts create mode 100644 src/serialization/resources/agents/client/requests/AgentsCallStreamRequest.ts create mode 100644 src/serialization/resources/agents/client/requests/AgentsContinueRequest.ts create mode 100644 src/serialization/resources/agents/client/requests/AgentsContinueStreamRequest.ts create mode 100644 src/serialization/resources/agents/client/requests/UpdateAgentLogRequest.ts create mode 100644 src/serialization/resources/agents/client/requests/UpdateAgentRequest.ts create mode 100644 src/serialization/resources/agents/client/requests/index.ts create mode 100644 src/serialization/resources/agents/index.ts create mode 100644 src/serialization/resources/agents/types/AgentLogRequestToolChoice.ts create mode 100644 src/serialization/resources/agents/types/AgentRequestReasoningEffort.ts create mode 100644 src/serialization/resources/agents/types/AgentRequestStop.ts create mode 100644 src/serialization/resources/agents/types/AgentRequestTemplate.ts create mode 100644 src/serialization/resources/agents/types/AgentRequestToolsItem.ts create mode 100644 src/serialization/resources/agents/types/AgentsCallRequestToolChoice.ts create mode 100644 src/serialization/resources/agents/types/AgentsCallStreamRequestToolChoice.ts create mode 100644 src/serialization/resources/agents/types/index.ts create mode 100644 src/serialization/resources/datasets/types/ListVersionsDatasetsIdVersionsGetRequestIncludeDatapoints.ts create mode 100644 src/serialization/resources/datasets/types/index.ts rename src/serialization/resources/prompts/client/{populateTemplate.ts => populate.ts} (88%) create mode 100644 src/serialization/resources/prompts/types/PromptRequestReasoningEffort.ts create mode 100644 src/serialization/resources/tools/client/addEnvironmentVariable.ts create mode 100644 src/serialization/resources/tools/client/deleteEnvironmentVariable.ts create mode 100644 src/serialization/resources/tools/client/getEnvironmentVariables.ts create mode 100644 src/serialization/resources/tools/client/requests/ToolCallRequest.ts create mode 100644 src/serialization/types/AgentCallResponse.ts create mode 100644 src/serialization/types/AgentCallResponseToolChoice.ts create mode 100644 src/serialization/types/AgentCallStreamResponse.ts create mode 100644 src/serialization/types/AgentCallStreamResponsePayload.ts create mode 100644 src/serialization/types/AgentContinueResponse.ts create mode 100644 src/serialization/types/AgentContinueResponseToolChoice.ts create mode 100644 src/serialization/types/AgentContinueStreamResponse.ts create mode 100644 src/serialization/types/AgentContinueStreamResponsePayload.ts create mode 100644 src/serialization/types/AgentInlineTool.ts create mode 100644 src/serialization/types/AgentKernelRequest.ts create mode 100644 src/serialization/types/AgentKernelRequestReasoningEffort.ts create mode 100644 src/serialization/types/AgentKernelRequestStop.ts create mode 100644 src/serialization/types/AgentKernelRequestTemplate.ts create mode 100644 src/serialization/types/AgentKernelRequestToolsItem.ts create mode 100644 src/serialization/types/AgentLinkedFileRequest.ts create mode 100644 src/serialization/types/AgentLinkedFileResponse.ts create mode 100644 src/serialization/types/AgentLinkedFileResponseFile.ts create mode 100644 src/serialization/types/AgentLogResponse.ts create mode 100644 src/serialization/types/AgentLogResponseToolChoice.ts create mode 100644 src/serialization/types/AgentLogStreamResponse.ts create mode 100644 src/serialization/types/AgentResponse.ts create mode 100644 src/serialization/types/AgentResponseReasoningEffort.ts create mode 100644 src/serialization/types/AgentResponseStop.ts create mode 100644 src/serialization/types/AgentResponseTemplate.ts create mode 100644 src/serialization/types/AgentResponseToolsItem.ts create mode 100644 src/serialization/types/AnthropicRedactedThinkingContent.ts create mode 100644 src/serialization/types/AnthropicThinkingContent.ts create mode 100644 src/serialization/types/ChatMessageThinkingItem.ts delete mode 100644 src/serialization/types/CommitRequest.ts create mode 100644 src/serialization/types/CreateAgentLogResponse.ts create mode 100644 src/serialization/types/EventType.ts create mode 100644 src/serialization/types/FileEnvironmentVariableRequest.ts create mode 100644 src/serialization/types/LinkedFileRequest.ts create mode 100644 src/serialization/types/ListAgents.ts create mode 100644 src/serialization/types/LogStreamResponse.ts rename src/serialization/types/{ReasoningEffort.ts => OpenAiReasoningEffort.ts} (50%) create mode 100644 src/serialization/types/PaginatedDataAgentResponse.ts rename src/serialization/types/{PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponse.ts => PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseAgentResponse.ts} (62%) rename src/serialization/types/{PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseRecordsItem.ts => PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseAgentResponseRecordsItem.ts} (69%) create mode 100644 src/serialization/types/PopulateTemplateResponseReasoningEffort.ts create mode 100644 src/serialization/types/PromptKernelRequestReasoningEffort.ts create mode 100644 src/serialization/types/PromptResponseReasoningEffort.ts create mode 100644 src/serialization/types/StopAgentEnum.ts create mode 100644 src/serialization/types/ToolCallResponse.ts create mode 100644 src/serialization/types/UpdateVersionRequest.ts diff --git a/package.json b/package.json index 56c75a25..d47c7f4d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "humanloop", - "version": "0.8.19", + "version": "0.8.20", "private": false, "repository": "https://github.com/humanloop/humanloop-node", "main": "./index.js", @@ -12,45 +12,45 @@ "test": "jest" }, "dependencies": { + "url-join": "4.0.1", + "form-data": "^4.0.0", + "formdata-node": "^6.0.3", + "node-fetch": "^2.7.0", + "qs": "^6.13.1", + "readable-stream": "^4.5.2", + "form-data-encoder": "^4.0.2", "@opentelemetry/api": "<=1.9.0", "@opentelemetry/resources": "<=2.0.0", "@opentelemetry/sdk-trace-node": "<=2.0.0", - "@traceloop/ai-semantic-conventions": ">=0.11.6", "@traceloop/instrumentation-anthropic": ">=0.11.1", "@traceloop/instrumentation-cohere": ">=0.11.1", "@traceloop/instrumentation-openai": ">=0.11.3", + "@traceloop/ai-semantic-conventions": ">=0.11.6", "cli-progress": "^3.12.0", - "form-data": "^4.0.0", - "form-data-encoder": "^4.0.2", - "formdata-node": "^6.0.3", - "lodash": "^4.17.21", - "node-fetch": "^2.7.0", - "qs": "^6.13.1", - "readable-stream": "^4.5.2", - "url-join": "4.0.1" + "lodash": "^4.17.21" }, "devDependencies": { - "@anthropic-ai/sdk": "^0.32.1", - "@trivago/prettier-plugin-sort-imports": "^4.3.0", - "@types/cli-progress": "^3.11.6", - "@types/jest": "^29.5.14", - "@types/lodash": "4.14.74", - "@types/node": "^18.19.70", - "@types/node-fetch": "^2.6.12", + "@types/url-join": "4.0.1", "@types/qs": "^6.9.17", + "@types/node-fetch": "^2.6.12", "@types/readable-stream": "^4.0.18", - "@types/url-join": "4.0.1", - "cohere-ai": "^7.15.0", - "dotenv": "^16.4.6", + "webpack": "^5.97.1", + "ts-loader": "^9.5.1", "jest": "^29.7.0", + "@types/jest": "^29.5.14", + "ts-jest": "^29.1.1", "jest-environment-jsdom": "^29.7.0", - "jsonschema": "^1.4.1", - "openai": "^4.74.0", + "@types/node": "^18.19.70", "prettier": "^3.4.2", - "ts-jest": "^29.1.1", - "ts-loader": "^9.5.1", "typescript": "~5.7.2", - "webpack": "^5.97.1" + "openai": "^4.74.0", + "@anthropic-ai/sdk": "^0.32.1", + "cohere-ai": "^7.15.0", + "dotenv": "^16.4.6", + "jsonschema": "^1.4.1", + "@types/cli-progress": "^3.11.6", + "@types/lodash": "4.14.74", + "@trivago/prettier-plugin-sort-imports": "^4.3.0" }, "browser": { "fs": false, diff --git a/reference.md b/reference.md index 9fca90d4..cd7f93c5 100644 --- a/reference.md +++ b/reference.md @@ -464,9 +464,9 @@ Create a Prompt or update it with a new version if it already exists. Prompts are identified by the `ID` or their `path`. The parameters (i.e. the prompt template, temperature, model etc.) determine the versions of the Prompt. -If you provide a commit message, then the new version will be committed; -otherwise it will be uncommitted. If you try to commit an already committed version, -an exception will be raised. +You can provide `version_name` and `version_description` to identify and describe your versions. +Version names must be unique within a Prompt - attempting to create a version with a name +that already exists will result in a 409 Conflict error. @@ -495,7 +495,6 @@ await client.prompts.upsert({ provider: "openai", maxTokens: -1, temperature: 0.7, - commitMessage: "Initial commit", }); ``` @@ -741,7 +740,7 @@ await client.prompts.move("pr_30gco7dx6JDq4200GVOHa", { -
client.prompts.populateTemplate(id, { ...params }) -> Humanloop.PopulateTemplateResponse +
client.prompts.populate(id, { ...params }) -> Humanloop.PopulateTemplateResponse
@@ -772,7 +771,7 @@ By default, the deployed version of the Prompt is returned. Use the query parame
```typescript -await client.prompts.populateTemplate("id", { +await client.prompts.populate("id", { body: { key: "value", }, @@ -800,7 +799,7 @@ await client.prompts.populateTemplate("id", {
-**request:** `Humanloop.PopulateTemplatePromptsIdPopulatePostRequest` +**request:** `Humanloop.PopulatePromptsIdPopulatePostRequest`
@@ -847,9 +846,7 @@ Get a list of all the versions of a Prompt.
```typescript -await client.prompts.listVersions("pr_30gco7dx6JDq4200GVOHa", { - status: "committed", -}); +await client.prompts.listVersions("pr_30gco7dx6JDq4200GVOHa"); ```
@@ -892,7 +889,7 @@ await client.prompts.listVersions("pr_30gco7dx6JDq4200GVOHa", {
-
client.prompts.commit(id, versionId, { ...params }) -> Humanloop.PromptResponse +
client.prompts.deletePromptVersion(id, versionId) -> void
@@ -904,9 +901,7 @@ await client.prompts.listVersions("pr_30gco7dx6JDq4200GVOHa", {
-Commit a version of the Prompt with a commit message. - -If the version is already committed, an exception will be raised. +Delete a version of the Prompt.
@@ -922,9 +917,7 @@ If the version is already committed, an exception will be raised.
```typescript -await client.prompts.commit("pr_30gco7dx6JDq4200GVOHa", "prv_F34aba5f3asp0", { - commitMessage: "Reiterated point about not discussing sentience", -}); +await client.prompts.deletePromptVersion("id", "version_id"); ```
@@ -956,14 +949,6 @@ await client.prompts.commit("pr_30gco7dx6JDq4200GVOHa", "prv_F34aba5f3asp0", {
-**request:** `Humanloop.CommitRequest` - -
-
- -
-
- **requestOptions:** `Prompts.RequestOptions`
@@ -975,7 +960,7 @@ await client.prompts.commit("pr_30gco7dx6JDq4200GVOHa", "prv_F34aba5f3asp0", {
-
client.prompts.deletePromptVersion(id, versionId) -> void +
client.prompts.patchPromptVersion(id, versionId, { ...params }) -> Humanloop.PromptResponse
@@ -987,7 +972,7 @@ await client.prompts.commit("pr_30gco7dx6JDq4200GVOHa", "prv_F34aba5f3asp0", {
-Delete a version of the Prompt. +Update the name or description of the Prompt version.
@@ -1003,7 +988,7 @@ Delete a version of the Prompt.
```typescript -await client.prompts.deletePromptVersion("id", "version_id"); +await client.prompts.patchPromptVersion("id", "version_id", {}); ```
@@ -1035,6 +1020,14 @@ await client.prompts.deletePromptVersion("id", "version_id");
+**request:** `Humanloop.UpdateVersionRequest` + +
+
+ +
+
+ **requestOptions:** `Prompts.RequestOptions`
@@ -1349,6 +1342,79 @@ await client.prompts.updateMonitoring("pr_30gco7dx6JDq4200GVOHa", { ## Tools +
client.tools.call({ ...params }) -> Humanloop.ToolCallResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Call a Tool. + +Calling a Tool with inputs runs the tool's source code and logs the result and metadata to Humanloop. + +You can use query parameters `version_id`, or `environment`, to target +an existing version of the Tool. Otherwise, the default deployed version will be chosen. + +Instead of targeting an existing version explicitly, you can instead pass in +Tool details in the request body. In this case, we will check if the details correspond +to an existing version of the Tool. If they do not, we will create a new version. This is helpful +in the case where you are storing or deriving your Tool details in code. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.tools.call(); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Humanloop.ToolCallRequest` + +
+
+ +
+
+ +**requestOptions:** `Tools.RequestOptions` + +
+
+
+
+ +
+
+
+
client.tools.log({ ...params }) -> Humanloop.CreateToolLogResponse
@@ -1618,9 +1684,9 @@ Create a Tool or update it with a new version if it already exists. Tools are identified by the `ID` or their `path`. The name, description and parameters determine the versions of the Tool. -If you provide a commit message, then the new version will be committed; -otherwise it will be uncommitted. If you try to commit an already committed version, -an exception will be raised. +You can provide `version_name` and `version_description` to identify and describe your versions. +Version names must be unique within a Tool - attempting to create a version with a name +that already exists will result in a 409 Conflict error.
@@ -1654,7 +1720,6 @@ await client.tools.upsert({ required: ["a", "b"], }, }, - commitMessage: "Initial commit", }); ``` @@ -1928,9 +1993,7 @@ Get a list of all the versions of a Tool.
```typescript -await client.tools.listVersions("tl_789ghi", { - status: "committed", -}); +await client.tools.listVersions("tl_789ghi"); ```
@@ -1973,7 +2036,7 @@ await client.tools.listVersions("tl_789ghi", {
-
client.tools.commit(id, versionId, { ...params }) -> Humanloop.ToolResponse +
client.tools.deleteToolVersion(id, versionId) -> void
@@ -1985,9 +2048,7 @@ await client.tools.listVersions("tl_789ghi", {
-Commit a version of the Tool with a commit message. - -If the version is already committed, an exception will be raised. +Delete a version of the Tool.
@@ -2003,9 +2064,7 @@ If the version is already committed, an exception will be raised.
```typescript -await client.tools.commit("tl_789ghi", "tv_012jkl", { - commitMessage: "Initial commit", -}); +await client.tools.deleteToolVersion("id", "version_id"); ```
@@ -2037,14 +2096,6 @@ await client.tools.commit("tl_789ghi", "tv_012jkl", {
-**request:** `Humanloop.CommitRequest` - -
-
- -
-
- **requestOptions:** `Tools.RequestOptions`
@@ -2056,7 +2107,7 @@ await client.tools.commit("tl_789ghi", "tv_012jkl", {
-
client.tools.deleteToolVersion(id, versionId) -> void +
client.tools.updateToolVersion(id, versionId, { ...params }) -> Humanloop.ToolResponse
@@ -2068,7 +2119,7 @@ await client.tools.commit("tl_789ghi", "tv_012jkl", {
-Delete a version of the Tool. +Update the name or description of the Tool version.
@@ -2084,7 +2135,7 @@ Delete a version of the Tool.
```typescript -await client.tools.deleteToolVersion("id", "version_id"); +await client.tools.updateToolVersion("id", "version_id", {}); ```
@@ -2116,6 +2167,14 @@ await client.tools.deleteToolVersion("id", "version_id");
+**request:** `Humanloop.UpdateVersionRequest` + +
+
+ +
+
+ **requestOptions:** `Tools.RequestOptions`
@@ -2428,27 +2487,10 @@ await client.tools.updateMonitoring("tl_789ghi", {
-## Datasets - -
client.datasets.list({ ...params }) -> core.Page -
-
- -#### 📝 Description - +
client.tools.getEnvironmentVariables(id) -> Humanloop.FileEnvironmentVariableRequest[]
-
-
- -List all Datasets. - -
-
-
-
- #### 🔌 Usage
@@ -2458,20 +2500,7 @@ List all Datasets.
```typescript -const response = await client.datasets.list({ - size: 1, -}); -for await (const item of response) { - console.log(item); -} - -// Or you can manually iterate page-by-page -const page = await client.datasets.list({ - size: 1, -}); -while (page.hasNextPage()) { - page = page.getNextPage(); -} +await client.tools.getEnvironmentVariables("id"); ```
@@ -2487,7 +2516,7 @@ while (page.hasNextPage()) {
-**request:** `Humanloop.ListDatasetsGetRequest` +**id:** `string` — Unique identifier for File.
@@ -2495,7 +2524,7 @@ while (page.hasNextPage()) {
-**requestOptions:** `Datasets.RequestOptions` +**requestOptions:** `Tools.RequestOptions`
@@ -2506,7 +2535,7 @@ while (page.hasNextPage()) {
-
client.datasets.upsert({ ...params }) -> Humanloop.DatasetResponse +
client.tools.addEnvironmentVariable(id, { ...params }) -> Humanloop.FileEnvironmentVariableRequest[]
@@ -2518,23 +2547,7 @@ while (page.hasNextPage()) {
-Create a Dataset or update it with a new version if it already exists. - -Datasets are identified by the `ID` or their `path`. The datapoints determine the versions of the Dataset. - -By default, the new Dataset version will be set to the list of Datapoints provided in -the request. You can also create a new version by adding or removing Datapoints from an existing version -by specifying `action` as `add` or `remove` respectively. In this case, you may specify -the `version_id` or `environment` query parameters to identify the existing version to base -the new version on. If neither is provided, the latest created version will be used. - -If you provide a commit message, then the new version will be committed; -otherwise it will be uncommitted. If you try to commit an already committed version, -an exception will be raised. - -Humanloop also deduplicates Datapoints. If you try to add a Datapoint that already -exists, it will be ignored. If you intentionally want to add a duplicate Datapoint, -you can add a unique identifier to the Datapoint's inputs such as `{_dedupe_id: }`. +Add an environment variable to a Tool.
@@ -2550,29 +2563,12 @@ you can add a unique identifier to the Datapoint's inputs such as `{_dedupe_id:
```typescript -await client.datasets.upsert({ - path: "test-questions", - datapoints: [ - { - inputs: { - question: "What is the capital of France?", - }, - target: { - answer: "Paris", - }, - }, - { - inputs: { - question: "Who wrote Hamlet?", - }, - target: { - answer: "William Shakespeare", - }, - }, - ], - action: "set", - commitMessage: "Add two new questions and answers", -}); +await client.tools.addEnvironmentVariable("id", [ + { + name: "name", + value: "value", + }, +]); ```
@@ -2588,7 +2584,7 @@ await client.datasets.upsert({
-**request:** `Humanloop.DatasetRequest` +**id:** `string` — Unique identifier for Tool.
@@ -2596,44 +2592,29 @@ await client.datasets.upsert({
-**requestOptions:** `Datasets.RequestOptions` - -
-
-
-
+**request:** `Humanloop.FileEnvironmentVariableRequest[]` -
- -
client.datasets.get(id, { ...params }) -> Humanloop.DatasetResponse -
-
- -#### 📝 Description
-
-
- -Retrieve the Dataset with the given ID. - -Unless `include_datapoints` is set to `true`, the response will not include -the Datapoints. -Use the List Datapoints endpoint (`GET /{id}/datapoints`) to efficiently -retrieve Datapoints for a large Dataset. - -By default, the deployed version of the Dataset is returned. Use the query parameters -`version_id` or `environment` to target a specific version of the Dataset. +**requestOptions:** `Tools.RequestOptions`
+
+
+
+ +
client.tools.deleteEnvironmentVariable(id, name) -> Humanloop.FileEnvironmentVariableRequest[] +
+
+ #### 🔌 Usage
@@ -2643,10 +2624,7 @@ By default, the deployed version of the Dataset is returned. Use the query param
```typescript -await client.datasets.get("ds_b0baF1ca7652", { - versionId: "dsv_6L78pqrdFi2xa", - includeDatapoints: true, -}); +await client.tools.deleteEnvironmentVariable("id", "name"); ```
@@ -2662,7 +2640,7 @@ await client.datasets.get("ds_b0baF1ca7652", {
-**id:** `string` — Unique identifier for Dataset. +**id:** `string` — Unique identifier for File.
@@ -2670,7 +2648,7 @@ await client.datasets.get("ds_b0baF1ca7652", {
-**request:** `Humanloop.GetDatasetsIdGetRequest` +**name:** `string` — Name of the Environment Variable to delete.
@@ -2678,7 +2656,7 @@ await client.datasets.get("ds_b0baF1ca7652", {
-**requestOptions:** `Datasets.RequestOptions` +**requestOptions:** `Tools.RequestOptions`
@@ -2689,7 +2667,9 @@ await client.datasets.get("ds_b0baF1ca7652", {
-
client.datasets.delete(id) -> void +## Datasets + +
client.datasets.list({ ...params }) -> core.Page
@@ -2701,7 +2681,7 @@ await client.datasets.get("ds_b0baF1ca7652", {
-Delete the Dataset with the given ID. +List all Datasets.
@@ -2717,7 +2697,20 @@ Delete the Dataset with the given ID.
```typescript -await client.datasets.delete("id"); +const response = await client.datasets.list({ + size: 1, +}); +for await (const item of response) { + console.log(item); +} + +// Or you can manually iterate page-by-page +const page = await client.datasets.list({ + size: 1, +}); +while (page.hasNextPage()) { + page = page.getNextPage(); +} ```
@@ -2733,7 +2726,7 @@ await client.datasets.delete("id");
-**id:** `string` — Unique identifier for Dataset. +**request:** `Humanloop.ListDatasetsGetRequest`
@@ -2752,7 +2745,7 @@ await client.datasets.delete("id");
-
client.datasets.move(id, { ...params }) -> Humanloop.DatasetResponse +
client.datasets.upsert({ ...params }) -> Humanloop.DatasetResponse
@@ -2764,9 +2757,25 @@ await client.datasets.delete("id");
-Move the Dataset to a different path or change the name. +Create a Dataset or update it with a new version if it already exists. -
+Datasets are identified by the `ID` or their `path`. The datapoints determine the versions of the Dataset. + +By default, the new Dataset version will be set to the list of Datapoints provided in +the request. You can also create a new version by adding or removing Datapoints from an existing version +by specifying `action` as `add` or `remove` respectively. In this case, you may specify +the `version_id` or `environment` query parameters to identify the existing version to base +the new version on. If neither is provided, the latest created version will be used. + +You can provide `version_name` and `version_description` to identify and describe your versions. +Version names must be unique within a Dataset - attempting to create a version with a name +that already exists will result in a 409 Conflict error. + +Humanloop also deduplicates Datapoints. If you try to add a Datapoint that already +exists, it will be ignored. If you intentionally want to add a duplicate Datapoint, +you can add a unique identifier to the Datapoint's inputs such as `{_dedupe_id: }`. + +
@@ -2780,7 +2789,28 @@ Move the Dataset to a different path or change the name.
```typescript -await client.datasets.move("id"); +await client.datasets.upsert({ + path: "test-questions", + datapoints: [ + { + inputs: { + question: "What is the capital of France?", + }, + target: { + answer: "Paris", + }, + }, + { + inputs: { + question: "Who wrote Hamlet?", + }, + target: { + answer: "William Shakespeare", + }, + }, + ], + action: "set", +}); ```
@@ -2796,15 +2826,7 @@ await client.datasets.move("id");
-**id:** `string` — Unique identifier for Dataset. - -
-
- -
-
- -**request:** `Humanloop.UpdateDatasetRequest` +**request:** `Humanloop.DatasetRequest`
@@ -2823,7 +2845,7 @@ await client.datasets.move("id");
-
client.datasets.listDatapoints(id, { ...params }) -> core.Page +
client.datasets.get(id, { ...params }) -> Humanloop.DatasetResponse
@@ -2835,7 +2857,15 @@ await client.datasets.move("id");
-List all Datapoints for the Dataset with the given ID. +Retrieve the Dataset with the given ID. + +Unless `include_datapoints` is set to `true`, the response will not include +the Datapoints. +Use the List Datapoints endpoint (`GET /{id}/datapoints`) to efficiently +retrieve Datapoints for a large Dataset. + +By default, the deployed version of the Dataset is returned. Use the query parameters +`version_id` or `environment` to target a specific version of the Dataset.
@@ -2851,20 +2881,10 @@ List all Datapoints for the Dataset with the given ID.
```typescript -const response = await client.datasets.listDatapoints("ds_b0baF1ca7652", { - size: 1, -}); -for await (const item of response) { - console.log(item); -} - -// Or you can manually iterate page-by-page -const page = await client.datasets.listDatapoints("ds_b0baF1ca7652", { - size: 1, +await client.datasets.get("ds_b0baF1ca7652", { + versionId: "dsv_6L78pqrdFi2xa", + includeDatapoints: true, }); -while (page.hasNextPage()) { - page = page.getNextPage(); -} ```
@@ -2888,7 +2908,7 @@ while (page.hasNextPage()) {
-**request:** `Humanloop.ListDatapointsDatasetsIdDatapointsGetRequest` +**request:** `Humanloop.GetDatasetsIdGetRequest`
@@ -2907,7 +2927,7 @@ while (page.hasNextPage()) {
-
client.datasets.listVersions(id, { ...params }) -> Humanloop.ListDatasets +
client.datasets.delete(id) -> void
@@ -2919,7 +2939,7 @@ while (page.hasNextPage()) {
-Get a list of the versions for a Dataset. +Delete the Dataset with the given ID.
@@ -2935,9 +2955,7 @@ Get a list of the versions for a Dataset.
```typescript -await client.datasets.listVersions("ds_b0baF1ca7652", { - status: "committed", -}); +await client.datasets.delete("id"); ```
@@ -2961,14 +2979,6 @@ await client.datasets.listVersions("ds_b0baF1ca7652", {
-**request:** `Humanloop.ListVersionsDatasetsIdVersionsGetRequest` - -
-
- -
-
- **requestOptions:** `Datasets.RequestOptions`
@@ -2980,7 +2990,7 @@ await client.datasets.listVersions("ds_b0baF1ca7652", {
-
client.datasets.commit(id, versionId, { ...params }) -> Humanloop.DatasetResponse +
client.datasets.move(id, { ...params }) -> Humanloop.DatasetResponse
@@ -2992,9 +3002,7 @@ await client.datasets.listVersions("ds_b0baF1ca7652", {
-Commit a version of the Dataset with a commit message. - -If the version is already committed, an exception will be raised. +Move the Dataset to a different path or change the name.
@@ -3010,9 +3018,7 @@ If the version is already committed, an exception will be raised.
```typescript -await client.datasets.commit("ds_b0baF1ca7652", "dsv_6L78pqrdFi2xa", { - commitMessage: "initial commit", -}); +await client.datasets.move("id"); ```
@@ -3036,15 +3042,7 @@ await client.datasets.commit("ds_b0baF1ca7652", "dsv_6L78pqrdFi2xa", {
-**versionId:** `string` — Unique identifier for the specific version of the Dataset. - -
-
- -
-
- -**request:** `Humanloop.CommitRequest` +**request:** `Humanloop.UpdateDatasetRequest`
@@ -3063,7 +3061,7 @@ await client.datasets.commit("ds_b0baF1ca7652", "dsv_6L78pqrdFi2xa", {
-
client.datasets.deleteDatasetVersion(id, versionId) -> void +
client.datasets.listDatapoints(id, { ...params }) -> core.Page
@@ -3075,7 +3073,7 @@ await client.datasets.commit("ds_b0baF1ca7652", "dsv_6L78pqrdFi2xa", {
-Delete a version of the Dataset. +List all Datapoints for the Dataset with the given ID.
@@ -3091,7 +3089,20 @@ Delete a version of the Dataset.
```typescript -await client.datasets.deleteDatasetVersion("id", "version_id"); +const response = await client.datasets.listDatapoints("ds_b0baF1ca7652", { + size: 1, +}); +for await (const item of response) { + console.log(item); +} + +// Or you can manually iterate page-by-page +const page = await client.datasets.listDatapoints("ds_b0baF1ca7652", { + size: 1, +}); +while (page.hasNextPage()) { + page = page.getNextPage(); +} ```
@@ -3115,7 +3126,7 @@ await client.datasets.deleteDatasetVersion("id", "version_id");
-**versionId:** `string` — Unique identifier for the specific version of the Dataset. +**request:** `Humanloop.ListDatapointsDatasetsIdDatapointsGetRequest`
@@ -3134,7 +3145,7 @@ await client.datasets.deleteDatasetVersion("id", "version_id");
-
client.datasets.uploadCsv(file, id, { ...params }) -> Humanloop.DatasetResponse +
client.datasets.listVersions(id, { ...params }) -> Humanloop.ListDatasets
@@ -3146,14 +3157,7 @@ await client.datasets.deleteDatasetVersion("id", "version_id");
-Add Datapoints from a CSV file to a Dataset. - -This will create a new committed version of the Dataset with the Datapoints from the CSV file. - -If either `version_id` or `environment` is provided, the new version will be based on the specified version, -with the Datapoints from the CSV file added to the existing Datapoints in the version. -If neither `version_id` nor `environment` is provided, the new version will be based on the version -of the Dataset that is deployed to the default Environment. +Get a list of the versions for a Dataset.
@@ -3169,9 +3173,7 @@ of the Dataset that is deployed to the default Environment.
```typescript -await client.datasets.uploadCsv(fs.createReadStream("/path/to/your/file"), "id", { - commitMessage: "commit_message", -}); +await client.datasets.listVersions("ds_b0baF1ca7652"); ```
@@ -3187,15 +3189,7 @@ await client.datasets.uploadCsv(fs.createReadStream("/path/to/your/file"), "id",
-**file:** `File | fs.ReadStream | Blob` - -
-
- -
-
- -**id:** `string` +**id:** `string` — Unique identifier for Dataset.
@@ -3203,7 +3197,7 @@ await client.datasets.uploadCsv(fs.createReadStream("/path/to/your/file"), "id",
-**request:** `Humanloop.BodyUploadCsvDatasetsIdDatapointsCsvPost` +**request:** `Humanloop.ListVersionsDatasetsIdVersionsGetRequest`
@@ -3222,7 +3216,7 @@ await client.datasets.uploadCsv(fs.createReadStream("/path/to/your/file"), "id",
-
client.datasets.setDeployment(id, environmentId, { ...params }) -> Humanloop.DatasetResponse +
client.datasets.deleteDatasetVersion(id, versionId) -> void
@@ -3234,9 +3228,7 @@ await client.datasets.uploadCsv(fs.createReadStream("/path/to/your/file"), "id",
-Deploy Dataset to Environment. - -Set the deployed version for the specified Environment. +Delete a version of the Dataset.
@@ -3252,9 +3244,7 @@ Set the deployed version for the specified Environment.
```typescript -await client.datasets.setDeployment("ds_b0baF1ca7652", "staging", { - versionId: "dsv_6L78pqrdFi2xa", -}); +await client.datasets.deleteDatasetVersion("id", "version_id"); ```
@@ -3278,15 +3268,7 @@ await client.datasets.setDeployment("ds_b0baF1ca7652", "staging", {
-**environmentId:** `string` — Unique identifier for the Environment to deploy the Version to. - -
-
- -
-
- -**request:** `Humanloop.SetDeploymentDatasetsIdEnvironmentsEnvironmentIdPostRequest` +**versionId:** `string` — Unique identifier for the specific version of the Dataset.
@@ -3305,7 +3287,7 @@ await client.datasets.setDeployment("ds_b0baF1ca7652", "staging", {
-
client.datasets.removeDeployment(id, environmentId) -> void +
client.datasets.updateDatasetVersion(id, versionId, { ...params }) -> Humanloop.DatasetResponse
@@ -3317,9 +3299,7 @@ await client.datasets.setDeployment("ds_b0baF1ca7652", "staging", {
-Remove deployed Dataset from Environment. - -Remove the deployed version for the specified Environment. +Update the name or description of the Dataset version.
@@ -3335,7 +3315,7 @@ Remove the deployed version for the specified Environment.
```typescript -await client.datasets.removeDeployment("ds_b0baF1ca7652", "staging"); +await client.datasets.updateDatasetVersion("id", "version_id", {}); ```
@@ -3359,7 +3339,15 @@ await client.datasets.removeDeployment("ds_b0baF1ca7652", "staging");
-**environmentId:** `string` — Unique identifier for the Environment to remove the deployment from. +**versionId:** `string` — Unique identifier for the specific version of the Dataset. + +
+
+ +
+
+ +**request:** `Humanloop.UpdateVersionRequest`
@@ -3378,7 +3366,7 @@ await client.datasets.removeDeployment("ds_b0baF1ca7652", "staging");
-
client.datasets.listEnvironments(id) -> Humanloop.FileEnvironmentResponse[] +
client.datasets.uploadCsv(file, id, { ...params }) -> Humanloop.DatasetResponse
@@ -3390,7 +3378,17 @@ await client.datasets.removeDeployment("ds_b0baF1ca7652", "staging");
-List all Environments and their deployed versions for the Dataset. +Add Datapoints from a CSV file to a Dataset. + +This will create a new version of the Dataset with the Datapoints from the CSV file. + +If either `version_id` or `environment` is provided, the new version will be based on the specified version, +with the Datapoints from the CSV file added to the existing Datapoints in the version. +If neither `version_id` nor `environment` is provided, the new version will be based on the version +of the Dataset that is deployed to the default Environment. + +You can optionally provide a name and description for the new version using `version_name` +and `version_description` parameters.
@@ -3406,7 +3404,7 @@ List all Environments and their deployed versions for the Dataset.
```typescript -await client.datasets.listEnvironments("id"); +await client.datasets.uploadCsv(fs.createReadStream("/path/to/your/file"), "id", {}); ```
@@ -3422,7 +3420,23 @@ await client.datasets.listEnvironments("id");
-**id:** `string` — Unique identifier for Dataset. +**file:** `File | fs.ReadStream | Blob` + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Humanloop.BodyUploadCsvDatasetsIdDatapointsCsvPost`
@@ -3441,9 +3455,7 @@ await client.datasets.listEnvironments("id");
-## Evaluators - -
client.evaluators.log({ ...params }) -> Humanloop.CreateEvaluatorLogResponse +
client.datasets.setDeployment(id, environmentId, { ...params }) -> Humanloop.DatasetResponse
@@ -3455,9 +3467,9 @@ await client.datasets.listEnvironments("id");
-Submit Evaluator judgment for an existing Log. +Deploy Dataset to Environment. -Creates a new Log. The evaluated Log will be set as the parent of the created Log. +Set the deployed version for the specified Environment.
@@ -3472,10 +3484,1575 @@ Creates a new Log. The evaluated Log will be set as the parent of the created Lo
-```typescript -await client.evaluators.log({ - parentId: "parent_id", +```typescript +await client.datasets.setDeployment("ds_b0baF1ca7652", "staging", { + versionId: "dsv_6L78pqrdFi2xa", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` — Unique identifier for Dataset. + +
+
+ +
+
+ +**environmentId:** `string` — Unique identifier for the Environment to deploy the Version to. + +
+
+ +
+
+ +**request:** `Humanloop.SetDeploymentDatasetsIdEnvironmentsEnvironmentIdPostRequest` + +
+
+ +
+
+ +**requestOptions:** `Datasets.RequestOptions` + +
+
+
+
+ + + +
+ +
client.datasets.removeDeployment(id, environmentId) -> void +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Remove deployed Dataset from Environment. + +Remove the deployed version for the specified Environment. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.datasets.removeDeployment("ds_b0baF1ca7652", "staging"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` — Unique identifier for Dataset. + +
+
+ +
+
+ +**environmentId:** `string` — Unique identifier for the Environment to remove the deployment from. + +
+
+ +
+
+ +**requestOptions:** `Datasets.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.datasets.listEnvironments(id) -> Humanloop.FileEnvironmentResponse[] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List all Environments and their deployed versions for the Dataset. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.datasets.listEnvironments("id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` — Unique identifier for Dataset. + +
+
+ +
+
+ +**requestOptions:** `Datasets.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Evaluators + +
client.evaluators.log({ ...params }) -> Humanloop.CreateEvaluatorLogResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Submit Evaluator judgment for an existing Log. + +Creates a new Log. The evaluated Log will be set as the parent of the created Log. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.evaluators.log({ + parentId: "parent_id", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Humanloop.CreateEvaluatorLogRequest` + +
+
+ +
+
+ +**requestOptions:** `Evaluators.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.evaluators.list({ ...params }) -> core.Page +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get a list of all Evaluators. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +const response = await client.evaluators.list({ + size: 1, +}); +for await (const item of response) { + console.log(item); +} + +// Or you can manually iterate page-by-page +const page = await client.evaluators.list({ + size: 1, +}); +while (page.hasNextPage()) { + page = page.getNextPage(); +} +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Humanloop.ListEvaluatorsGetRequest` + +
+
+ +
+
+ +**requestOptions:** `Evaluators.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.evaluators.upsert({ ...params }) -> Humanloop.EvaluatorResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create an Evaluator or update it with a new version if it already exists. + +Evaluators are identified by the `ID` or their `path`. The spec provided determines the version of the Evaluator. + +You can provide `version_name` and `version_description` to identify and describe your versions. +Version names must be unique within an Evaluator - attempting to create a version with a name +that already exists will result in a 409 Conflict error. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.evaluators.upsert({ + path: "Shared Evaluators/Accuracy Evaluator", + spec: { + argumentsType: "target_required", + returnType: "number", + evaluatorType: "python", + code: "def evaluate(answer, target):\n return 0.5", + }, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Humanloop.EvaluatorRequest` + +
+
+ +
+
+ +**requestOptions:** `Evaluators.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.evaluators.get(id, { ...params }) -> Humanloop.EvaluatorResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve the Evaluator with the given ID. + +By default, the deployed version of the Evaluator is returned. Use the query parameters +`version_id` or `environment` to target a specific version of the Evaluator. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.evaluators.get("ev_890bcd"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` — Unique identifier for Evaluator. + +
+
+ +
+
+ +**request:** `Humanloop.GetEvaluatorsIdGetRequest` + +
+
+ +
+
+ +**requestOptions:** `Evaluators.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.evaluators.delete(id) -> void +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete the Evaluator with the given ID. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.evaluators.delete("ev_890bcd"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` — Unique identifier for Evaluator. + +
+
+ +
+
+ +**requestOptions:** `Evaluators.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.evaluators.move(id, { ...params }) -> Humanloop.EvaluatorResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Move the Evaluator to a different path or change the name. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.evaluators.move("ev_890bcd", { + path: "new directory/new name", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` — Unique identifier for Evaluator. + +
+
+ +
+
+ +**request:** `Humanloop.UpdateEvaluatorRequest` + +
+
+ +
+
+ +**requestOptions:** `Evaluators.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.evaluators.listVersions(id, { ...params }) -> Humanloop.ListEvaluators +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get a list of all the versions of an Evaluator. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.evaluators.listVersions("ev_890bcd"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` — Unique identifier for the Evaluator. + +
+
+ +
+
+ +**request:** `Humanloop.ListVersionsEvaluatorsIdVersionsGetRequest` + +
+
+ +
+
+ +**requestOptions:** `Evaluators.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.evaluators.deleteEvaluatorVersion(id, versionId) -> void +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete a version of the Evaluator. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.evaluators.deleteEvaluatorVersion("id", "version_id"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` — Unique identifier for Evaluator. + +
+
+ +
+
+ +**versionId:** `string` — Unique identifier for the specific version of the Evaluator. + +
+
+ +
+
+ +**requestOptions:** `Evaluators.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.evaluators.updateEvaluatorVersion(id, versionId, { ...params }) -> Humanloop.EvaluatorResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update the name or description of the Evaluator version. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.evaluators.updateEvaluatorVersion("id", "version_id", {}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` — Unique identifier for Evaluator. + +
+
+ +
+
+ +**versionId:** `string` — Unique identifier for the specific version of the Evaluator. + +
+
+ +
+
+ +**request:** `Humanloop.UpdateVersionRequest` + +
+
+ +
+
+ +**requestOptions:** `Evaluators.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.evaluators.setDeployment(id, environmentId, { ...params }) -> Humanloop.EvaluatorResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Deploy Evaluator to an Environment. + +Set the deployed version for the specified Environment. This Evaluator +will be used for calls made to the Evaluator in this Environment. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.evaluators.setDeployment("ev_890bcd", "staging", { + versionId: "evv_012def", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` — Unique identifier for Evaluator. + +
+
+ +
+
+ +**environmentId:** `string` — Unique identifier for the Environment to deploy the Version to. + +
+
+ +
+
+ +**request:** `Humanloop.SetDeploymentEvaluatorsIdEnvironmentsEnvironmentIdPostRequest` + +
+
+ +
+
+ +**requestOptions:** `Evaluators.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.evaluators.removeDeployment(id, environmentId) -> void +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Remove deployed Evaluator from the Environment. + +Remove the deployed version for the specified Environment. This Evaluator +will no longer be used for calls made to the Evaluator in this Environment. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.evaluators.removeDeployment("ev_890bcd", "staging"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` — Unique identifier for Evaluator. + +
+
+ +
+
+ +**environmentId:** `string` — Unique identifier for the Environment to remove the deployment from. + +
+
+ +
+
+ +**requestOptions:** `Evaluators.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.evaluators.listEnvironments(id) -> Humanloop.FileEnvironmentResponse[] +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List all Environments and their deployed versions for the Evaluator. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.evaluators.listEnvironments("ev_890bcd"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` — Unique identifier for Evaluator. + +
+
+ +
+
+ +**requestOptions:** `Evaluators.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.evaluators.updateMonitoring(id, { ...params }) -> Humanloop.EvaluatorResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Activate and deactivate Evaluators for monitoring the Evaluator. + +An activated Evaluator will automatically be run on all new Logs +within the Evaluator for monitoring purposes. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.evaluators.updateMonitoring("id", {}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` + +
+
+ +
+
+ +**request:** `Humanloop.EvaluatorActivationDeactivationRequest` + +
+
+ +
+
+ +**requestOptions:** `Evaluators.RequestOptions` + +
+
+
+
+ +
+
+
+ +## Flows + +
client.flows.log({ ...params }) -> Humanloop.CreateFlowLogResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Log to a Flow. + +You can use query parameters `version_id`, or `environment`, to target +an existing version of the Flow. Otherwise, the default deployed version will be chosen. + +If you create the Flow Log with a `log_status` of `incomplete`, you should later update it to `complete` +in order to trigger Evaluators. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.flows.log({ + id: "fl_6o701g4jmcanPVHxdqD0O", + flow: { + attributes: { + prompt: { + template: "You are a helpful assistant helping with medical anamnesis", + model: "gpt-4o", + temperature: 0.8, + }, + tool: { + name: "retrieval_tool_v3", + description: "Retrieval tool for MedQA.", + source_code: "def retrieval_tool(question: str) -> str:\n pass\n", + }, + }, + }, + inputs: { + question: + "Patient with a history of diabetes and hypertension presents with chest pain and shortness of breath.", + }, + output: "The patient is likely experiencing a myocardial infarction. Immediate medical attention is required.", + logStatus: "incomplete", + startTime: "2024-07-08T22:40:35", + endTime: "2024-07-08T22:40:39", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Humanloop.FlowLogRequest` + +
+
+ +
+
+ +**requestOptions:** `Flows.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.flows.updateLog(logId, { ...params }) -> Humanloop.FlowLogResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Update the status, inputs, output of a Flow Log. + +Marking a Flow Log as complete will trigger any monitoring Evaluators to run. +Inputs and output (or error) must be provided in order to mark it as complete. + +The end_time log attribute will be set to match the time the log is marked as complete. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.flows.updateLog("medqa_experiment_0001", { + inputs: { + question: + "Patient with a history of diabetes and normal tension presents with chest pain and shortness of breath.", + }, + output: "The patient is likely experiencing a myocardial infarction. Immediate medical attention is required.", + logStatus: "complete", + error: undefined, +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**logId:** `string` — Unique identifier of the Flow Log. + +
+
+ +
+
+ +**request:** `Humanloop.UpdateFlowLogRequest` + +
+
+ +
+
+ +**requestOptions:** `Flows.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.flows.get(id, { ...params }) -> Humanloop.FlowResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieve the Flow with the given ID. + +By default, the deployed version of the Flow is returned. Use the query parameters +`version_id` or `environment` to target a specific version of the Flow. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.flows.get("fl_6o701g4jmcanPVHxdqD0O"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` — Unique identifier for Flow. + +
+
+ +
+
+ +**request:** `Humanloop.GetFlowsIdGetRequest` + +
+
+ +
+
+ +**requestOptions:** `Flows.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.flows.delete(id) -> void +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Delete the Flow with the given ID. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.flows.delete("fl_6o701g4jmcanPVHxdqD0O"); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` — Unique identifier for Flow. + +
+
+ +
+
+ +**requestOptions:** `Flows.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.flows.move(id, { ...params }) -> Humanloop.FlowResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Move the Flow to a different path or change the name. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.flows.move("fl_6o701g4jmcanPVHxdqD0O", { + path: "new directory/new name", +}); +``` + +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `string` — Unique identifier for Flow. + +
+
+ +
+
+ +**request:** `Humanloop.UpdateFlowRequest` + +
+
+ +
+
+ +**requestOptions:** `Flows.RequestOptions` + +
+
+
+
+ +
+
+
+ +
client.flows.list({ ...params }) -> core.Page +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Get a list of Flows. + +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +const response = await client.flows.list({ + size: 1, +}); +for await (const item of response) { + console.log(item); +} + +// Or you can manually iterate page-by-page +const page = await client.flows.list({ + size: 1, }); +while (page.hasNextPage()) { + page = page.getNextPage(); +} ```
@@ -3491,7 +5068,7 @@ await client.evaluators.log({
-**request:** `Humanloop.CreateEvaluatorLogRequest` +**request:** `Humanloop.ListFlowsGetRequest`
@@ -3499,7 +5076,7 @@ await client.evaluators.log({
-**requestOptions:** `Evaluators.RequestOptions` +**requestOptions:** `Flows.RequestOptions`
@@ -3510,7 +5087,7 @@ await client.evaluators.log({
-
client.evaluators.list({ ...params }) -> core.Page +
client.flows.upsert({ ...params }) -> Humanloop.FlowResponse
@@ -3522,7 +5099,13 @@ await client.evaluators.log({
-Get a list of all Evaluators. +Create or update a Flow. + +Flows can also be identified by the `ID` or their `path`. + +You can provide `version_name` and `version_description` to identify and describe your versions. +Version names must be unique within a Flow - attempting to create a version with a name +that already exists will result in a 409 Conflict error.
@@ -3538,20 +5121,21 @@ Get a list of all Evaluators.
```typescript -const response = await client.evaluators.list({ - size: 1, -}); -for await (const item of response) { - console.log(item); -} - -// Or you can manually iterate page-by-page -const page = await client.evaluators.list({ - size: 1, +await client.flows.upsert({ + path: "Personal Projects/MedQA Flow", + attributes: { + prompt: { + template: "You are a helpful medical assistant helping with medical anamnesis. Answer {{question}}", + model: "gpt-4o", + temperature: 0.8, + }, + tool: { + name: "retrieval_tool_v3", + description: "Retrieval tool for MedQA.", + source_code: "def retrieval_tool(question: str) -> str:\n pass\n", + }, + }, }); -while (page.hasNextPage()) { - page = page.getNextPage(); -} ```
@@ -3567,7 +5151,7 @@ while (page.hasNextPage()) {
-**request:** `Humanloop.ListEvaluatorsGetRequest` +**request:** `Humanloop.FlowRequest`
@@ -3575,7 +5159,7 @@ while (page.hasNextPage()) {
-**requestOptions:** `Evaluators.RequestOptions` +**requestOptions:** `Flows.RequestOptions`
@@ -3586,7 +5170,7 @@ while (page.hasNextPage()) {
-
client.evaluators.upsert({ ...params }) -> Humanloop.EvaluatorResponse +
client.flows.listVersions(id, { ...params }) -> Humanloop.ListFlows
@@ -3598,13 +5182,7 @@ while (page.hasNextPage()) {
-Create an Evaluator or update it with a new version if it already exists. - -Evaluators are identified by the `ID` or their `path`. The spec provided determines the version of the Evaluator. - -If you provide a commit message, then the new version will be committed; -otherwise it will be uncommitted. If you try to commit an already committed version, -an exception will be raised. +Get a list of all the versions of a Flow.
@@ -3620,16 +5198,7 @@ an exception will be raised.
```typescript -await client.evaluators.upsert({ - path: "Shared Evaluators/Accuracy Evaluator", - spec: { - argumentsType: "target_required", - returnType: "number", - evaluatorType: "python", - code: "def evaluate(answer, target):\n return 0.5", - }, - commitMessage: "Initial commit", -}); +await client.flows.listVersions("fl_6o701g4jmcanPVHxdqD0O"); ```
@@ -3645,7 +5214,7 @@ await client.evaluators.upsert({
-**request:** `Humanloop.EvaluatorRequest` +**id:** `string` — Unique identifier for Flow.
@@ -3653,7 +5222,15 @@ await client.evaluators.upsert({
-**requestOptions:** `Evaluators.RequestOptions` +**request:** `Humanloop.ListVersionsFlowsIdVersionsGetRequest` + +
+
+ +
+
+ +**requestOptions:** `Flows.RequestOptions`
@@ -3664,7 +5241,7 @@ await client.evaluators.upsert({
-
client.evaluators.get(id, { ...params }) -> Humanloop.EvaluatorResponse +
client.flows.deleteFlowVersion(id, versionId) -> void
@@ -3676,10 +5253,7 @@ await client.evaluators.upsert({
-Retrieve the Evaluator with the given ID. - -By default, the deployed version of the Evaluator is returned. Use the query parameters -`version_id` or `environment` to target a specific version of the Evaluator. +Delete a version of the Flow.
@@ -3695,7 +5269,7 @@ By default, the deployed version of the Evaluator is returned. Use the query par
```typescript -await client.evaluators.get("ev_890bcd"); +await client.flows.deleteFlowVersion("id", "version_id"); ```
@@ -3711,7 +5285,7 @@ await client.evaluators.get("ev_890bcd");
-**id:** `string` — Unique identifier for Evaluator. +**id:** `string` — Unique identifier for Flow.
@@ -3719,7 +5293,7 @@ await client.evaluators.get("ev_890bcd");
-**request:** `Humanloop.GetEvaluatorsIdGetRequest` +**versionId:** `string` — Unique identifier for the specific version of the Flow.
@@ -3727,7 +5301,7 @@ await client.evaluators.get("ev_890bcd");
-**requestOptions:** `Evaluators.RequestOptions` +**requestOptions:** `Flows.RequestOptions`
@@ -3738,7 +5312,7 @@ await client.evaluators.get("ev_890bcd");
-
client.evaluators.delete(id) -> void +
client.flows.updateFlowVersion(id, versionId, { ...params }) -> Humanloop.FlowResponse
@@ -3750,7 +5324,7 @@ await client.evaluators.get("ev_890bcd");
-Delete the Evaluator with the given ID. +Update the name or description of the Flow version.
@@ -3766,7 +5340,7 @@ Delete the Evaluator with the given ID.
```typescript -await client.evaluators.delete("ev_890bcd"); +await client.flows.updateFlowVersion("id", "version_id", {}); ```
@@ -3782,7 +5356,7 @@ await client.evaluators.delete("ev_890bcd");
-**id:** `string` — Unique identifier for Evaluator. +**id:** `string` — Unique identifier for Flow.
@@ -3790,7 +5364,23 @@ await client.evaluators.delete("ev_890bcd");
-**requestOptions:** `Evaluators.RequestOptions` +**versionId:** `string` — Unique identifier for the specific version of the Flow. + +
+
+ +
+
+ +**request:** `Humanloop.UpdateVersionRequest` + +
+
+ +
+
+ +**requestOptions:** `Flows.RequestOptions`
@@ -3801,7 +5391,7 @@ await client.evaluators.delete("ev_890bcd");
-
client.evaluators.move(id, { ...params }) -> Humanloop.EvaluatorResponse +
client.flows.setDeployment(id, environmentId, { ...params }) -> Humanloop.FlowResponse
@@ -3813,7 +5403,10 @@ await client.evaluators.delete("ev_890bcd");
-Move the Evaluator to a different path or change the name. +Deploy Flow to an Environment. + +Set the deployed version for the specified Environment. This Flow +will be used for calls made to the Flow in this Environment.
@@ -3829,8 +5422,8 @@ Move the Evaluator to a different path or change the name.
```typescript -await client.evaluators.move("ev_890bcd", { - path: "new directory/new name", +await client.flows.setDeployment("fl_6o701g4jmcanPVHxdqD0O", "staging", { + versionId: "flv_6o701g4jmcanPVHxdqD0O", }); ``` @@ -3847,7 +5440,7 @@ await client.evaluators.move("ev_890bcd", {
-**id:** `string` — Unique identifier for Evaluator. +**id:** `string` — Unique identifier for Flow.
@@ -3855,7 +5448,7 @@ await client.evaluators.move("ev_890bcd", {
-**request:** `Humanloop.UpdateEvaluatorRequest` +**environmentId:** `string` — Unique identifier for the Environment to deploy the Version to.
@@ -3863,7 +5456,15 @@ await client.evaluators.move("ev_890bcd", {
-**requestOptions:** `Evaluators.RequestOptions` +**request:** `Humanloop.SetDeploymentFlowsIdEnvironmentsEnvironmentIdPostRequest` + +
+
+ +
+
+ +**requestOptions:** `Flows.RequestOptions`
@@ -3874,7 +5475,7 @@ await client.evaluators.move("ev_890bcd", {
-
client.evaluators.listVersions(id, { ...params }) -> Humanloop.ListEvaluators +
client.flows.removeDeployment(id, environmentId) -> void
@@ -3886,7 +5487,10 @@ await client.evaluators.move("ev_890bcd", {
-Get a list of all the versions of an Evaluator. +Remove deployed Flow from the Environment. + +Remove the deployed version for the specified Environment. This Flow +will no longer be used for calls made to the Flow in this Environment.
@@ -3902,7 +5506,7 @@ Get a list of all the versions of an Evaluator.
```typescript -await client.evaluators.listVersions("ev_890bcd"); +await client.flows.removeDeployment("fl_6o701g4jmcanPVHxdqD0O", "staging"); ```
@@ -3918,7 +5522,7 @@ await client.evaluators.listVersions("ev_890bcd");
-**id:** `string` — Unique identifier for the Evaluator. +**id:** `string` — Unique identifier for Flow.
@@ -3926,7 +5530,7 @@ await client.evaluators.listVersions("ev_890bcd");
-**request:** `Humanloop.ListVersionsEvaluatorsIdVersionsGetRequest` +**environmentId:** `string` — Unique identifier for the Environment to remove the deployment from.
@@ -3934,7 +5538,7 @@ await client.evaluators.listVersions("ev_890bcd");
-**requestOptions:** `Evaluators.RequestOptions` +**requestOptions:** `Flows.RequestOptions`
@@ -3945,7 +5549,7 @@ await client.evaluators.listVersions("ev_890bcd");
-
client.evaluators.commit(id, versionId, { ...params }) -> Humanloop.EvaluatorResponse +
client.flows.listEnvironments(id) -> Humanloop.FileEnvironmentResponse[]
@@ -3957,9 +5561,7 @@ await client.evaluators.listVersions("ev_890bcd");
-Commit a version of the Evaluator with a commit message. - -If the version is already committed, an exception will be raised. +List all Environments and their deployed versions for the Flow.
@@ -3975,9 +5577,7 @@ If the version is already committed, an exception will be raised.
```typescript -await client.evaluators.commit("ev_890bcd", "evv_012def", { - commitMessage: "Initial commit", -}); +await client.flows.listEnvironments("fl_6o701g4jmcanPVHxdqD0O"); ```
@@ -3993,23 +5593,7 @@ await client.evaluators.commit("ev_890bcd", "evv_012def", {
-**id:** `string` — Unique identifier for Prompt. - -
-
- -
-
- -**versionId:** `string` — Unique identifier for the specific version of the Evaluator. - -
-
- -
-
- -**request:** `Humanloop.CommitRequest` +**id:** `string` — Unique identifier for Flow.
@@ -4017,7 +5601,7 @@ await client.evaluators.commit("ev_890bcd", "evv_012def", {
-**requestOptions:** `Evaluators.RequestOptions` +**requestOptions:** `Flows.RequestOptions`
@@ -4028,7 +5612,7 @@ await client.evaluators.commit("ev_890bcd", "evv_012def", {
-
client.evaluators.deleteEvaluatorVersion(id, versionId) -> void +
client.flows.updateMonitoring(id, { ...params }) -> Humanloop.FlowResponse
@@ -4040,7 +5624,10 @@ await client.evaluators.commit("ev_890bcd", "evv_012def", {
-Delete a version of the Evaluator. +Activate and deactivate Evaluators for monitoring the Flow. + +An activated Evaluator will automatically be run on all new "completed" Logs +within the Flow for monitoring purposes.
@@ -4056,7 +5643,13 @@ Delete a version of the Evaluator.
```typescript -await client.evaluators.deleteEvaluatorVersion("id", "version_id"); +await client.flows.updateMonitoring("fl_6o701g4jmcanPVHxdqD0O", { + activate: [ + { + evaluatorVersionId: "evv_1abc4308abd", + }, + ], +}); ```
@@ -4072,7 +5665,7 @@ await client.evaluators.deleteEvaluatorVersion("id", "version_id");
-**id:** `string` — Unique identifier for Evaluator. +**id:** `string`
@@ -4080,7 +5673,7 @@ await client.evaluators.deleteEvaluatorVersion("id", "version_id");
-**versionId:** `string` — Unique identifier for the specific version of the Evaluator. +**request:** `Humanloop.EvaluatorActivationDeactivationRequest`
@@ -4088,7 +5681,7 @@ await client.evaluators.deleteEvaluatorVersion("id", "version_id");
-**requestOptions:** `Evaluators.RequestOptions` +**requestOptions:** `Flows.RequestOptions`
@@ -4099,7 +5692,9 @@ await client.evaluators.deleteEvaluatorVersion("id", "version_id");
-
client.evaluators.setDeployment(id, environmentId, { ...params }) -> Humanloop.EvaluatorResponse +## Agents + +
client.agents.log({ ...params }) -> Humanloop.CreateAgentLogResponse
@@ -4111,10 +5706,13 @@ await client.evaluators.deleteEvaluatorVersion("id", "version_id");
-Deploy Evaluator to an Environment. +Create an Agent Log. -Set the deployed version for the specified Environment. This Evaluator -will be used for calls made to the Evaluator in this Environment. +You can use query parameters `version_id`, or `environment`, to target +an existing version of the Agent. Otherwise, the default deployed version will be chosen. + +If you create the Agent Log with a `log_status` of `incomplete`, you should later update it to `complete` +in order to trigger Evaluators.
@@ -4130,9 +5728,7 @@ will be used for calls made to the Evaluator in this Environment.
```typescript -await client.evaluators.setDeployment("ev_890bcd", "staging", { - versionId: "evv_012def", -}); +await client.agents.log(); ```
@@ -4148,23 +5744,7 @@ await client.evaluators.setDeployment("ev_890bcd", "staging", {
-**id:** `string` — Unique identifier for Evaluator. - -
-
- -
-
- -**environmentId:** `string` — Unique identifier for the Environment to deploy the Version to. - -
-
- -
-
- -**request:** `Humanloop.SetDeploymentEvaluatorsIdEnvironmentsEnvironmentIdPostRequest` +**request:** `Humanloop.AgentLogRequest`
@@ -4172,7 +5752,7 @@ await client.evaluators.setDeployment("ev_890bcd", "staging", {
-**requestOptions:** `Evaluators.RequestOptions` +**requestOptions:** `Agents.RequestOptions`
@@ -4183,7 +5763,7 @@ await client.evaluators.setDeployment("ev_890bcd", "staging", {
-
client.evaluators.removeDeployment(id, environmentId) -> void +
client.agents.updateLog(id, logId, { ...params }) -> Humanloop.LogResponse
@@ -4195,10 +5775,9 @@ await client.evaluators.setDeployment("ev_890bcd", "staging", {
-Remove deployed Evaluator from the Environment. +Update a Log. -Remove the deployed version for the specified Environment. This Evaluator -will no longer be used for calls made to the Evaluator in this Environment. +Update the details of a Log with the given ID.
@@ -4214,7 +5793,7 @@ will no longer be used for calls made to the Evaluator in this Environment.
```typescript -await client.evaluators.removeDeployment("ev_890bcd", "staging"); +await client.agents.updateLog("id", "log_id"); ```
@@ -4230,7 +5809,7 @@ await client.evaluators.removeDeployment("ev_890bcd", "staging");
-**id:** `string` — Unique identifier for Evaluator. +**id:** `string` — Unique identifier for Agent.
@@ -4238,7 +5817,7 @@ await client.evaluators.removeDeployment("ev_890bcd", "staging");
-**environmentId:** `string` — Unique identifier for the Environment to remove the deployment from. +**logId:** `string` — Unique identifier for the Log.
@@ -4246,7 +5825,15 @@ await client.evaluators.removeDeployment("ev_890bcd", "staging");
-**requestOptions:** `Evaluators.RequestOptions` +**request:** `Humanloop.UpdateAgentLogRequest` + +
+
+ +
+
+ +**requestOptions:** `Agents.RequestOptions`
@@ -4257,7 +5844,7 @@ await client.evaluators.removeDeployment("ev_890bcd", "staging");
-
client.evaluators.listEnvironments(id) -> Humanloop.FileEnvironmentResponse[] +
client.agents.callStream({ ...params }) -> core.Stream
@@ -4269,7 +5856,18 @@ await client.evaluators.removeDeployment("ev_890bcd", "staging");
-List all Environments and their deployed versions for the Evaluator. +Call an Agent. + +Calling an Agent calls the model provider before logging +the request, responses and metadata to Humanloop. + +You can use query parameters `version_id`, or `environment`, to target +an existing version of the Agent. Otherwise the default deployed version will be chosen. + +Instead of targeting an existing version explicitly, you can instead pass in +Agent details in the request body. In this case, we will check if the details correspond +to an existing version of the Agent. If they do not, we will create a new version. This is helpful +in the case where you are storing or deriving your Agent details in code.
@@ -4285,7 +5883,10 @@ List all Environments and their deployed versions for the Evaluator.
```typescript -await client.evaluators.listEnvironments("ev_890bcd"); +const response = await client.agents.callStream({}); +for await (const item of response) { + console.log(item); +} ```
@@ -4301,7 +5902,7 @@ await client.evaluators.listEnvironments("ev_890bcd");
-**id:** `string` — Unique identifier for Evaluator. +**request:** `Humanloop.AgentsCallStreamRequest`
@@ -4309,7 +5910,7 @@ await client.evaluators.listEnvironments("ev_890bcd");
-**requestOptions:** `Evaluators.RequestOptions` +**requestOptions:** `Agents.RequestOptions`
@@ -4320,7 +5921,7 @@ await client.evaluators.listEnvironments("ev_890bcd");
-
client.evaluators.updateMonitoring(id, { ...params }) -> Humanloop.EvaluatorResponse +
client.agents.call({ ...params }) -> Humanloop.AgentCallResponse
@@ -4332,10 +5933,18 @@ await client.evaluators.listEnvironments("ev_890bcd");
-Activate and deactivate Evaluators for monitoring the Evaluator. +Call an Agent. -An activated Evaluator will automatically be run on all new Logs -within the Evaluator for monitoring purposes. +Calling an Agent calls the model provider before logging +the request, responses and metadata to Humanloop. + +You can use query parameters `version_id`, or `environment`, to target +an existing version of the Agent. Otherwise the default deployed version will be chosen. + +Instead of targeting an existing version explicitly, you can instead pass in +Agent details in the request body. In this case, we will check if the details correspond +to an existing version of the Agent. If they do not, we will create a new version. This is helpful +in the case where you are storing or deriving your Agent details in code.
@@ -4351,7 +5960,7 @@ within the Evaluator for monitoring purposes.
```typescript -await client.evaluators.updateMonitoring("id", {}); +await client.agents.call({}); ```
@@ -4367,15 +5976,7 @@ await client.evaluators.updateMonitoring("id", {});
-**id:** `string` - -
-
- -
-
- -**request:** `Humanloop.EvaluatorActivationDeactivationRequest` +**request:** `Humanloop.AgentsCallRequest`
@@ -4383,7 +5984,7 @@ await client.evaluators.updateMonitoring("id", {});
-**requestOptions:** `Evaluators.RequestOptions` +**requestOptions:** `Agents.RequestOptions`
@@ -4394,9 +5995,7 @@ await client.evaluators.updateMonitoring("id", {});
-## Flows - -
client.flows.log({ ...params }) -> Humanloop.CreateFlowLogResponse +
client.agents.continueStream({ ...params }) -> core.Stream
@@ -4408,13 +6007,15 @@ await client.evaluators.updateMonitoring("id", {});
-Log to a Flow. +Continue an incomplete Agent call. -You can use query parameters `version_id`, or `environment`, to target -an existing version of the Flow. Otherwise, the default deployed version will be chosen. +This endpoint allows continuing an existing incomplete Agent call, using the context +from the previous interaction. The Agent will resume processing from where it left off. -If you create the Flow Log with a `log_status` of `incomplete`, you should later update it to `complete` -in order to trigger Evaluators. +The original log must be in an incomplete state to be continued. + +The messages in the request will be appended +to the original messages in the log.
@@ -4430,31 +6031,17 @@ in order to trigger Evaluators.
```typescript -await client.flows.log({ - id: "fl_6o701g4jmcanPVHxdqD0O", - flow: { - attributes: { - prompt: { - template: "You are a helpful assistant helping with medical anamnesis", - model: "gpt-4o", - temperature: 0.8, - }, - tool: { - name: "retrieval_tool_v3", - description: "Retrieval tool for MedQA.", - source_code: "def retrieval_tool(question: str) -> str:\n pass\n", - }, +const response = await client.agents.continueStream({ + logId: "log_id", + messages: [ + { + role: "user", }, - }, - inputs: { - question: - "Patient with a history of diabetes and hypertension presents with chest pain and shortness of breath.", - }, - output: "The patient is likely experiencing a myocardial infarction. Immediate medical attention is required.", - logStatus: "incomplete", - startTime: "2024-07-08T22:40:35", - endTime: "2024-07-08T22:40:39", + ], }); +for await (const item of response) { + console.log(item); +} ```
@@ -4470,7 +6057,7 @@ await client.flows.log({
-**request:** `Humanloop.FlowLogRequest` +**request:** `Humanloop.AgentsContinueStreamRequest`
@@ -4478,7 +6065,7 @@ await client.flows.log({
-**requestOptions:** `Flows.RequestOptions` +**requestOptions:** `Agents.RequestOptions`
@@ -4489,7 +6076,7 @@ await client.flows.log({
-
client.flows.updateLog(logId, { ...params }) -> Humanloop.FlowLogResponse +
client.agents.continue({ ...params }) -> Humanloop.AgentContinueResponse
@@ -4501,12 +6088,15 @@ await client.flows.log({
-Update the status, inputs, output of a Flow Log. +Continue an incomplete Agent call. -Marking a Flow Log as complete will trigger any monitoring Evaluators to run. -Inputs and output (or error) must be provided in order to mark it as complete. +This endpoint allows continuing an existing incomplete Agent call, using the context +from the previous interaction. The Agent will resume processing from where it left off. -The end_time log attribute will be set to match the time the log is marked as complete. +The original log must be in an incomplete state to be continued. + +The messages in the request will be appended +to the original messages in the log.
@@ -4522,14 +6112,13 @@ The end_time log attribute will be set to match the time the log is marked as co
```typescript -await client.flows.updateLog("medqa_experiment_0001", { - inputs: { - question: - "Patient with a history of diabetes and normal tension presents with chest pain and shortness of breath.", - }, - output: "The patient is likely experiencing a myocardial infarction. Immediate medical attention is required.", - logStatus: "complete", - error: undefined, +await client.agents.continue({ + logId: "log_id", + messages: [ + { + role: "user", + }, + ], }); ``` @@ -4546,15 +6135,7 @@ await client.flows.updateLog("medqa_experiment_0001", {
-**logId:** `string` — Unique identifier of the Flow Log. - -
-
- -
-
- -**request:** `Humanloop.UpdateFlowLogRequest` +**request:** `Humanloop.AgentsContinueRequest`
@@ -4562,7 +6143,7 @@ await client.flows.updateLog("medqa_experiment_0001", {
-**requestOptions:** `Flows.RequestOptions` +**requestOptions:** `Agents.RequestOptions`
@@ -4573,7 +6154,7 @@ await client.flows.updateLog("medqa_experiment_0001", {
-
client.flows.get(id, { ...params }) -> Humanloop.FlowResponse +
client.agents.list({ ...params }) -> Humanloop.PaginatedDataAgentResponse
@@ -4585,10 +6166,7 @@ await client.flows.updateLog("medqa_experiment_0001", {
-Retrieve the Flow with the given ID. - -By default, the deployed version of the Flow is returned. Use the query parameters -`version_id` or `environment` to target a specific version of the Flow. +Get a list of all Agents.
@@ -4604,7 +6182,7 @@ By default, the deployed version of the Flow is returned. Use the query paramete
```typescript -await client.flows.get("fl_6o701g4jmcanPVHxdqD0O"); +await client.agents.list(); ```
@@ -4620,15 +6198,7 @@ await client.flows.get("fl_6o701g4jmcanPVHxdqD0O");
-**id:** `string` — Unique identifier for Flow. - -
-
- -
-
- -**request:** `Humanloop.GetFlowsIdGetRequest` +**request:** `Humanloop.ListAgentsGetRequest`
@@ -4636,7 +6206,7 @@ await client.flows.get("fl_6o701g4jmcanPVHxdqD0O");
-**requestOptions:** `Flows.RequestOptions` +**requestOptions:** `Agents.RequestOptions`
@@ -4647,7 +6217,7 @@ await client.flows.get("fl_6o701g4jmcanPVHxdqD0O");
-
client.flows.delete(id) -> void +
client.agents.upsert({ ...params }) -> Humanloop.AgentResponse
@@ -4659,7 +6229,14 @@ await client.flows.get("fl_6o701g4jmcanPVHxdqD0O");
-Delete the Flow with the given ID. +Create an Agent or update it with a new version if it already exists. + +Agents are identified by the `ID` or their `path`. The parameters (i.e. the template, temperature, model etc.) and +tools determine the versions of the Agent. + +You can provide `version_name` and `version_description` to identify and describe your versions. +Version names must be unique within an Agent - attempting to create a version with a name +that already exists will result in a 409 Conflict error.
@@ -4675,7 +6252,9 @@ Delete the Flow with the given ID.
```typescript -await client.flows.delete("fl_6o701g4jmcanPVHxdqD0O"); +await client.agents.upsert({ + model: "model", +}); ```
@@ -4691,7 +6270,7 @@ await client.flows.delete("fl_6o701g4jmcanPVHxdqD0O");
-**id:** `string` — Unique identifier for Flow. +**request:** `Humanloop.AgentRequest`
@@ -4699,7 +6278,7 @@ await client.flows.delete("fl_6o701g4jmcanPVHxdqD0O");
-**requestOptions:** `Flows.RequestOptions` +**requestOptions:** `Agents.RequestOptions`
@@ -4710,7 +6289,7 @@ await client.flows.delete("fl_6o701g4jmcanPVHxdqD0O");
-
client.flows.move(id, { ...params }) -> Humanloop.FlowResponse +
client.agents.deleteAgentVersion(id, versionId) -> void
@@ -4722,7 +6301,7 @@ await client.flows.delete("fl_6o701g4jmcanPVHxdqD0O");
-Move the Flow to a different path or change the name. +Delete a version of the Agent.
@@ -4738,9 +6317,7 @@ Move the Flow to a different path or change the name.
```typescript -await client.flows.move("fl_6o701g4jmcanPVHxdqD0O", { - path: "new directory/new name", -}); +await client.agents.deleteAgentVersion("id", "version_id"); ```
@@ -4756,7 +6333,7 @@ await client.flows.move("fl_6o701g4jmcanPVHxdqD0O", {
-**id:** `string` — Unique identifier for Flow. +**id:** `string` — Unique identifier for Agent.
@@ -4764,7 +6341,7 @@ await client.flows.move("fl_6o701g4jmcanPVHxdqD0O", {
-**request:** `Humanloop.UpdateFlowRequest` +**versionId:** `string` — Unique identifier for the specific version of the Agent.
@@ -4772,7 +6349,7 @@ await client.flows.move("fl_6o701g4jmcanPVHxdqD0O", {
-**requestOptions:** `Flows.RequestOptions` +**requestOptions:** `Agents.RequestOptions`
@@ -4783,7 +6360,7 @@ await client.flows.move("fl_6o701g4jmcanPVHxdqD0O", {
-
client.flows.list({ ...params }) -> core.Page +
client.agents.patchAgentVersion(id, versionId, { ...params }) -> Humanloop.AgentResponse
@@ -4795,7 +6372,7 @@ await client.flows.move("fl_6o701g4jmcanPVHxdqD0O", {
-Get a list of Flows. +Update the name or description of the Agent version.
@@ -4811,20 +6388,7 @@ Get a list of Flows.
```typescript -const response = await client.flows.list({ - size: 1, -}); -for await (const item of response) { - console.log(item); -} - -// Or you can manually iterate page-by-page -const page = await client.flows.list({ - size: 1, -}); -while (page.hasNextPage()) { - page = page.getNextPage(); -} +await client.agents.patchAgentVersion("id", "version_id", {}); ```
@@ -4840,7 +6404,7 @@ while (page.hasNextPage()) {
-**request:** `Humanloop.ListFlowsGetRequest` +**id:** `string` — Unique identifier for Agent.
@@ -4848,7 +6412,23 @@ while (page.hasNextPage()) {
-**requestOptions:** `Flows.RequestOptions` +**versionId:** `string` — Unique identifier for the specific version of the Agent. + +
+
+ +
+
+ +**request:** `Humanloop.UpdateVersionRequest` + +
+
+ +
+
+ +**requestOptions:** `Agents.RequestOptions`
@@ -4859,7 +6439,7 @@ while (page.hasNextPage()) {
-
client.flows.upsert({ ...params }) -> Humanloop.FlowResponse +
client.agents.get(id, { ...params }) -> Humanloop.AgentResponse
@@ -4871,13 +6451,10 @@ while (page.hasNextPage()) {
-Create or update a Flow. - -Flows can also be identified by the `ID` or their `path`. +Retrieve the Agent with the given ID. -If you provide a commit message, then the new version will be committed; -otherwise it will be uncommitted. If you try to commit an already committed version, -an exception will be raised. +By default, the deployed version of the Agent is returned. Use the query parameters +`version_id` or `environment` to target a specific version of the Agent.
@@ -4893,22 +6470,7 @@ an exception will be raised.
```typescript -await client.flows.upsert({ - path: "Personal Projects/MedQA Flow", - attributes: { - prompt: { - template: "You are a helpful medical assistant helping with medical anamnesis. Answer {{question}}", - model: "gpt-4o", - temperature: 0.8, - }, - tool: { - name: "retrieval_tool_v3", - description: "Retrieval tool for MedQA.", - source_code: "def retrieval_tool(question: str) -> str:\n pass\n", - }, - commit_message: "Initial commit", - }, -}); +await client.agents.get("id"); ```
@@ -4924,7 +6486,7 @@ await client.flows.upsert({
-**request:** `Humanloop.FlowRequest` +**id:** `string` — Unique identifier for Agent.
@@ -4932,7 +6494,15 @@ await client.flows.upsert({
-**requestOptions:** `Flows.RequestOptions` +**request:** `Humanloop.GetAgentsIdGetRequest` + +
+
+ +
+
+ +**requestOptions:** `Agents.RequestOptions`
@@ -4943,7 +6513,7 @@ await client.flows.upsert({
-
client.flows.listVersions(id, { ...params }) -> Humanloop.ListFlows +
client.agents.delete(id) -> void
@@ -4955,7 +6525,7 @@ await client.flows.upsert({
-Get a list of all the versions of a Flow. +Delete the Agent with the given ID.
@@ -4971,9 +6541,7 @@ Get a list of all the versions of a Flow.
```typescript -await client.flows.listVersions("fl_6o701g4jmcanPVHxdqD0O", { - status: "committed", -}); +await client.agents.delete("id"); ```
@@ -4989,15 +6557,7 @@ await client.flows.listVersions("fl_6o701g4jmcanPVHxdqD0O", {
-**id:** `string` — Unique identifier for Flow. - -
-
- -
-
- -**request:** `Humanloop.ListVersionsFlowsIdVersionsGetRequest` +**id:** `string` — Unique identifier for Agent.
@@ -5005,7 +6565,7 @@ await client.flows.listVersions("fl_6o701g4jmcanPVHxdqD0O", {
-**requestOptions:** `Flows.RequestOptions` +**requestOptions:** `Agents.RequestOptions`
@@ -5016,7 +6576,7 @@ await client.flows.listVersions("fl_6o701g4jmcanPVHxdqD0O", {
-
client.flows.commit(id, versionId, { ...params }) -> Humanloop.FlowResponse +
client.agents.move(id, { ...params }) -> Humanloop.AgentResponse
@@ -5028,9 +6588,7 @@ await client.flows.listVersions("fl_6o701g4jmcanPVHxdqD0O", {
-Commit a version of the Flow with a commit message. - -If the version is already committed, an exception will be raised. +Move the Agent to a different path or change the name.
@@ -5046,9 +6604,7 @@ If the version is already committed, an exception will be raised.
```typescript -await client.flows.commit("fl_6o701g4jmcanPVHxdqD0O", "flv_6o701g4jmcanPVHxdqD0O", { - commitMessage: "RAG lookup tool bug fixing", -}); +await client.agents.move("id"); ```
@@ -5064,15 +6620,7 @@ await client.flows.commit("fl_6o701g4jmcanPVHxdqD0O", "flv_6o701g4jmcanPVHxdqD0O
-**id:** `string` — Unique identifier for Flow. - -
-
- -
-
- -**versionId:** `string` — Unique identifier for the specific version of the Flow. +**id:** `string` — Unique identifier for Agent.
@@ -5080,7 +6628,7 @@ await client.flows.commit("fl_6o701g4jmcanPVHxdqD0O", "flv_6o701g4jmcanPVHxdqD0O
-**request:** `Humanloop.CommitRequest` +**request:** `Humanloop.UpdateAgentRequest`
@@ -5088,7 +6636,7 @@ await client.flows.commit("fl_6o701g4jmcanPVHxdqD0O", "flv_6o701g4jmcanPVHxdqD0O
-**requestOptions:** `Flows.RequestOptions` +**requestOptions:** `Agents.RequestOptions`
@@ -5099,7 +6647,7 @@ await client.flows.commit("fl_6o701g4jmcanPVHxdqD0O", "flv_6o701g4jmcanPVHxdqD0O
-
client.flows.deleteFlowVersion(id, versionId) -> void +
client.agents.listVersions(id, { ...params }) -> Humanloop.ListAgents
@@ -5111,7 +6659,7 @@ await client.flows.commit("fl_6o701g4jmcanPVHxdqD0O", "flv_6o701g4jmcanPVHxdqD0O
-Delete a version of the Flow. +Get a list of all the versions of a Agent.
@@ -5127,7 +6675,7 @@ Delete a version of the Flow.
```typescript -await client.flows.deleteFlowVersion("id", "version_id"); +await client.agents.listVersions("id"); ```
@@ -5143,7 +6691,7 @@ await client.flows.deleteFlowVersion("id", "version_id");
-**id:** `string` — Unique identifier for Flow. +**id:** `string` — Unique identifier for Agent.
@@ -5151,7 +6699,7 @@ await client.flows.deleteFlowVersion("id", "version_id");
-**versionId:** `string` — Unique identifier for the specific version of the Flow. +**request:** `Humanloop.ListVersionsAgentsIdVersionsGetRequest`
@@ -5159,7 +6707,7 @@ await client.flows.deleteFlowVersion("id", "version_id");
-**requestOptions:** `Flows.RequestOptions` +**requestOptions:** `Agents.RequestOptions`
@@ -5170,7 +6718,7 @@ await client.flows.deleteFlowVersion("id", "version_id");
-
client.flows.setDeployment(id, environmentId, { ...params }) -> Humanloop.FlowResponse +
client.agents.setDeployment(id, environmentId, { ...params }) -> Humanloop.AgentResponse
@@ -5182,10 +6730,10 @@ await client.flows.deleteFlowVersion("id", "version_id");
-Deploy Flow to an Environment. +Deploy Agent to an Environment. -Set the deployed version for the specified Environment. This Flow -will be used for calls made to the Flow in this Environment. +Set the deployed version for the specified Environment. This Agent +will be used for calls made to the Agent in this Environment.
@@ -5201,8 +6749,8 @@ will be used for calls made to the Flow in this Environment.
```typescript -await client.flows.setDeployment("fl_6o701g4jmcanPVHxdqD0O", "staging", { - versionId: "flv_6o701g4jmcanPVHxdqD0O", +await client.agents.setDeployment("id", "environment_id", { + versionId: "version_id", }); ``` @@ -5219,7 +6767,7 @@ await client.flows.setDeployment("fl_6o701g4jmcanPVHxdqD0O", "staging", {
-**id:** `string` — Unique identifier for Flow. +**id:** `string` — Unique identifier for Agent.
@@ -5235,7 +6783,7 @@ await client.flows.setDeployment("fl_6o701g4jmcanPVHxdqD0O", "staging", {
-**request:** `Humanloop.SetDeploymentFlowsIdEnvironmentsEnvironmentIdPostRequest` +**request:** `Humanloop.SetDeploymentAgentsIdEnvironmentsEnvironmentIdPostRequest`
@@ -5243,7 +6791,7 @@ await client.flows.setDeployment("fl_6o701g4jmcanPVHxdqD0O", "staging", {
-**requestOptions:** `Flows.RequestOptions` +**requestOptions:** `Agents.RequestOptions`
@@ -5254,7 +6802,7 @@ await client.flows.setDeployment("fl_6o701g4jmcanPVHxdqD0O", "staging", {
-
client.flows.removeDeployment(id, environmentId) -> void +
client.agents.removeDeployment(id, environmentId) -> void
@@ -5266,10 +6814,10 @@ await client.flows.setDeployment("fl_6o701g4jmcanPVHxdqD0O", "staging", {
-Remove deployed Flow from the Environment. +Remove deployed Agent from the Environment. -Remove the deployed version for the specified Environment. This Flow -will no longer be used for calls made to the Flow in this Environment. +Remove the deployed version for the specified Environment. This Agent +will no longer be used for calls made to the Agent in this Environment.
@@ -5285,7 +6833,7 @@ will no longer be used for calls made to the Flow in this Environment.
```typescript -await client.flows.removeDeployment("fl_6o701g4jmcanPVHxdqD0O", "staging"); +await client.agents.removeDeployment("id", "environment_id"); ```
@@ -5301,7 +6849,7 @@ await client.flows.removeDeployment("fl_6o701g4jmcanPVHxdqD0O", "staging");
-**id:** `string` — Unique identifier for Flow. +**id:** `string` — Unique identifier for Agent.
@@ -5317,7 +6865,7 @@ await client.flows.removeDeployment("fl_6o701g4jmcanPVHxdqD0O", "staging");
-**requestOptions:** `Flows.RequestOptions` +**requestOptions:** `Agents.RequestOptions`
@@ -5328,7 +6876,7 @@ await client.flows.removeDeployment("fl_6o701g4jmcanPVHxdqD0O", "staging");
-
client.flows.listEnvironments(id) -> Humanloop.FileEnvironmentResponse[] +
client.agents.listEnvironments(id) -> Humanloop.FileEnvironmentResponse[]
@@ -5340,7 +6888,7 @@ await client.flows.removeDeployment("fl_6o701g4jmcanPVHxdqD0O", "staging");
-List all Environments and their deployed versions for the Flow. +List all Environments and their deployed versions for the Agent.
@@ -5356,7 +6904,7 @@ List all Environments and their deployed versions for the Flow.
```typescript -await client.flows.listEnvironments("fl_6o701g4jmcanPVHxdqD0O"); +await client.agents.listEnvironments("id"); ```
@@ -5372,7 +6920,7 @@ await client.flows.listEnvironments("fl_6o701g4jmcanPVHxdqD0O");
-**id:** `string` — Unique identifier for Flow. +**id:** `string` — Unique identifier for Agent.
@@ -5380,7 +6928,7 @@ await client.flows.listEnvironments("fl_6o701g4jmcanPVHxdqD0O");
-**requestOptions:** `Flows.RequestOptions` +**requestOptions:** `Agents.RequestOptions`
@@ -5391,7 +6939,7 @@ await client.flows.listEnvironments("fl_6o701g4jmcanPVHxdqD0O");
-
client.flows.updateMonitoring(id, { ...params }) -> Humanloop.FlowResponse +
client.agents.updateMonitoring(id, { ...params }) -> Humanloop.AgentResponse
@@ -5403,10 +6951,10 @@ await client.flows.listEnvironments("fl_6o701g4jmcanPVHxdqD0O");
-Activate and deactivate Evaluators for monitoring the Flow. +Activate and deactivate Evaluators for monitoring the Agent. -An activated Evaluator will automatically be run on all new "completed" Logs -within the Flow for monitoring purposes. +An activated Evaluator will automatically be run on all new Logs +within the Agent for monitoring purposes.
@@ -5422,13 +6970,7 @@ within the Flow for monitoring purposes.
```typescript -await client.flows.updateMonitoring("fl_6o701g4jmcanPVHxdqD0O", { - activate: [ - { - evaluatorVersionId: "evv_1abc4308abd", - }, - ], -}); +await client.agents.updateMonitoring("id", {}); ```
@@ -5460,7 +7002,7 @@ await client.flows.updateMonitoring("fl_6o701g4jmcanPVHxdqD0O", {
-**requestOptions:** `Flows.RequestOptions` +**requestOptions:** `Agents.RequestOptions`
@@ -5792,7 +7334,7 @@ await client.directories.update("id"); ## Files -
client.files.listFiles({ ...params }) -> Humanloop.PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponse +
client.files.listFiles({ ...params }) -> Humanloop.PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseAgentResponse
diff --git a/src/Client.ts b/src/Client.ts index 06394656..7f0ce136 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -9,6 +9,7 @@ import { Tools } from "./api/resources/tools/client/Client"; import { Datasets } from "./api/resources/datasets/client/Client"; import { Evaluators } from "./api/resources/evaluators/client/Client"; import { Flows } from "./api/resources/flows/client/Client"; +import { Agents } from "./api/resources/agents/client/Client"; import { Directories } from "./api/resources/directories/client/Client"; import { Files } from "./api/resources/files/client/Client"; import { Evaluations } from "./api/resources/evaluations/client/Client"; @@ -41,6 +42,7 @@ export class HumanloopClient { protected _datasets: Datasets | undefined; protected _evaluators: Evaluators | undefined; protected _flows: Flows | undefined; + protected _agents: Agents | undefined; protected _directories: Directories | undefined; protected _files: Files | undefined; protected _evaluations: Evaluations | undefined; @@ -68,6 +70,10 @@ export class HumanloopClient { return (this._flows ??= new Flows(this._options)); } + public get agents(): Agents { + return (this._agents ??= new Agents(this._options)); + } + public get directories(): Directories { return (this._directories ??= new Directories(this._options)); } diff --git a/src/api/resources/agents/client/Client.ts b/src/api/resources/agents/client/Client.ts new file mode 100644 index 00000000..44d0d4ed --- /dev/null +++ b/src/api/resources/agents/client/Client.ts @@ -0,0 +1,1754 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as environments from "../../../../environments"; +import * as core from "../../../../core"; +import * as Humanloop from "../../../index"; +import * as serializers from "../../../../serialization/index"; +import urlJoin from "url-join"; +import * as errors from "../../../../errors/index"; +import * as stream from "stream"; + +export declare namespace Agents { + export interface Options { + environment?: core.Supplier; + /** Specify a custom URL to connect the client to. */ + baseUrl?: core.Supplier; + apiKey?: core.Supplier; + fetcher?: core.FetchFunction; + } + + export interface RequestOptions { + /** The maximum time to wait for a response in seconds. */ + timeoutInSeconds?: number; + /** The number of times to retry the request. Defaults to 2. */ + maxRetries?: number; + /** A hook to abort the request. */ + abortSignal?: AbortSignal; + /** Additional headers to include in the request. */ + headers?: Record; + } +} + +export class Agents { + constructor(protected readonly _options: Agents.Options = {}) {} + + /** + * Create an Agent Log. + * + * You can use query parameters `version_id`, or `environment`, to target + * an existing version of the Agent. Otherwise, the default deployed version will be chosen. + * + * If you create the Agent Log with a `log_status` of `incomplete`, you should later update it to `complete` + * in order to trigger Evaluators. + * + * @param {Humanloop.AgentLogRequest} request + * @param {Agents.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Humanloop.UnprocessableEntityError} + * + * @example + * await client.agents.log() + */ + public async log( + request: Humanloop.AgentLogRequest = {}, + requestOptions?: Agents.RequestOptions, + ): Promise { + const { versionId, environment, ..._body } = request; + const _queryParams: Record = {}; + if (versionId != null) { + _queryParams["version_id"] = versionId; + } + + if (environment != null) { + _queryParams["environment"] = environment; + } + + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.HumanloopEnvironment.Default, + "agents/log", + ), + method: "POST", + headers: { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "humanloop", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + ...requestOptions?.headers, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + body: serializers.AgentLogRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.CreateAgentLogResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 422: + throw new Humanloop.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + default: + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.HumanloopTimeoutError("Timeout exceeded when calling POST /agents/log."); + case "unknown": + throw new errors.HumanloopError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Update a Log. + * + * Update the details of a Log with the given ID. + * + * @param {string} id - Unique identifier for Agent. + * @param {string} logId - Unique identifier for the Log. + * @param {Humanloop.UpdateAgentLogRequest} request + * @param {Agents.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Humanloop.UnprocessableEntityError} + * + * @example + * await client.agents.updateLog("id", "log_id") + */ + public async updateLog( + id: string, + logId: string, + request: Humanloop.UpdateAgentLogRequest = {}, + requestOptions?: Agents.RequestOptions, + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.HumanloopEnvironment.Default, + `agents/${encodeURIComponent(id)}/log/${encodeURIComponent(logId)}`, + ), + method: "PATCH", + headers: { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "humanloop", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + body: serializers.UpdateAgentLogRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.LogResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 422: + throw new Humanloop.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + default: + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.HumanloopTimeoutError( + "Timeout exceeded when calling PATCH /agents/{id}/log/{log_id}.", + ); + case "unknown": + throw new errors.HumanloopError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Call an Agent. + * + * Calling an Agent calls the model provider before logging + * the request, responses and metadata to Humanloop. + * + * You can use query parameters `version_id`, or `environment`, to target + * an existing version of the Agent. Otherwise the default deployed version will be chosen. + * + * Instead of targeting an existing version explicitly, you can instead pass in + * Agent details in the request body. In this case, we will check if the details correspond + * to an existing version of the Agent. If they do not, we will create a new version. This is helpful + * in the case where you are storing or deriving your Agent details in code. + */ + public async callStream( + request: Humanloop.AgentsCallStreamRequest, + requestOptions?: Agents.RequestOptions, + ): Promise> { + const { versionId, environment, ..._body } = request; + const _queryParams: Record = {}; + if (versionId != null) { + _queryParams["version_id"] = versionId; + } + + if (environment != null) { + _queryParams["environment"] = environment; + } + + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.HumanloopEnvironment.Default, + "agents/call", + ), + method: "POST", + headers: { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "humanloop", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + ...requestOptions?.headers, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + body: { + ...serializers.AgentsCallStreamRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), + stream: true, + }, + responseType: "sse", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return new core.Stream({ + stream: _response.body, + parse: async (data) => { + return serializers.AgentCallStreamResponse.parseOrThrow(data, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + }, + signal: requestOptions?.abortSignal, + eventShape: { + type: "sse", + streamTerminator: "[DONE]", + }, + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 422: + throw new Humanloop.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + default: + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.HumanloopTimeoutError("Timeout exceeded when calling POST /agents/call."); + case "unknown": + throw new errors.HumanloopError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Call an Agent. + * + * Calling an Agent calls the model provider before logging + * the request, responses and metadata to Humanloop. + * + * You can use query parameters `version_id`, or `environment`, to target + * an existing version of the Agent. Otherwise the default deployed version will be chosen. + * + * Instead of targeting an existing version explicitly, you can instead pass in + * Agent details in the request body. In this case, we will check if the details correspond + * to an existing version of the Agent. If they do not, we will create a new version. This is helpful + * in the case where you are storing or deriving your Agent details in code. + * + * @param {Humanloop.AgentsCallRequest} request + * @param {Agents.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Humanloop.UnprocessableEntityError} + * + * @example + * await client.agents.call({}) + */ + public async call( + request: Humanloop.AgentsCallRequest, + requestOptions?: Agents.RequestOptions, + ): Promise { + const { versionId, environment, ..._body } = request; + const _queryParams: Record = {}; + if (versionId != null) { + _queryParams["version_id"] = versionId; + } + + if (environment != null) { + _queryParams["environment"] = environment; + } + + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.HumanloopEnvironment.Default, + "agents/call", + ), + method: "POST", + headers: { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "humanloop", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + ...requestOptions?.headers, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + body: { + ...serializers.AgentsCallRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), + stream: false, + }, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AgentCallResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 422: + throw new Humanloop.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + default: + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.HumanloopTimeoutError("Timeout exceeded when calling POST /agents/call."); + case "unknown": + throw new errors.HumanloopError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Continue an incomplete Agent call. + * + * This endpoint allows continuing an existing incomplete Agent call, using the context + * from the previous interaction. The Agent will resume processing from where it left off. + * + * The original log must be in an incomplete state to be continued. + * + * The messages in the request will be appended + * to the original messages in the log. + */ + public async continueStream( + request: Humanloop.AgentsContinueStreamRequest, + requestOptions?: Agents.RequestOptions, + ): Promise> { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.HumanloopEnvironment.Default, + "agents/continue", + ), + method: "POST", + headers: { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "humanloop", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + body: { + ...serializers.AgentsContinueStreamRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + stream: true, + }, + responseType: "sse", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return new core.Stream({ + stream: _response.body, + parse: async (data) => { + return serializers.AgentContinueStreamResponse.parseOrThrow(data, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + }, + signal: requestOptions?.abortSignal, + eventShape: { + type: "sse", + streamTerminator: "[DONE]", + }, + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 422: + throw new Humanloop.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + default: + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.HumanloopTimeoutError("Timeout exceeded when calling POST /agents/continue."); + case "unknown": + throw new errors.HumanloopError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Continue an incomplete Agent call. + * + * This endpoint allows continuing an existing incomplete Agent call, using the context + * from the previous interaction. The Agent will resume processing from where it left off. + * + * The original log must be in an incomplete state to be continued. + * + * The messages in the request will be appended + * to the original messages in the log. + * + * @param {Humanloop.AgentsContinueRequest} request + * @param {Agents.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Humanloop.UnprocessableEntityError} + * + * @example + * await client.agents.continue({ + * logId: "log_id", + * messages: [{ + * role: "user" + * }] + * }) + */ + public async continue( + request: Humanloop.AgentsContinueRequest, + requestOptions?: Agents.RequestOptions, + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.HumanloopEnvironment.Default, + "agents/continue", + ), + method: "POST", + headers: { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "humanloop", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + body: { + ...serializers.AgentsContinueRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + stream: false, + }, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AgentContinueResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 422: + throw new Humanloop.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + default: + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.HumanloopTimeoutError("Timeout exceeded when calling POST /agents/continue."); + case "unknown": + throw new errors.HumanloopError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Get a list of all Agents. + * + * @param {Humanloop.ListAgentsGetRequest} request + * @param {Agents.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Humanloop.UnprocessableEntityError} + * + * @example + * await client.agents.list() + */ + public async list( + request: Humanloop.ListAgentsGetRequest = {}, + requestOptions?: Agents.RequestOptions, + ): Promise { + const { page, size, name, userFilter, sortBy, order } = request; + const _queryParams: Record = {}; + if (page != null) { + _queryParams["page"] = page.toString(); + } + + if (size != null) { + _queryParams["size"] = size.toString(); + } + + if (name != null) { + _queryParams["name"] = name; + } + + if (userFilter != null) { + _queryParams["user_filter"] = userFilter; + } + + if (sortBy != null) { + _queryParams["sort_by"] = serializers.ProjectSortBy.jsonOrThrow(sortBy, { + unrecognizedObjectKeys: "strip", + }); + } + + if (order != null) { + _queryParams["order"] = serializers.SortOrder.jsonOrThrow(order, { unrecognizedObjectKeys: "strip" }); + } + + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.HumanloopEnvironment.Default, + "agents", + ), + method: "GET", + headers: { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "humanloop", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + ...requestOptions?.headers, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.PaginatedDataAgentResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 422: + throw new Humanloop.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + default: + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.HumanloopTimeoutError("Timeout exceeded when calling GET /agents."); + case "unknown": + throw new errors.HumanloopError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Create an Agent or update it with a new version if it already exists. + * + * Agents are identified by the `ID` or their `path`. The parameters (i.e. the template, temperature, model etc.) and + * tools determine the versions of the Agent. + * + * You can provide `version_name` and `version_description` to identify and describe your versions. + * Version names must be unique within an Agent - attempting to create a version with a name + * that already exists will result in a 409 Conflict error. + * + * @param {Humanloop.AgentRequest} request + * @param {Agents.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Humanloop.UnprocessableEntityError} + * + * @example + * await client.agents.upsert({ + * model: "model" + * }) + */ + public async upsert( + request: Humanloop.AgentRequest, + requestOptions?: Agents.RequestOptions, + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.HumanloopEnvironment.Default, + "agents", + ), + method: "POST", + headers: { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "humanloop", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + body: serializers.AgentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AgentResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 422: + throw new Humanloop.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + default: + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.HumanloopTimeoutError("Timeout exceeded when calling POST /agents."); + case "unknown": + throw new errors.HumanloopError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Delete a version of the Agent. + * + * @param {string} id - Unique identifier for Agent. + * @param {string} versionId - Unique identifier for the specific version of the Agent. + * @param {Agents.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Humanloop.UnprocessableEntityError} + * + * @example + * await client.agents.deleteAgentVersion("id", "version_id") + */ + public async deleteAgentVersion( + id: string, + versionId: string, + requestOptions?: Agents.RequestOptions, + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.HumanloopEnvironment.Default, + `agents/${encodeURIComponent(id)}/versions/${encodeURIComponent(versionId)}`, + ), + method: "DELETE", + headers: { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "humanloop", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 422: + throw new Humanloop.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + default: + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.HumanloopTimeoutError( + "Timeout exceeded when calling DELETE /agents/{id}/versions/{version_id}.", + ); + case "unknown": + throw new errors.HumanloopError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Update the name or description of the Agent version. + * + * @param {string} id - Unique identifier for Agent. + * @param {string} versionId - Unique identifier for the specific version of the Agent. + * @param {Humanloop.UpdateVersionRequest} request + * @param {Agents.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Humanloop.UnprocessableEntityError} + * + * @example + * await client.agents.patchAgentVersion("id", "version_id", {}) + */ + public async patchAgentVersion( + id: string, + versionId: string, + request: Humanloop.UpdateVersionRequest, + requestOptions?: Agents.RequestOptions, + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.HumanloopEnvironment.Default, + `agents/${encodeURIComponent(id)}/versions/${encodeURIComponent(versionId)}`, + ), + method: "PATCH", + headers: { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "humanloop", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + body: serializers.UpdateVersionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AgentResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 422: + throw new Humanloop.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + default: + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.HumanloopTimeoutError( + "Timeout exceeded when calling PATCH /agents/{id}/versions/{version_id}.", + ); + case "unknown": + throw new errors.HumanloopError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Retrieve the Agent with the given ID. + * + * By default, the deployed version of the Agent is returned. Use the query parameters + * `version_id` or `environment` to target a specific version of the Agent. + * + * @param {string} id - Unique identifier for Agent. + * @param {Humanloop.GetAgentsIdGetRequest} request + * @param {Agents.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Humanloop.UnprocessableEntityError} + * + * @example + * await client.agents.get("id") + */ + public async get( + id: string, + request: Humanloop.GetAgentsIdGetRequest = {}, + requestOptions?: Agents.RequestOptions, + ): Promise { + const { versionId, environment } = request; + const _queryParams: Record = {}; + if (versionId != null) { + _queryParams["version_id"] = versionId; + } + + if (environment != null) { + _queryParams["environment"] = environment; + } + + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.HumanloopEnvironment.Default, + `agents/${encodeURIComponent(id)}`, + ), + method: "GET", + headers: { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "humanloop", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + ...requestOptions?.headers, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AgentResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 422: + throw new Humanloop.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + default: + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.HumanloopTimeoutError("Timeout exceeded when calling GET /agents/{id}."); + case "unknown": + throw new errors.HumanloopError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Delete the Agent with the given ID. + * + * @param {string} id - Unique identifier for Agent. + * @param {Agents.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Humanloop.UnprocessableEntityError} + * + * @example + * await client.agents.delete("id") + */ + public async delete(id: string, requestOptions?: Agents.RequestOptions): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.HumanloopEnvironment.Default, + `agents/${encodeURIComponent(id)}`, + ), + method: "DELETE", + headers: { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "humanloop", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 422: + throw new Humanloop.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + default: + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.HumanloopTimeoutError("Timeout exceeded when calling DELETE /agents/{id}."); + case "unknown": + throw new errors.HumanloopError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Move the Agent to a different path or change the name. + * + * @param {string} id - Unique identifier for Agent. + * @param {Humanloop.UpdateAgentRequest} request + * @param {Agents.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Humanloop.UnprocessableEntityError} + * + * @example + * await client.agents.move("id") + */ + public async move( + id: string, + request: Humanloop.UpdateAgentRequest = {}, + requestOptions?: Agents.RequestOptions, + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.HumanloopEnvironment.Default, + `agents/${encodeURIComponent(id)}`, + ), + method: "PATCH", + headers: { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "humanloop", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + body: serializers.UpdateAgentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AgentResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 422: + throw new Humanloop.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + default: + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.HumanloopTimeoutError("Timeout exceeded when calling PATCH /agents/{id}."); + case "unknown": + throw new errors.HumanloopError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Get a list of all the versions of a Agent. + * + * @param {string} id - Unique identifier for Agent. + * @param {Humanloop.ListVersionsAgentsIdVersionsGetRequest} request + * @param {Agents.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Humanloop.UnprocessableEntityError} + * + * @example + * await client.agents.listVersions("id") + */ + public async listVersions( + id: string, + request: Humanloop.ListVersionsAgentsIdVersionsGetRequest = {}, + requestOptions?: Agents.RequestOptions, + ): Promise { + const { evaluatorAggregates } = request; + const _queryParams: Record = {}; + if (evaluatorAggregates != null) { + _queryParams["evaluator_aggregates"] = evaluatorAggregates.toString(); + } + + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.HumanloopEnvironment.Default, + `agents/${encodeURIComponent(id)}/versions`, + ), + method: "GET", + headers: { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "humanloop", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + ...requestOptions?.headers, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.ListAgents.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 422: + throw new Humanloop.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + default: + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.HumanloopTimeoutError("Timeout exceeded when calling GET /agents/{id}/versions."); + case "unknown": + throw new errors.HumanloopError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Deploy Agent to an Environment. + * + * Set the deployed version for the specified Environment. This Agent + * will be used for calls made to the Agent in this Environment. + * + * @param {string} id - Unique identifier for Agent. + * @param {string} environmentId - Unique identifier for the Environment to deploy the Version to. + * @param {Humanloop.SetDeploymentAgentsIdEnvironmentsEnvironmentIdPostRequest} request + * @param {Agents.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Humanloop.UnprocessableEntityError} + * + * @example + * await client.agents.setDeployment("id", "environment_id", { + * versionId: "version_id" + * }) + */ + public async setDeployment( + id: string, + environmentId: string, + request: Humanloop.SetDeploymentAgentsIdEnvironmentsEnvironmentIdPostRequest, + requestOptions?: Agents.RequestOptions, + ): Promise { + const { versionId } = request; + const _queryParams: Record = {}; + _queryParams["version_id"] = versionId; + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.HumanloopEnvironment.Default, + `agents/${encodeURIComponent(id)}/environments/${encodeURIComponent(environmentId)}`, + ), + method: "POST", + headers: { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "humanloop", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + ...requestOptions?.headers, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AgentResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 422: + throw new Humanloop.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + default: + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.HumanloopTimeoutError( + "Timeout exceeded when calling POST /agents/{id}/environments/{environment_id}.", + ); + case "unknown": + throw new errors.HumanloopError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Remove deployed Agent from the Environment. + * + * Remove the deployed version for the specified Environment. This Agent + * will no longer be used for calls made to the Agent in this Environment. + * + * @param {string} id - Unique identifier for Agent. + * @param {string} environmentId - Unique identifier for the Environment to remove the deployment from. + * @param {Agents.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Humanloop.UnprocessableEntityError} + * + * @example + * await client.agents.removeDeployment("id", "environment_id") + */ + public async removeDeployment( + id: string, + environmentId: string, + requestOptions?: Agents.RequestOptions, + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.HumanloopEnvironment.Default, + `agents/${encodeURIComponent(id)}/environments/${encodeURIComponent(environmentId)}`, + ), + method: "DELETE", + headers: { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "humanloop", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return; + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 422: + throw new Humanloop.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + default: + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.HumanloopTimeoutError( + "Timeout exceeded when calling DELETE /agents/{id}/environments/{environment_id}.", + ); + case "unknown": + throw new errors.HumanloopError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * List all Environments and their deployed versions for the Agent. + * + * @param {string} id - Unique identifier for Agent. + * @param {Agents.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Humanloop.UnprocessableEntityError} + * + * @example + * await client.agents.listEnvironments("id") + */ + public async listEnvironments( + id: string, + requestOptions?: Agents.RequestOptions, + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.HumanloopEnvironment.Default, + `agents/${encodeURIComponent(id)}/environments`, + ), + method: "GET", + headers: { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "humanloop", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.agents.listEnvironments.Response.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 422: + throw new Humanloop.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + default: + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.HumanloopTimeoutError("Timeout exceeded when calling GET /agents/{id}/environments."); + case "unknown": + throw new errors.HumanloopError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Activate and deactivate Evaluators for monitoring the Agent. + * + * An activated Evaluator will automatically be run on all new Logs + * within the Agent for monitoring purposes. + * + * @param {string} id + * @param {Humanloop.EvaluatorActivationDeactivationRequest} request + * @param {Agents.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Humanloop.UnprocessableEntityError} + * + * @example + * await client.agents.updateMonitoring("id", {}) + */ + public async updateMonitoring( + id: string, + request: Humanloop.EvaluatorActivationDeactivationRequest, + requestOptions?: Agents.RequestOptions, + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.HumanloopEnvironment.Default, + `agents/${encodeURIComponent(id)}/evaluators`, + ), + method: "POST", + headers: { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "humanloop", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + body: serializers.EvaluatorActivationDeactivationRequest.jsonOrThrow(request, { + unrecognizedObjectKeys: "strip", + }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.AgentResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 422: + throw new Humanloop.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + default: + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.HumanloopTimeoutError("Timeout exceeded when calling POST /agents/{id}/evaluators."); + case "unknown": + throw new errors.HumanloopError({ + message: _response.error.errorMessage, + }); + } + } + + protected async _getCustomAuthorizationHeaders() { + const apiKeyValue = (await core.Supplier.get(this._options.apiKey)) ?? process?.env["HUMANLOOP_API_KEY"]; + return { "X-API-KEY": apiKeyValue }; + } +} diff --git a/src/api/resources/agents/client/index.ts b/src/api/resources/agents/client/index.ts new file mode 100644 index 00000000..415726b7 --- /dev/null +++ b/src/api/resources/agents/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/api/resources/agents/client/requests/AgentLogRequest.ts b/src/api/resources/agents/client/requests/AgentLogRequest.ts new file mode 100644 index 00000000..39e615a7 --- /dev/null +++ b/src/api/resources/agents/client/requests/AgentLogRequest.ts @@ -0,0 +1,90 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../../../../index"; + +/** + * @example + * {} + */ +export interface AgentLogRequest { + /** + * A specific Version ID of the Agent to log to. + */ + versionId?: string; + /** + * Name of the Environment identifying a deployed version to log to. + */ + environment?: string; + /** Unique identifier for the Run to associate the Log to. */ + runId?: string; + /** Path of the Agent, including the name. This locates the Agent in the Humanloop filesystem and is used as as a unique identifier. For example: `folder/name` or just `name`. */ + path?: string; + /** ID for an existing Agent. */ + id?: string; + /** The message returned by the provider. */ + outputMessage?: Humanloop.ChatMessage; + /** Number of tokens in the prompt used to generate the output. */ + promptTokens?: number; + /** Number of reasoning tokens used to generate the output. */ + reasoningTokens?: number; + /** Number of tokens in the output generated by the model. */ + outputTokens?: number; + /** Cost in dollars associated to the tokens in the prompt. */ + promptCost?: number; + /** Cost in dollars associated to the tokens in the output. */ + outputCost?: number; + /** Reason the generation finished. */ + finishReason?: string; + /** The messages passed to the to provider chat endpoint. */ + messages?: Humanloop.ChatMessage[]; + /** + * Controls how the model uses tools. The following options are supported: + * - `'none'` means the model will not call any tool and instead generates a message; this is the default when no tools are provided as part of the Prompt. + * - `'auto'` means the model can decide to call one or more of the provided tools; this is the default when tools are provided as part of the Prompt. + * - `'required'` means the model must call one or more of the provided tools. + * - `{'type': 'function', 'function': {name': }}` forces the model to use the named function. + */ + toolChoice?: Humanloop.AgentLogRequestToolChoice; + /** Details of your Agent. A new Agent version will be created if the provided details are new. */ + agent?: Humanloop.AgentKernelRequest; + /** When the logged event started. */ + startTime?: Date; + /** When the logged event ended. */ + endTime?: Date; + /** Generated output from your model for the provided inputs. Can be `None` if logging an error, or if creating a parent Log with the intention to populate it later. */ + output?: string; + /** User defined timestamp for when the log was created. */ + createdAt?: Date; + /** Error message if the log is an error. */ + error?: string; + /** Duration of the logged event in seconds. */ + providerLatency?: number; + /** Captured log and debug statements. */ + stdout?: string; + /** Raw request sent to provider. */ + providerRequest?: Record; + /** Raw response received the provider. */ + providerResponse?: Record; + /** The inputs passed to the prompt template. */ + inputs?: Record; + /** Identifies where the model was called from. */ + source?: string; + /** Any additional metadata to record. */ + metadata?: Record; + /** Status of a Log. Set to `incomplete` if you intend to update and eventually complete the Log and want the File's monitoring Evaluators to wait until you mark it as `complete`. If log_status is not provided, observability will pick up the Log as soon as possible. Updating this from specified to unspecified is undefined behavior. */ + logStatus?: Humanloop.LogStatus; + /** Unique identifier for the Datapoint that this Log is derived from. This can be used by Humanloop to associate Logs to Evaluations. If provided, Humanloop will automatically associate this Log to Evaluations that require a Log for this Datapoint-Version pair. */ + sourceDatapointId?: string; + /** The ID of the parent Log to nest this Log under in a Trace. */ + traceParentId?: string; + /** End-user ID related to the Log. */ + user?: string; + /** The name of the Environment the Log is associated to. */ + agentLogRequestEnvironment?: string; + /** Whether the request/response payloads will be stored on Humanloop. */ + save?: boolean; + /** This will identify a Log. If you don't provide a Log ID, Humanloop will generate one for you. */ + logId?: string; +} diff --git a/src/api/resources/agents/client/requests/AgentRequest.ts b/src/api/resources/agents/client/requests/AgentRequest.ts new file mode 100644 index 00000000..a7106627 --- /dev/null +++ b/src/api/resources/agents/client/requests/AgentRequest.ts @@ -0,0 +1,70 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../../../../index"; + +/** + * @example + * { + * model: "model" + * } + */ +export interface AgentRequest { + /** Path of the Agent, including the name. This locates the Agent in the Humanloop filesystem and is used as as a unique identifier. For example: `folder/name` or just `name`. */ + path?: string; + /** ID for an existing Agent. */ + id?: string; + /** The model instance used, e.g. `gpt-4`. See [supported models](https://humanloop.com/docs/reference/supported-models) */ + model: string; + /** The provider model endpoint used. */ + endpoint?: Humanloop.ModelEndpoints; + /** + * The template contains the main structure and instructions for the model, including input variables for dynamic values. + * + * For chat models, provide the template as a ChatTemplate (a list of messages), e.g. a system message, followed by a user message with an input variable. + * For completion models, provide a prompt template as a string. + * + * Input variables should be specified with double curly bracket syntax: `{{input_name}}`. + */ + template?: Humanloop.AgentRequestTemplate; + /** The template language to use for rendering the template. */ + templateLanguage?: Humanloop.TemplateLanguage; + /** The company providing the underlying model service. */ + provider?: Humanloop.ModelProviders; + /** The maximum number of tokens to generate. Provide max_tokens=-1 to dynamically calculate the maximum number of tokens to generate given the length of the prompt */ + maxTokens?: number; + /** What sampling temperature to use when making a generation. Higher values means the model will be more creative. */ + temperature?: number; + /** An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. */ + topP?: number; + /** The string (or list of strings) after which the model will stop generating. The returned text will not contain the stop sequence. */ + stop?: Humanloop.AgentRequestStop; + /** Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the generation so far. */ + presencePenalty?: number; + /** Number between -2.0 and 2.0. Positive values penalize new tokens based on how frequently they appear in the generation so far. */ + frequencyPenalty?: number; + /** Other parameter values to be passed to the provider call. */ + other?: Record; + /** If specified, model will make a best effort to sample deterministically, but it is not guaranteed. */ + seed?: number; + /** The format of the response. Only `{"type": "json_object"}` is currently supported for chat. */ + responseFormat?: Humanloop.ResponseFormat; + /** Guidance on how many reasoning tokens it should generate before creating a response to the prompt. OpenAI reasoning models (o1, o3-mini) expect a OpenAIReasoningEffort enum. Anthropic reasoning models expect an integer, which signifies the maximum token budget. */ + reasoningEffort?: Humanloop.AgentRequestReasoningEffort; + tools?: Humanloop.AgentRequestToolsItem[]; + /** Additional fields to describe the Prompt. Helpful to separate Prompt versions from each other with details on how they were created or used. */ + attributes?: Record; + /** The maximum number of iterations the Agent can run. This is used to limit the number of times the Agent model is called. */ + maxIterations?: number; + /** Unique name for the Prompt version. Each Prompt can only have one version with a given name. */ + versionName?: string; + /** Description of the Version. */ + versionDescription?: string; + /** Description of the Prompt. */ + description?: string; + /** List of tags associated with this prompt. */ + tags?: string[]; + /** Long description of the Prompt. */ + readme?: string; +} diff --git a/src/api/resources/agents/client/requests/AgentsCallRequest.ts b/src/api/resources/agents/client/requests/AgentsCallRequest.ts new file mode 100644 index 00000000..351ef3ab --- /dev/null +++ b/src/api/resources/agents/client/requests/AgentsCallRequest.ts @@ -0,0 +1,64 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../../../../index"; + +/** + * @example + * {} + */ +export interface AgentsCallRequest { + /** + * A specific Version ID of the Agent to log to. + */ + versionId?: string; + /** + * Name of the Environment identifying a deployed version to log to. + */ + environment?: string; + /** Path of the Agent, including the name. This locates the Agent in the Humanloop filesystem and is used as as a unique identifier. For example: `folder/name` or just `name`. */ + path?: string; + /** ID for an existing Agent. */ + id?: string; + /** The messages passed to the to provider chat endpoint. */ + messages?: Humanloop.ChatMessage[]; + /** + * Controls how the model uses tools. The following options are supported: + * - `'none'` means the model will not call any tool and instead generates a message; this is the default when no tools are provided as part of the Prompt. + * - `'auto'` means the model can decide to call one or more of the provided tools; this is the default when tools are provided as part of the Prompt. + * - `'required'` means the model must call one or more of the provided tools. + * - `{'type': 'function', 'function': {name': }}` forces the model to use the named function. + */ + toolChoice?: Humanloop.AgentsCallRequestToolChoice; + /** Details of your Agent. A new Agent version will be created if the provided details are new. */ + agent?: Humanloop.AgentKernelRequest; + /** The inputs passed to the prompt template. */ + inputs?: Record; + /** Identifies where the model was called from. */ + source?: string; + /** Any additional metadata to record. */ + metadata?: Record; + /** When the logged event started. */ + startTime?: Date; + /** When the logged event ended. */ + endTime?: Date; + /** Status of a Log. Set to `incomplete` if you intend to update and eventually complete the Log and want the File's monitoring Evaluators to wait until you mark it as `complete`. If log_status is not provided, observability will pick up the Log as soon as possible. Updating this from specified to unspecified is undefined behavior. */ + logStatus?: Humanloop.LogStatus; + /** Unique identifier for the Datapoint that this Log is derived from. This can be used by Humanloop to associate Logs to Evaluations. If provided, Humanloop will automatically associate this Log to Evaluations that require a Log for this Datapoint-Version pair. */ + sourceDatapointId?: string; + /** The ID of the parent Log to nest this Log under in a Trace. */ + traceParentId?: string; + /** End-user ID related to the Log. */ + user?: string; + /** The name of the Environment the Log is associated to. */ + agentsCallRequestEnvironment?: string; + /** Whether the request/response payloads will be stored on Humanloop. */ + save?: boolean; + /** This will identify a Log. If you don't provide a Log ID, Humanloop will generate one for you. */ + logId?: string; + /** API keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization. */ + providerApiKeys?: Humanloop.ProviderApiKeys; + /** Whether to return the inputs in the response. If false, the response will contain an empty dictionary under inputs. This is useful for reducing the size of the response. Defaults to true. */ + returnInputs?: boolean; +} diff --git a/src/api/resources/agents/client/requests/AgentsCallStreamRequest.ts b/src/api/resources/agents/client/requests/AgentsCallStreamRequest.ts new file mode 100644 index 00000000..73c644c8 --- /dev/null +++ b/src/api/resources/agents/client/requests/AgentsCallStreamRequest.ts @@ -0,0 +1,64 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../../../../index"; + +/** + * @example + * {} + */ +export interface AgentsCallStreamRequest { + /** + * A specific Version ID of the Agent to log to. + */ + versionId?: string; + /** + * Name of the Environment identifying a deployed version to log to. + */ + environment?: string; + /** Path of the Agent, including the name. This locates the Agent in the Humanloop filesystem and is used as as a unique identifier. For example: `folder/name` or just `name`. */ + path?: string; + /** ID for an existing Agent. */ + id?: string; + /** The messages passed to the to provider chat endpoint. */ + messages?: Humanloop.ChatMessage[]; + /** + * Controls how the model uses tools. The following options are supported: + * - `'none'` means the model will not call any tool and instead generates a message; this is the default when no tools are provided as part of the Prompt. + * - `'auto'` means the model can decide to call one or more of the provided tools; this is the default when tools are provided as part of the Prompt. + * - `'required'` means the model must call one or more of the provided tools. + * - `{'type': 'function', 'function': {name': }}` forces the model to use the named function. + */ + toolChoice?: Humanloop.AgentsCallStreamRequestToolChoice; + /** Details of your Agent. A new Agent version will be created if the provided details are new. */ + agent?: Humanloop.AgentKernelRequest; + /** The inputs passed to the prompt template. */ + inputs?: Record; + /** Identifies where the model was called from. */ + source?: string; + /** Any additional metadata to record. */ + metadata?: Record; + /** When the logged event started. */ + startTime?: Date; + /** When the logged event ended. */ + endTime?: Date; + /** Status of a Log. Set to `incomplete` if you intend to update and eventually complete the Log and want the File's monitoring Evaluators to wait until you mark it as `complete`. If log_status is not provided, observability will pick up the Log as soon as possible. Updating this from specified to unspecified is undefined behavior. */ + logStatus?: Humanloop.LogStatus; + /** Unique identifier for the Datapoint that this Log is derived from. This can be used by Humanloop to associate Logs to Evaluations. If provided, Humanloop will automatically associate this Log to Evaluations that require a Log for this Datapoint-Version pair. */ + sourceDatapointId?: string; + /** The ID of the parent Log to nest this Log under in a Trace. */ + traceParentId?: string; + /** End-user ID related to the Log. */ + user?: string; + /** The name of the Environment the Log is associated to. */ + agentsCallStreamRequestEnvironment?: string; + /** Whether the request/response payloads will be stored on Humanloop. */ + save?: boolean; + /** This will identify a Log. If you don't provide a Log ID, Humanloop will generate one for you. */ + logId?: string; + /** API keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization. */ + providerApiKeys?: Humanloop.ProviderApiKeys; + /** Whether to return the inputs in the response. If false, the response will contain an empty dictionary under inputs. This is useful for reducing the size of the response. Defaults to true. */ + returnInputs?: boolean; +} diff --git a/src/api/resources/agents/client/requests/AgentsContinueRequest.ts b/src/api/resources/agents/client/requests/AgentsContinueRequest.ts new file mode 100644 index 00000000..6726bfe1 --- /dev/null +++ b/src/api/resources/agents/client/requests/AgentsContinueRequest.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../../../../index"; + +/** + * @example + * { + * logId: "log_id", + * messages: [{ + * role: "user" + * }] + * } + */ +export interface AgentsContinueRequest { + /** This identifies the Agent Log to continue. */ + logId: string; + /** The additional messages with which to continue the Agent Log. Often, these should start with the Tool messages with results for the previous Assistant message's tool calls. */ + messages: Humanloop.ChatMessage[]; + /** API keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization. */ + providerApiKeys?: Humanloop.ProviderApiKeys; +} diff --git a/src/api/resources/agents/client/requests/AgentsContinueStreamRequest.ts b/src/api/resources/agents/client/requests/AgentsContinueStreamRequest.ts new file mode 100644 index 00000000..d3855f1b --- /dev/null +++ b/src/api/resources/agents/client/requests/AgentsContinueStreamRequest.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../../../../index"; + +/** + * @example + * { + * logId: "log_id", + * messages: [{ + * role: "user" + * }] + * } + */ +export interface AgentsContinueStreamRequest { + /** This identifies the Agent Log to continue. */ + logId: string; + /** The additional messages with which to continue the Agent Log. Often, these should start with the Tool messages with results for the previous Assistant message's tool calls. */ + messages: Humanloop.ChatMessage[]; + /** API keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization. */ + providerApiKeys?: Humanloop.ProviderApiKeys; +} diff --git a/src/api/resources/agents/client/requests/GetAgentsIdGetRequest.ts b/src/api/resources/agents/client/requests/GetAgentsIdGetRequest.ts new file mode 100644 index 00000000..75206d60 --- /dev/null +++ b/src/api/resources/agents/client/requests/GetAgentsIdGetRequest.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * {} + */ +export interface GetAgentsIdGetRequest { + /** + * A specific Version ID of the Agent to retrieve. + */ + versionId?: string; + /** + * Name of the Environment to retrieve a deployed Version from. + */ + environment?: string; +} diff --git a/src/api/resources/agents/client/requests/ListAgentsGetRequest.ts b/src/api/resources/agents/client/requests/ListAgentsGetRequest.ts new file mode 100644 index 00000000..0d629ddc --- /dev/null +++ b/src/api/resources/agents/client/requests/ListAgentsGetRequest.ts @@ -0,0 +1,36 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../../../../index"; + +/** + * @example + * {} + */ +export interface ListAgentsGetRequest { + /** + * Page number for pagination. + */ + page?: number; + /** + * Page size for pagination. Number of Agents to fetch. + */ + size?: number; + /** + * Case-insensitive filter for Agent name. + */ + name?: string; + /** + * Case-insensitive filter for users in the Agent. This filter matches against both email address and name of users. + */ + userFilter?: string; + /** + * Field to sort Agents by + */ + sortBy?: Humanloop.ProjectSortBy; + /** + * Direction to sort by. + */ + order?: Humanloop.SortOrder; +} diff --git a/src/api/resources/agents/client/requests/ListVersionsAgentsIdVersionsGetRequest.ts b/src/api/resources/agents/client/requests/ListVersionsAgentsIdVersionsGetRequest.ts new file mode 100644 index 00000000..5f08fbc0 --- /dev/null +++ b/src/api/resources/agents/client/requests/ListVersionsAgentsIdVersionsGetRequest.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * {} + */ +export interface ListVersionsAgentsIdVersionsGetRequest { + /** + * Whether to include Evaluator aggregate results for the versions in the response + */ + evaluatorAggregates?: boolean; +} diff --git a/src/api/resources/agents/client/requests/SetDeploymentAgentsIdEnvironmentsEnvironmentIdPostRequest.ts b/src/api/resources/agents/client/requests/SetDeploymentAgentsIdEnvironmentsEnvironmentIdPostRequest.ts new file mode 100644 index 00000000..73ddbe8c --- /dev/null +++ b/src/api/resources/agents/client/requests/SetDeploymentAgentsIdEnvironmentsEnvironmentIdPostRequest.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * { + * versionId: "version_id" + * } + */ +export interface SetDeploymentAgentsIdEnvironmentsEnvironmentIdPostRequest { + /** + * Unique identifier for the specific version of the Agent. + */ + versionId: string; +} diff --git a/src/api/resources/agents/client/requests/UpdateAgentLogRequest.ts b/src/api/resources/agents/client/requests/UpdateAgentLogRequest.ts new file mode 100644 index 00000000..fb5d7d07 --- /dev/null +++ b/src/api/resources/agents/client/requests/UpdateAgentLogRequest.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../../../../index"; + +/** + * @example + * {} + */ +export interface UpdateAgentLogRequest { + /** List of chat messages that were used as an input to the Flow. */ + messages?: Humanloop.ChatMessage[]; + /** The output message returned by this Flow. */ + outputMessage?: Humanloop.ChatMessage; + /** The inputs passed to the Flow Log. */ + inputs?: Record; + /** The output of the Flow Log. Provide None to unset existing `output` value. Provide either this, `output_message` or `error`. */ + output?: string; + /** The error message of the Flow Log. Provide None to unset existing `error` value. Provide either this, `output_message` or `output`. */ + error?: string; + /** Status of the Flow Log. When a Flow Log is updated to `complete`, no more Logs can be added to it. Monitoring Evaluators will only run on `complete` Flow Logs. */ + logStatus?: Humanloop.LogStatus; +} diff --git a/src/api/resources/agents/client/requests/UpdateAgentRequest.ts b/src/api/resources/agents/client/requests/UpdateAgentRequest.ts new file mode 100644 index 00000000..3606daed --- /dev/null +++ b/src/api/resources/agents/client/requests/UpdateAgentRequest.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * @example + * {} + */ +export interface UpdateAgentRequest { + /** Path of the Flow including the Flow name, which is used as a unique identifier. */ + path?: string; + /** Name of the Flow. */ + name?: string; + /** Unique identifier for the Directory to move Flow to. Starts with `dir_`. */ + directoryId?: string; +} diff --git a/src/api/resources/agents/client/requests/index.ts b/src/api/resources/agents/client/requests/index.ts new file mode 100644 index 00000000..5db3b6c5 --- /dev/null +++ b/src/api/resources/agents/client/requests/index.ts @@ -0,0 +1,12 @@ +export { type AgentLogRequest } from "./AgentLogRequest"; +export { type UpdateAgentLogRequest } from "./UpdateAgentLogRequest"; +export { type AgentsCallStreamRequest } from "./AgentsCallStreamRequest"; +export { type AgentsCallRequest } from "./AgentsCallRequest"; +export { type AgentsContinueStreamRequest } from "./AgentsContinueStreamRequest"; +export { type AgentsContinueRequest } from "./AgentsContinueRequest"; +export { type ListAgentsGetRequest } from "./ListAgentsGetRequest"; +export { type AgentRequest } from "./AgentRequest"; +export { type GetAgentsIdGetRequest } from "./GetAgentsIdGetRequest"; +export { type UpdateAgentRequest } from "./UpdateAgentRequest"; +export { type ListVersionsAgentsIdVersionsGetRequest } from "./ListVersionsAgentsIdVersionsGetRequest"; +export { type SetDeploymentAgentsIdEnvironmentsEnvironmentIdPostRequest } from "./SetDeploymentAgentsIdEnvironmentsEnvironmentIdPostRequest"; diff --git a/src/api/resources/agents/index.ts b/src/api/resources/agents/index.ts new file mode 100644 index 00000000..c9240f83 --- /dev/null +++ b/src/api/resources/agents/index.ts @@ -0,0 +1,2 @@ +export * from "./types"; +export * from "./client"; diff --git a/src/api/resources/agents/types/AgentLogRequestToolChoice.ts b/src/api/resources/agents/types/AgentLogRequestToolChoice.ts new file mode 100644 index 00000000..d704a5f1 --- /dev/null +++ b/src/api/resources/agents/types/AgentLogRequestToolChoice.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../../../index"; + +/** + * Controls how the model uses tools. The following options are supported: + * - `'none'` means the model will not call any tool and instead generates a message; this is the default when no tools are provided as part of the Prompt. + * - `'auto'` means the model can decide to call one or more of the provided tools; this is the default when tools are provided as part of the Prompt. + * - `'required'` means the model must call one or more of the provided tools. + * - `{'type': 'function', 'function': {name': }}` forces the model to use the named function. + */ +export type AgentLogRequestToolChoice = "none" | "auto" | "required" | Humanloop.ToolChoice; diff --git a/src/api/resources/agents/types/AgentRequestReasoningEffort.ts b/src/api/resources/agents/types/AgentRequestReasoningEffort.ts new file mode 100644 index 00000000..41181f64 --- /dev/null +++ b/src/api/resources/agents/types/AgentRequestReasoningEffort.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../../../index"; + +/** + * Guidance on how many reasoning tokens it should generate before creating a response to the prompt. OpenAI reasoning models (o1, o3-mini) expect a OpenAIReasoningEffort enum. Anthropic reasoning models expect an integer, which signifies the maximum token budget. + */ +export type AgentRequestReasoningEffort = Humanloop.OpenAiReasoningEffort | number; diff --git a/src/api/resources/agents/types/AgentRequestStop.ts b/src/api/resources/agents/types/AgentRequestStop.ts new file mode 100644 index 00000000..bd491af4 --- /dev/null +++ b/src/api/resources/agents/types/AgentRequestStop.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * The string (or list of strings) after which the model will stop generating. The returned text will not contain the stop sequence. + */ +export type AgentRequestStop = string | string[]; diff --git a/src/api/resources/agents/types/AgentRequestTemplate.ts b/src/api/resources/agents/types/AgentRequestTemplate.ts new file mode 100644 index 00000000..099cecb7 --- /dev/null +++ b/src/api/resources/agents/types/AgentRequestTemplate.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../../../index"; + +/** + * The template contains the main structure and instructions for the model, including input variables for dynamic values. + * + * For chat models, provide the template as a ChatTemplate (a list of messages), e.g. a system message, followed by a user message with an input variable. + * For completion models, provide a prompt template as a string. + * + * Input variables should be specified with double curly bracket syntax: `{{input_name}}`. + */ +export type AgentRequestTemplate = string | Humanloop.ChatMessage[]; diff --git a/src/api/resources/agents/types/AgentRequestToolsItem.ts b/src/api/resources/agents/types/AgentRequestToolsItem.ts new file mode 100644 index 00000000..2033e534 --- /dev/null +++ b/src/api/resources/agents/types/AgentRequestToolsItem.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../../../index"; + +export type AgentRequestToolsItem = Humanloop.AgentLinkedFileRequest | Humanloop.AgentInlineTool; diff --git a/src/api/resources/agents/types/AgentsCallRequestToolChoice.ts b/src/api/resources/agents/types/AgentsCallRequestToolChoice.ts new file mode 100644 index 00000000..42a8e41d --- /dev/null +++ b/src/api/resources/agents/types/AgentsCallRequestToolChoice.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../../../index"; + +/** + * Controls how the model uses tools. The following options are supported: + * - `'none'` means the model will not call any tool and instead generates a message; this is the default when no tools are provided as part of the Prompt. + * - `'auto'` means the model can decide to call one or more of the provided tools; this is the default when tools are provided as part of the Prompt. + * - `'required'` means the model must call one or more of the provided tools. + * - `{'type': 'function', 'function': {name': }}` forces the model to use the named function. + */ +export type AgentsCallRequestToolChoice = "none" | "auto" | "required" | Humanloop.ToolChoice; diff --git a/src/api/resources/agents/types/AgentsCallStreamRequestToolChoice.ts b/src/api/resources/agents/types/AgentsCallStreamRequestToolChoice.ts new file mode 100644 index 00000000..45184790 --- /dev/null +++ b/src/api/resources/agents/types/AgentsCallStreamRequestToolChoice.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../../../index"; + +/** + * Controls how the model uses tools. The following options are supported: + * - `'none'` means the model will not call any tool and instead generates a message; this is the default when no tools are provided as part of the Prompt. + * - `'auto'` means the model can decide to call one or more of the provided tools; this is the default when tools are provided as part of the Prompt. + * - `'required'` means the model must call one or more of the provided tools. + * - `{'type': 'function', 'function': {name': }}` forces the model to use the named function. + */ +export type AgentsCallStreamRequestToolChoice = "none" | "auto" | "required" | Humanloop.ToolChoice; diff --git a/src/api/resources/agents/types/index.ts b/src/api/resources/agents/types/index.ts new file mode 100644 index 00000000..8a8a004f --- /dev/null +++ b/src/api/resources/agents/types/index.ts @@ -0,0 +1,7 @@ +export * from "./AgentLogRequestToolChoice"; +export * from "./AgentsCallStreamRequestToolChoice"; +export * from "./AgentsCallRequestToolChoice"; +export * from "./AgentRequestTemplate"; +export * from "./AgentRequestStop"; +export * from "./AgentRequestReasoningEffort"; +export * from "./AgentRequestToolsItem"; diff --git a/src/api/resources/datasets/client/Client.ts b/src/api/resources/datasets/client/Client.ts index 0dc822c8..fd55fdfa 100644 --- a/src/api/resources/datasets/client/Client.ts +++ b/src/api/resources/datasets/client/Client.ts @@ -107,8 +107,8 @@ export class Datasets { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -186,9 +186,9 @@ export class Datasets { * the `version_id` or `environment` query parameters to identify the existing version to base * the new version on. If neither is provided, the latest created version will be used. * - * If you provide a commit message, then the new version will be committed; - * otherwise it will be uncommitted. If you try to commit an already committed version, - * an exception will be raised. + * You can provide `version_name` and `version_description` to identify and describe your versions. + * Version names must be unique within a Dataset - attempting to create a version with a name + * that already exists will result in a 409 Conflict error. * * Humanloop also deduplicates Datapoints. If you try to add a Datapoint that already * exists, it will be ignored. If you intentionally want to add a duplicate Datapoint, @@ -217,8 +217,7 @@ export class Datasets { * "answer": "William Shakespeare" * } * }], - * action: "set", - * commitMessage: "Add two new questions and answers" + * action: "set" * }) * * @example @@ -240,8 +239,7 @@ export class Datasets { * target: { * "response": "Hey, thanks for your questions. Here are steps for how to achieve: 1. Navigate to your Prompt dashboard. \n 2. Select the `Monitoring` button on the top right of the Prompt dashboard \n 3. Within the model select the Version of the Evaluator you want to turn on for monitoring. \n\nWould you need help with anything else?" * } - * }], - * commitMessage: "Add two new questions and answers" + * }] * }) */ public async upsert( @@ -273,8 +271,8 @@ export class Datasets { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -386,8 +384,8 @@ export class Datasets { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -468,8 +466,8 @@ export class Datasets { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -548,8 +546,8 @@ export class Datasets { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -654,8 +652,8 @@ export class Datasets { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -734,23 +732,20 @@ export class Datasets { * @throws {@link Humanloop.UnprocessableEntityError} * * @example - * await client.datasets.listVersions("ds_b0baF1ca7652", { - * status: "committed" - * }) + * await client.datasets.listVersions("ds_b0baF1ca7652") */ public async listVersions( id: string, request: Humanloop.ListVersionsDatasetsIdVersionsGetRequest = {}, requestOptions?: Datasets.RequestOptions, ): Promise { - const { status, includeDatapoints } = request; + const { includeDatapoints } = request; const _queryParams: Record = {}; - if (status != null) { - _queryParams["status"] = serializers.VersionStatus.jsonOrThrow(status, { unrecognizedObjectKeys: "strip" }); - } - if (includeDatapoints != null) { - _queryParams["include_datapoints"] = includeDatapoints; + _queryParams["include_datapoints"] = + serializers.ListVersionsDatasetsIdVersionsGetRequestIncludeDatapoints.jsonOrThrow(includeDatapoints, { + unrecognizedObjectKeys: "strip", + }); } const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -764,8 +759,8 @@ export class Datasets { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -824,41 +819,35 @@ export class Datasets { } /** - * Commit a version of the Dataset with a commit message. - * - * If the version is already committed, an exception will be raised. + * Delete a version of the Dataset. * * @param {string} id - Unique identifier for Dataset. * @param {string} versionId - Unique identifier for the specific version of the Dataset. - * @param {Humanloop.CommitRequest} request * @param {Datasets.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Humanloop.UnprocessableEntityError} * * @example - * await client.datasets.commit("ds_b0baF1ca7652", "dsv_6L78pqrdFi2xa", { - * commitMessage: "initial commit" - * }) + * await client.datasets.deleteDatasetVersion("id", "version_id") */ - public async commit( + public async deleteDatasetVersion( id: string, versionId: string, - request: Humanloop.CommitRequest, requestOptions?: Datasets.RequestOptions, - ): Promise { + ): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.HumanloopEnvironment.Default, - `datasets/${encodeURIComponent(id)}/versions/${encodeURIComponent(versionId)}/commit`, + `datasets/${encodeURIComponent(id)}/versions/${encodeURIComponent(versionId)}`, ), - method: "POST", + method: "DELETE", headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -866,19 +855,12 @@ export class Datasets { }, contentType: "application/json", requestType: "json", - body: serializers.CommitRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.DatasetResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return; } if (_response.error.reason === "status-code") { @@ -909,7 +891,7 @@ export class Datasets { }); case "timeout": throw new errors.HumanloopTimeoutError( - "Timeout exceeded when calling POST /datasets/{id}/versions/{version_id}/commit.", + "Timeout exceeded when calling DELETE /datasets/{id}/versions/{version_id}.", ); case "unknown": throw new errors.HumanloopError({ @@ -919,22 +901,24 @@ export class Datasets { } /** - * Delete a version of the Dataset. + * Update the name or description of the Dataset version. * * @param {string} id - Unique identifier for Dataset. * @param {string} versionId - Unique identifier for the specific version of the Dataset. + * @param {Humanloop.UpdateVersionRequest} request * @param {Datasets.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Humanloop.UnprocessableEntityError} * * @example - * await client.datasets.deleteDatasetVersion("id", "version_id") + * await client.datasets.updateDatasetVersion("id", "version_id", {}) */ - public async deleteDatasetVersion( + public async updateDatasetVersion( id: string, versionId: string, + request: Humanloop.UpdateVersionRequest, requestOptions?: Datasets.RequestOptions, - ): Promise { + ): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -942,12 +926,12 @@ export class Datasets { environments.HumanloopEnvironment.Default, `datasets/${encodeURIComponent(id)}/versions/${encodeURIComponent(versionId)}`, ), - method: "DELETE", + method: "PATCH", headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -955,12 +939,19 @@ export class Datasets { }, contentType: "application/json", requestType: "json", + body: serializers.UpdateVersionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return; + return serializers.DatasetResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); } if (_response.error.reason === "status-code") { @@ -991,7 +982,7 @@ export class Datasets { }); case "timeout": throw new errors.HumanloopTimeoutError( - "Timeout exceeded when calling DELETE /datasets/{id}/versions/{version_id}.", + "Timeout exceeded when calling PATCH /datasets/{id}/versions/{version_id}.", ); case "unknown": throw new errors.HumanloopError({ @@ -1003,13 +994,16 @@ export class Datasets { /** * Add Datapoints from a CSV file to a Dataset. * - * This will create a new committed version of the Dataset with the Datapoints from the CSV file. + * This will create a new version of the Dataset with the Datapoints from the CSV file. * * If either `version_id` or `environment` is provided, the new version will be based on the specified version, * with the Datapoints from the CSV file added to the existing Datapoints in the version. * If neither `version_id` nor `environment` is provided, the new version will be based on the version * of the Dataset that is deployed to the default Environment. * + * You can optionally provide a name and description for the new version using `version_name` + * and `version_description` parameters. + * * @param {File | fs.ReadStream | Blob} file * @param {string} id * @param {Humanloop.BodyUploadCsvDatasetsIdDatapointsCsvPost} request @@ -1018,9 +1012,7 @@ export class Datasets { * @throws {@link Humanloop.UnprocessableEntityError} * * @example - * await client.datasets.uploadCsv(fs.createReadStream("/path/to/your/file"), "id", { - * commitMessage: "commit_message" - * }) + * await client.datasets.uploadCsv(fs.createReadStream("/path/to/your/file"), "id", {}) */ public async uploadCsv( file: File | fs.ReadStream | Blob, @@ -1039,7 +1031,14 @@ export class Datasets { const _request = await core.newFormData(); await _request.appendFile("file", file); - _request.append("commit_message", request.commitMessage); + if (request.versionName != null) { + _request.append("version_name", request.versionName); + } + + if (request.versionDescription != null) { + _request.append("version_description", request.versionDescription); + } + const _maybeEncodedRequest = await _request.getRequest(); const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( @@ -1052,8 +1051,8 @@ export class Datasets { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -1152,8 +1151,8 @@ export class Datasets { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -1243,8 +1242,8 @@ export class Datasets { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -1323,8 +1322,8 @@ export class Datasets { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), diff --git a/src/api/resources/datasets/client/requests/BodyUploadCsvDatasetsIdDatapointsCsvPost.ts b/src/api/resources/datasets/client/requests/BodyUploadCsvDatasetsIdDatapointsCsvPost.ts index 1dc09292..e4392222 100644 --- a/src/api/resources/datasets/client/requests/BodyUploadCsvDatasetsIdDatapointsCsvPost.ts +++ b/src/api/resources/datasets/client/requests/BodyUploadCsvDatasetsIdDatapointsCsvPost.ts @@ -4,9 +4,7 @@ /** * @example - * { - * commitMessage: "commit_message" - * } + * {} */ export interface BodyUploadCsvDatasetsIdDatapointsCsvPost { /** @@ -17,6 +15,8 @@ export interface BodyUploadCsvDatasetsIdDatapointsCsvPost { * Name of the Environment identifying a deployed Version to base the created Version on. */ environment?: string; - /** Commit message for the new Dataset version. */ - commitMessage: string; + /** Name for the new Dataset version. */ + versionName?: string; + /** Description for the new Dataset version. */ + versionDescription?: string; } diff --git a/src/api/resources/datasets/client/requests/DatasetRequest.ts b/src/api/resources/datasets/client/requests/DatasetRequest.ts index 93bb9eb2..e95cefb4 100644 --- a/src/api/resources/datasets/client/requests/DatasetRequest.ts +++ b/src/api/resources/datasets/client/requests/DatasetRequest.ts @@ -23,8 +23,7 @@ import * as Humanloop from "../../../../index"; * "answer": "William Shakespeare" * } * }], - * action: "set", - * commitMessage: "Add two new questions and answers" + * action: "set" * } * * @example @@ -46,8 +45,7 @@ import * as Humanloop from "../../../../index"; * target: { * "response": "Hey, thanks for your questions. Here are steps for how to achieve: 1. Navigate to your Prompt dashboard. \n 2. Select the `Monitoring` button on the top right of the Prompt dashboard \n 3. Within the model select the Version of the Evaluator you want to turn on for monitoring. \n\nWould you need help with anything else?" * } - * }], - * commitMessage: "Add two new questions and answers" + * }] * } */ export interface DatasetRequest { @@ -81,6 +79,8 @@ export interface DatasetRequest { action?: Humanloop.UpdateDatesetAction; /** Additional fields to describe the Dataset. Helpful to separate Dataset versions from each other with details on how they were created or used. */ attributes?: Record; - /** Message describing the changes made. If provided, a committed version of the Dataset is created. Otherwise, an uncommitted version is created. */ - commitMessage?: string; + /** Unique name for the Dataset version. Version names must be unique for a given Dataset. */ + versionName?: string; + /** Description of the version, e.g., the changes made in this version. */ + versionDescription?: string; } diff --git a/src/api/resources/datasets/client/requests/ListVersionsDatasetsIdVersionsGetRequest.ts b/src/api/resources/datasets/client/requests/ListVersionsDatasetsIdVersionsGetRequest.ts index d39ab6a9..e0b2d4a2 100644 --- a/src/api/resources/datasets/client/requests/ListVersionsDatasetsIdVersionsGetRequest.ts +++ b/src/api/resources/datasets/client/requests/ListVersionsDatasetsIdVersionsGetRequest.ts @@ -6,17 +6,11 @@ import * as Humanloop from "../../../../index"; /** * @example - * { - * status: "committed" - * } + * {} */ export interface ListVersionsDatasetsIdVersionsGetRequest { /** - * Filter versions by status: 'uncommitted', 'committed'. If no status is provided, all versions are returned. + * If set to 'latest_saved', include datapoints for the latest saved version. Alternatively, 'latest_committed' (deprecated) includes datapoints for the latest committed version only. */ - status?: Humanloop.VersionStatus; - /** - * If set to 'latest_committed', include the Datapoints for the latest committed version. Defaults to `None`. - */ - includeDatapoints?: "latest_committed"; + includeDatapoints?: Humanloop.ListVersionsDatasetsIdVersionsGetRequestIncludeDatapoints; } diff --git a/src/api/resources/datasets/index.ts b/src/api/resources/datasets/index.ts index 5ec76921..c9240f83 100644 --- a/src/api/resources/datasets/index.ts +++ b/src/api/resources/datasets/index.ts @@ -1 +1,2 @@ +export * from "./types"; export * from "./client"; diff --git a/src/api/resources/datasets/types/ListVersionsDatasetsIdVersionsGetRequestIncludeDatapoints.ts b/src/api/resources/datasets/types/ListVersionsDatasetsIdVersionsGetRequestIncludeDatapoints.ts new file mode 100644 index 00000000..9f12daeb --- /dev/null +++ b/src/api/resources/datasets/types/ListVersionsDatasetsIdVersionsGetRequestIncludeDatapoints.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * If set to 'latest_saved', include datapoints for the latest saved version. Alternatively, 'latest_committed' (deprecated) includes datapoints for the latest committed version only. + */ +export type ListVersionsDatasetsIdVersionsGetRequestIncludeDatapoints = "latest_committed" | "latest_saved"; +export const ListVersionsDatasetsIdVersionsGetRequestIncludeDatapoints = { + LatestCommitted: "latest_committed", + LatestSaved: "latest_saved", +} as const; diff --git a/src/api/resources/datasets/types/index.ts b/src/api/resources/datasets/types/index.ts new file mode 100644 index 00000000..0fb85205 --- /dev/null +++ b/src/api/resources/datasets/types/index.ts @@ -0,0 +1 @@ +export * from "./ListVersionsDatasetsIdVersionsGetRequestIncludeDatapoints"; diff --git a/src/api/resources/directories/client/Client.ts b/src/api/resources/directories/client/Client.ts index f8f64349..2e244488 100644 --- a/src/api/resources/directories/client/Client.ts +++ b/src/api/resources/directories/client/Client.ts @@ -55,8 +55,8 @@ export class Directories { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -139,8 +139,8 @@ export class Directories { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -224,8 +224,8 @@ export class Directories { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -307,8 +307,8 @@ export class Directories { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -387,8 +387,8 @@ export class Directories { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), diff --git a/src/api/resources/evaluations/client/Client.ts b/src/api/resources/evaluations/client/Client.ts index 8a1e5e62..1699c9fe 100644 --- a/src/api/resources/evaluations/client/Client.ts +++ b/src/api/resources/evaluations/client/Client.ts @@ -88,8 +88,8 @@ export class Evaluations { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -190,8 +190,8 @@ export class Evaluations { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -283,8 +283,8 @@ export class Evaluations { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -374,8 +374,8 @@ export class Evaluations { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -463,8 +463,8 @@ export class Evaluations { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -546,8 +546,8 @@ export class Evaluations { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -624,8 +624,8 @@ export class Evaluations { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -723,8 +723,8 @@ export class Evaluations { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -813,8 +813,8 @@ export class Evaluations { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -894,8 +894,8 @@ export class Evaluations { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -981,8 +981,8 @@ export class Evaluations { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -1074,8 +1074,8 @@ export class Evaluations { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -1161,8 +1161,8 @@ export class Evaluations { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -1267,8 +1267,8 @@ export class Evaluations { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), diff --git a/src/api/resources/evaluators/client/Client.ts b/src/api/resources/evaluators/client/Client.ts index 04d6dae8..fe6dbdea 100644 --- a/src/api/resources/evaluators/client/Client.ts +++ b/src/api/resources/evaluators/client/Client.ts @@ -73,8 +73,8 @@ export class Evaluators { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -186,8 +186,8 @@ export class Evaluators { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -259,9 +259,9 @@ export class Evaluators { * * Evaluators are identified by the `ID` or their `path`. The spec provided determines the version of the Evaluator. * - * If you provide a commit message, then the new version will be committed; - * otherwise it will be uncommitted. If you try to commit an already committed version, - * an exception will be raised. + * You can provide `version_name` and `version_description` to identify and describe your versions. + * Version names must be unique within an Evaluator - attempting to create a version with a name + * that already exists will result in a 409 Conflict error. * * @param {Humanloop.EvaluatorRequest} request * @param {Evaluators.RequestOptions} requestOptions - Request-specific configuration. @@ -276,8 +276,7 @@ export class Evaluators { * returnType: "number", * evaluatorType: "python", * code: "def evaluate(answer, target):\n return 0.5" - * }, - * commitMessage: "Initial commit" + * } * }) */ public async upsert( @@ -295,8 +294,8 @@ export class Evaluators { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -395,8 +394,8 @@ export class Evaluators { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -477,8 +476,8 @@ export class Evaluators { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -559,8 +558,8 @@ export class Evaluators { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -635,12 +634,8 @@ export class Evaluators { request: Humanloop.ListVersionsEvaluatorsIdVersionsGetRequest = {}, requestOptions?: Evaluators.RequestOptions, ): Promise { - const { status, evaluatorAggregates } = request; + const { evaluatorAggregates } = request; const _queryParams: Record = {}; - if (status != null) { - _queryParams["status"] = serializers.VersionStatus.jsonOrThrow(status, { unrecognizedObjectKeys: "strip" }); - } - if (evaluatorAggregates != null) { _queryParams["evaluator_aggregates"] = evaluatorAggregates.toString(); } @@ -656,8 +651,8 @@ export class Evaluators { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -716,41 +711,35 @@ export class Evaluators { } /** - * Commit a version of the Evaluator with a commit message. - * - * If the version is already committed, an exception will be raised. + * Delete a version of the Evaluator. * - * @param {string} id - Unique identifier for Prompt. + * @param {string} id - Unique identifier for Evaluator. * @param {string} versionId - Unique identifier for the specific version of the Evaluator. - * @param {Humanloop.CommitRequest} request * @param {Evaluators.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Humanloop.UnprocessableEntityError} * * @example - * await client.evaluators.commit("ev_890bcd", "evv_012def", { - * commitMessage: "Initial commit" - * }) + * await client.evaluators.deleteEvaluatorVersion("id", "version_id") */ - public async commit( + public async deleteEvaluatorVersion( id: string, versionId: string, - request: Humanloop.CommitRequest, requestOptions?: Evaluators.RequestOptions, - ): Promise { + ): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.HumanloopEnvironment.Default, - `evaluators/${encodeURIComponent(id)}/versions/${encodeURIComponent(versionId)}/commit`, + `evaluators/${encodeURIComponent(id)}/versions/${encodeURIComponent(versionId)}`, ), - method: "POST", + method: "DELETE", headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -758,19 +747,12 @@ export class Evaluators { }, contentType: "application/json", requestType: "json", - body: serializers.CommitRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.EvaluatorResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return; } if (_response.error.reason === "status-code") { @@ -801,7 +783,7 @@ export class Evaluators { }); case "timeout": throw new errors.HumanloopTimeoutError( - "Timeout exceeded when calling POST /evaluators/{id}/versions/{version_id}/commit.", + "Timeout exceeded when calling DELETE /evaluators/{id}/versions/{version_id}.", ); case "unknown": throw new errors.HumanloopError({ @@ -811,22 +793,24 @@ export class Evaluators { } /** - * Delete a version of the Evaluator. + * Update the name or description of the Evaluator version. * * @param {string} id - Unique identifier for Evaluator. * @param {string} versionId - Unique identifier for the specific version of the Evaluator. + * @param {Humanloop.UpdateVersionRequest} request * @param {Evaluators.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Humanloop.UnprocessableEntityError} * * @example - * await client.evaluators.deleteEvaluatorVersion("id", "version_id") + * await client.evaluators.updateEvaluatorVersion("id", "version_id", {}) */ - public async deleteEvaluatorVersion( + public async updateEvaluatorVersion( id: string, versionId: string, + request: Humanloop.UpdateVersionRequest, requestOptions?: Evaluators.RequestOptions, - ): Promise { + ): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -834,12 +818,12 @@ export class Evaluators { environments.HumanloopEnvironment.Default, `evaluators/${encodeURIComponent(id)}/versions/${encodeURIComponent(versionId)}`, ), - method: "DELETE", + method: "PATCH", headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -847,12 +831,19 @@ export class Evaluators { }, contentType: "application/json", requestType: "json", + body: serializers.UpdateVersionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return; + return serializers.EvaluatorResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); } if (_response.error.reason === "status-code") { @@ -883,7 +874,7 @@ export class Evaluators { }); case "timeout": throw new errors.HumanloopTimeoutError( - "Timeout exceeded when calling DELETE /evaluators/{id}/versions/{version_id}.", + "Timeout exceeded when calling PATCH /evaluators/{id}/versions/{version_id}.", ); case "unknown": throw new errors.HumanloopError({ @@ -930,8 +921,8 @@ export class Evaluators { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -1022,8 +1013,8 @@ export class Evaluators { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -1102,8 +1093,8 @@ export class Evaluators { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -1193,8 +1184,8 @@ export class Evaluators { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), diff --git a/src/api/resources/evaluators/client/requests/EvaluatorRequest.ts b/src/api/resources/evaluators/client/requests/EvaluatorRequest.ts index eb38c413..b7b8af5a 100644 --- a/src/api/resources/evaluators/client/requests/EvaluatorRequest.ts +++ b/src/api/resources/evaluators/client/requests/EvaluatorRequest.ts @@ -13,8 +13,7 @@ import * as Humanloop from "../../../../index"; * returnType: "number", * evaluatorType: "python", * code: "def evaluate(answer, target):\n return 0.5" - * }, - * commitMessage: "Initial commit" + * } * } */ export interface EvaluatorRequest { @@ -22,7 +21,9 @@ export interface EvaluatorRequest { path?: string; /** ID for an existing Evaluator. */ id?: string; - /** Message describing the changes made. */ - commitMessage?: string; + /** Unique name for the Evaluator version. Version names must be unique for a given Evaluator. */ + versionName?: string; + /** Description of the version, e.g., the changes made in this version. */ + versionDescription?: string; spec: Humanloop.EvaluatorRequestSpec; } diff --git a/src/api/resources/evaluators/client/requests/ListVersionsEvaluatorsIdVersionsGetRequest.ts b/src/api/resources/evaluators/client/requests/ListVersionsEvaluatorsIdVersionsGetRequest.ts index 4b22df98..30980310 100644 --- a/src/api/resources/evaluators/client/requests/ListVersionsEvaluatorsIdVersionsGetRequest.ts +++ b/src/api/resources/evaluators/client/requests/ListVersionsEvaluatorsIdVersionsGetRequest.ts @@ -2,17 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Humanloop from "../../../../index"; - /** * @example * {} */ export interface ListVersionsEvaluatorsIdVersionsGetRequest { - /** - * Filter versions by status: 'uncommitted', 'committed'. If no status is provided, all versions are returned. - */ - status?: Humanloop.VersionStatus; /** * Whether to include Evaluator aggregate results for the versions in the response */ diff --git a/src/api/resources/files/client/Client.ts b/src/api/resources/files/client/Client.ts index 54f6c063..159f49d4 100644 --- a/src/api/resources/files/client/Client.ts +++ b/src/api/resources/files/client/Client.ts @@ -47,7 +47,7 @@ export class Files { public async listFiles( request: Humanloop.ListFilesFilesGetRequest = {}, requestOptions?: Files.RequestOptions, - ): Promise { + ): Promise { const { page, size, name, template, type: type_, environment, sortBy, order } = request; const _queryParams: Record = {}; if (page != null) { @@ -101,8 +101,8 @@ export class Files { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -116,7 +116,7 @@ export class Files { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponse.parseOrThrow( + return serializers.PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseAgentResponse.parseOrThrow( _response.body, { unrecognizedObjectKeys: "passthrough", @@ -197,8 +197,8 @@ export class Files { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), diff --git a/src/api/resources/files/types/RetrieveByPathFilesRetrieveByPathPostResponse.ts b/src/api/resources/files/types/RetrieveByPathFilesRetrieveByPathPostResponse.ts index 3adf1e5e..6919fd90 100644 --- a/src/api/resources/files/types/RetrieveByPathFilesRetrieveByPathPostResponse.ts +++ b/src/api/resources/files/types/RetrieveByPathFilesRetrieveByPathPostResponse.ts @@ -9,4 +9,5 @@ export type RetrieveByPathFilesRetrieveByPathPostResponse = | Humanloop.ToolResponse | Humanloop.DatasetResponse | Humanloop.EvaluatorResponse - | Humanloop.FlowResponse; + | Humanloop.FlowResponse + | Humanloop.AgentResponse; diff --git a/src/api/resources/flows/client/Client.ts b/src/api/resources/flows/client/Client.ts index 8373adb1..6259cb2e 100644 --- a/src/api/resources/flows/client/Client.ts +++ b/src/api/resources/flows/client/Client.ts @@ -98,8 +98,8 @@ export class Flows { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -198,8 +198,8 @@ export class Flows { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -298,8 +298,8 @@ export class Flows { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -380,8 +380,8 @@ export class Flows { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -462,8 +462,8 @@ export class Flows { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -572,8 +572,8 @@ export class Flows { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -645,9 +645,9 @@ export class Flows { * * Flows can also be identified by the `ID` or their `path`. * - * If you provide a commit message, then the new version will be committed; - * otherwise it will be uncommitted. If you try to commit an already committed version, - * an exception will be raised. + * You can provide `version_name` and `version_description` to identify and describe your versions. + * Version names must be unique within a Flow - attempting to create a version with a name + * that already exists will result in a 409 Conflict error. * * @param {Humanloop.FlowRequest} request * @param {Flows.RequestOptions} requestOptions - Request-specific configuration. @@ -667,8 +667,7 @@ export class Flows { * "name": "retrieval_tool_v3", * "description": "Retrieval tool for MedQA.", * "source_code": "def retrieval_tool(question: str) -> str:\n pass\n" - * }, - * "commit_message": "Initial commit" + * } * } * }) */ @@ -687,8 +686,8 @@ export class Flows { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -756,21 +755,15 @@ export class Flows { * @throws {@link Humanloop.UnprocessableEntityError} * * @example - * await client.flows.listVersions("fl_6o701g4jmcanPVHxdqD0O", { - * status: "committed" - * }) + * await client.flows.listVersions("fl_6o701g4jmcanPVHxdqD0O") */ public async listVersions( id: string, request: Humanloop.ListVersionsFlowsIdVersionsGetRequest = {}, requestOptions?: Flows.RequestOptions, ): Promise { - const { status, evaluatorAggregates } = request; + const { evaluatorAggregates } = request; const _queryParams: Record = {}; - if (status != null) { - _queryParams["status"] = serializers.VersionStatus.jsonOrThrow(status, { unrecognizedObjectKeys: "strip" }); - } - if (evaluatorAggregates != null) { _queryParams["evaluator_aggregates"] = evaluatorAggregates.toString(); } @@ -786,8 +779,8 @@ export class Flows { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -846,41 +839,35 @@ export class Flows { } /** - * Commit a version of the Flow with a commit message. - * - * If the version is already committed, an exception will be raised. + * Delete a version of the Flow. * * @param {string} id - Unique identifier for Flow. * @param {string} versionId - Unique identifier for the specific version of the Flow. - * @param {Humanloop.CommitRequest} request * @param {Flows.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Humanloop.UnprocessableEntityError} * * @example - * await client.flows.commit("fl_6o701g4jmcanPVHxdqD0O", "flv_6o701g4jmcanPVHxdqD0O", { - * commitMessage: "RAG lookup tool bug fixing" - * }) + * await client.flows.deleteFlowVersion("id", "version_id") */ - public async commit( + public async deleteFlowVersion( id: string, versionId: string, - request: Humanloop.CommitRequest, requestOptions?: Flows.RequestOptions, - ): Promise { + ): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.HumanloopEnvironment.Default, - `flows/${encodeURIComponent(id)}/versions/${encodeURIComponent(versionId)}/commit`, + `flows/${encodeURIComponent(id)}/versions/${encodeURIComponent(versionId)}`, ), - method: "POST", + method: "DELETE", headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -888,19 +875,12 @@ export class Flows { }, contentType: "application/json", requestType: "json", - body: serializers.CommitRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.FlowResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return; } if (_response.error.reason === "status-code") { @@ -931,7 +911,7 @@ export class Flows { }); case "timeout": throw new errors.HumanloopTimeoutError( - "Timeout exceeded when calling POST /flows/{id}/versions/{version_id}/commit.", + "Timeout exceeded when calling DELETE /flows/{id}/versions/{version_id}.", ); case "unknown": throw new errors.HumanloopError({ @@ -941,22 +921,24 @@ export class Flows { } /** - * Delete a version of the Flow. + * Update the name or description of the Flow version. * * @param {string} id - Unique identifier for Flow. * @param {string} versionId - Unique identifier for the specific version of the Flow. + * @param {Humanloop.UpdateVersionRequest} request * @param {Flows.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Humanloop.UnprocessableEntityError} * * @example - * await client.flows.deleteFlowVersion("id", "version_id") + * await client.flows.updateFlowVersion("id", "version_id", {}) */ - public async deleteFlowVersion( + public async updateFlowVersion( id: string, versionId: string, + request: Humanloop.UpdateVersionRequest, requestOptions?: Flows.RequestOptions, - ): Promise { + ): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -964,12 +946,12 @@ export class Flows { environments.HumanloopEnvironment.Default, `flows/${encodeURIComponent(id)}/versions/${encodeURIComponent(versionId)}`, ), - method: "DELETE", + method: "PATCH", headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -977,12 +959,19 @@ export class Flows { }, contentType: "application/json", requestType: "json", + body: serializers.UpdateVersionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return; + return serializers.FlowResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); } if (_response.error.reason === "status-code") { @@ -1013,7 +1002,7 @@ export class Flows { }); case "timeout": throw new errors.HumanloopTimeoutError( - "Timeout exceeded when calling DELETE /flows/{id}/versions/{version_id}.", + "Timeout exceeded when calling PATCH /flows/{id}/versions/{version_id}.", ); case "unknown": throw new errors.HumanloopError({ @@ -1060,8 +1049,8 @@ export class Flows { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -1152,8 +1141,8 @@ export class Flows { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -1232,8 +1221,8 @@ export class Flows { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -1325,8 +1314,8 @@ export class Flows { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), diff --git a/src/api/resources/flows/client/requests/FlowRequest.ts b/src/api/resources/flows/client/requests/FlowRequest.ts index cb504d68..3ff6b6e2 100644 --- a/src/api/resources/flows/client/requests/FlowRequest.ts +++ b/src/api/resources/flows/client/requests/FlowRequest.ts @@ -16,8 +16,7 @@ * "name": "retrieval_tool_v3", * "description": "Retrieval tool for MedQA.", * "source_code": "def retrieval_tool(question: str) -> str:\n pass\n" - * }, - * "commit_message": "Initial commit" + * } * } * } */ @@ -28,6 +27,8 @@ export interface FlowRequest { id?: string; /** A key-value object identifying the Flow Version. */ attributes: Record; - /** Message describing the changes made. */ - commitMessage?: string; + /** Unique name for the Flow version. Version names must be unique for a given Flow. */ + versionName?: string; + /** Description of the version, e.g., the changes made in this version. */ + versionDescription?: string; } diff --git a/src/api/resources/flows/client/requests/ListVersionsFlowsIdVersionsGetRequest.ts b/src/api/resources/flows/client/requests/ListVersionsFlowsIdVersionsGetRequest.ts index 5c3ce3a6..0cb1d0f2 100644 --- a/src/api/resources/flows/client/requests/ListVersionsFlowsIdVersionsGetRequest.ts +++ b/src/api/resources/flows/client/requests/ListVersionsFlowsIdVersionsGetRequest.ts @@ -2,19 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Humanloop from "../../../../index"; - /** * @example - * { - * status: "committed" - * } + * {} */ export interface ListVersionsFlowsIdVersionsGetRequest { - /** - * Filter versions by status: 'uncommitted', 'committed'. If no status is provided, all versions are returned. - */ - status?: Humanloop.VersionStatus; /** * Whether to include Evaluator aggregate results for the versions in the response */ diff --git a/src/api/resources/index.ts b/src/api/resources/index.ts index 24cf2361..c3e903dd 100644 --- a/src/api/resources/index.ts +++ b/src/api/resources/index.ts @@ -1,13 +1,16 @@ export * as prompts from "./prompts"; export * from "./prompts/types"; +export * as datasets from "./datasets"; +export * from "./datasets/types"; export * as evaluators from "./evaluators"; export * from "./evaluators/types"; +export * as agents from "./agents"; +export * from "./agents/types"; export * as files from "./files"; export * from "./files/types"; export * as evaluations from "./evaluations"; export * from "./evaluations/types"; export * as tools from "./tools"; -export * as datasets from "./datasets"; export * as flows from "./flows"; export * as directories from "./directories"; export * as logs from "./logs"; @@ -16,6 +19,7 @@ export * from "./tools/client/requests"; export * from "./datasets/client/requests"; export * from "./evaluators/client/requests"; export * from "./flows/client/requests"; +export * from "./agents/client/requests"; export * from "./directories/client/requests"; export * from "./files/client/requests"; export * from "./evaluations/client/requests"; diff --git a/src/api/resources/logs/client/Client.ts b/src/api/resources/logs/client/Client.ts index f9fcfd3c..4d592529 100644 --- a/src/api/resources/logs/client/Client.ts +++ b/src/api/resources/logs/client/Client.ts @@ -142,8 +142,8 @@ export class Logs { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -248,8 +248,8 @@ export class Logs { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -324,8 +324,8 @@ export class Logs { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), diff --git a/src/api/resources/prompts/client/Client.ts b/src/api/resources/prompts/client/Client.ts index 77318dc4..a1c43b3e 100644 --- a/src/api/resources/prompts/client/Client.ts +++ b/src/api/resources/prompts/client/Client.ts @@ -39,7 +39,7 @@ export declare namespace Prompts { * A Prompt on Humanloop encapsulates the base instructions and other configuration for how a large language model should * perform a specific task. * - * Prompts have immutable versions that you can **Commit** and **Deploy**. + * Prompts have immutable versions that you can **Save** and **Deploy**. * To use a Prompt, you can **Call** it to create a generation and you can **Log** generations manually. * * #### Referencing Prompts @@ -129,8 +129,8 @@ export class Prompts { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -221,8 +221,8 @@ export class Prompts { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -321,8 +321,8 @@ export class Prompts { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -502,8 +502,8 @@ export class Prompts { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -618,8 +618,8 @@ export class Prompts { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -691,9 +691,9 @@ export class Prompts { * * Prompts are identified by the `ID` or their `path`. The parameters (i.e. the prompt template, temperature, model etc.) determine the versions of the Prompt. * - * If you provide a commit message, then the new version will be committed; - * otherwise it will be uncommitted. If you try to commit an already committed version, - * an exception will be raised. + * You can provide `version_name` and `version_description` to identify and describe your versions. + * Version names must be unique within a Prompt - attempting to create a version with a name + * that already exists will result in a 409 Conflict error. * * @param {Humanloop.PromptRequest} request * @param {Prompts.RequestOptions} requestOptions - Request-specific configuration. @@ -711,8 +711,7 @@ export class Prompts { * }], * provider: "openai", * maxTokens: -1, - * temperature: 0.7, - * commitMessage: "Initial commit" + * temperature: 0.7 * }) */ public async upsert( @@ -730,8 +729,8 @@ export class Prompts { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -830,8 +829,8 @@ export class Prompts { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -912,8 +911,8 @@ export class Prompts { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -994,8 +993,8 @@ export class Prompts { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -1060,21 +1059,21 @@ export class Prompts { * `version_id` or `environment` to target a specific version of the Prompt. * * @param {string} id - Unique identifier for Prompt. - * @param {Humanloop.PopulateTemplatePromptsIdPopulatePostRequest} request + * @param {Humanloop.PopulatePromptsIdPopulatePostRequest} request * @param {Prompts.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Humanloop.UnprocessableEntityError} * * @example - * await client.prompts.populateTemplate("id", { + * await client.prompts.populate("id", { * body: { * "key": "value" * } * }) */ - public async populateTemplate( + public async populate( id: string, - request: Humanloop.PopulateTemplatePromptsIdPopulatePostRequest, + request: Humanloop.PopulatePromptsIdPopulatePostRequest, requestOptions?: Prompts.RequestOptions, ): Promise { const { versionId, environment, body: _body } = request; @@ -1098,8 +1097,8 @@ export class Prompts { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -1108,7 +1107,7 @@ export class Prompts { contentType: "application/json", queryParameters: _queryParams, requestType: "json", - body: serializers.prompts.populateTemplate.Request.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), + body: serializers.prompts.populate.Request.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, abortSignal: requestOptions?.abortSignal, @@ -1168,21 +1167,15 @@ export class Prompts { * @throws {@link Humanloop.UnprocessableEntityError} * * @example - * await client.prompts.listVersions("pr_30gco7dx6JDq4200GVOHa", { - * status: "committed" - * }) + * await client.prompts.listVersions("pr_30gco7dx6JDq4200GVOHa") */ public async listVersions( id: string, request: Humanloop.ListVersionsPromptsIdVersionsGetRequest = {}, requestOptions?: Prompts.RequestOptions, ): Promise { - const { status, evaluatorAggregates } = request; + const { evaluatorAggregates } = request; const _queryParams: Record = {}; - if (status != null) { - _queryParams["status"] = serializers.VersionStatus.jsonOrThrow(status, { unrecognizedObjectKeys: "strip" }); - } - if (evaluatorAggregates != null) { _queryParams["evaluator_aggregates"] = evaluatorAggregates.toString(); } @@ -1198,8 +1191,8 @@ export class Prompts { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -1258,41 +1251,35 @@ export class Prompts { } /** - * Commit a version of the Prompt with a commit message. - * - * If the version is already committed, an exception will be raised. + * Delete a version of the Prompt. * * @param {string} id - Unique identifier for Prompt. * @param {string} versionId - Unique identifier for the specific version of the Prompt. - * @param {Humanloop.CommitRequest} request * @param {Prompts.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Humanloop.UnprocessableEntityError} * * @example - * await client.prompts.commit("pr_30gco7dx6JDq4200GVOHa", "prv_F34aba5f3asp0", { - * commitMessage: "Reiterated point about not discussing sentience" - * }) + * await client.prompts.deletePromptVersion("id", "version_id") */ - public async commit( + public async deletePromptVersion( id: string, versionId: string, - request: Humanloop.CommitRequest, requestOptions?: Prompts.RequestOptions, - ): Promise { + ): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.HumanloopEnvironment.Default, - `prompts/${encodeURIComponent(id)}/versions/${encodeURIComponent(versionId)}/commit`, + `prompts/${encodeURIComponent(id)}/versions/${encodeURIComponent(versionId)}`, ), - method: "POST", + method: "DELETE", headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -1300,19 +1287,12 @@ export class Prompts { }, contentType: "application/json", requestType: "json", - body: serializers.CommitRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.PromptResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return; } if (_response.error.reason === "status-code") { @@ -1343,7 +1323,7 @@ export class Prompts { }); case "timeout": throw new errors.HumanloopTimeoutError( - "Timeout exceeded when calling POST /prompts/{id}/versions/{version_id}/commit.", + "Timeout exceeded when calling DELETE /prompts/{id}/versions/{version_id}.", ); case "unknown": throw new errors.HumanloopError({ @@ -1353,22 +1333,24 @@ export class Prompts { } /** - * Delete a version of the Prompt. + * Update the name or description of the Prompt version. * * @param {string} id - Unique identifier for Prompt. * @param {string} versionId - Unique identifier for the specific version of the Prompt. + * @param {Humanloop.UpdateVersionRequest} request * @param {Prompts.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Humanloop.UnprocessableEntityError} * * @example - * await client.prompts.deletePromptVersion("id", "version_id") + * await client.prompts.patchPromptVersion("id", "version_id", {}) */ - public async deletePromptVersion( + public async patchPromptVersion( id: string, versionId: string, + request: Humanloop.UpdateVersionRequest, requestOptions?: Prompts.RequestOptions, - ): Promise { + ): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -1376,12 +1358,12 @@ export class Prompts { environments.HumanloopEnvironment.Default, `prompts/${encodeURIComponent(id)}/versions/${encodeURIComponent(versionId)}`, ), - method: "DELETE", + method: "PATCH", headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -1389,12 +1371,19 @@ export class Prompts { }, contentType: "application/json", requestType: "json", + body: serializers.UpdateVersionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return; + return serializers.PromptResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); } if (_response.error.reason === "status-code") { @@ -1425,7 +1414,7 @@ export class Prompts { }); case "timeout": throw new errors.HumanloopTimeoutError( - "Timeout exceeded when calling DELETE /prompts/{id}/versions/{version_id}.", + "Timeout exceeded when calling PATCH /prompts/{id}/versions/{version_id}.", ); case "unknown": throw new errors.HumanloopError({ @@ -1472,8 +1461,8 @@ export class Prompts { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -1564,8 +1553,8 @@ export class Prompts { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -1644,8 +1633,8 @@ export class Prompts { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -1737,8 +1726,8 @@ export class Prompts { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), diff --git a/src/api/resources/prompts/client/requests/ListVersionsPromptsIdVersionsGetRequest.ts b/src/api/resources/prompts/client/requests/ListVersionsPromptsIdVersionsGetRequest.ts index 43a20714..d68a3f82 100644 --- a/src/api/resources/prompts/client/requests/ListVersionsPromptsIdVersionsGetRequest.ts +++ b/src/api/resources/prompts/client/requests/ListVersionsPromptsIdVersionsGetRequest.ts @@ -2,19 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Humanloop from "../../../../index"; - /** * @example - * { - * status: "committed" - * } + * {} */ export interface ListVersionsPromptsIdVersionsGetRequest { - /** - * Filter versions by status: 'uncommitted', 'committed'. If no status is provided, all versions are returned. - */ - status?: Humanloop.VersionStatus; /** * Whether to include Evaluator aggregate results for the versions in the response */ diff --git a/src/api/resources/prompts/client/requests/PopulateTemplatePromptsIdPopulatePostRequest.ts b/src/api/resources/prompts/client/requests/PopulatePromptsIdPopulatePostRequest.ts similarity index 87% rename from src/api/resources/prompts/client/requests/PopulateTemplatePromptsIdPopulatePostRequest.ts rename to src/api/resources/prompts/client/requests/PopulatePromptsIdPopulatePostRequest.ts index 1fa98b19..b2932cba 100644 --- a/src/api/resources/prompts/client/requests/PopulateTemplatePromptsIdPopulatePostRequest.ts +++ b/src/api/resources/prompts/client/requests/PopulatePromptsIdPopulatePostRequest.ts @@ -10,7 +10,7 @@ * } * } */ -export interface PopulateTemplatePromptsIdPopulatePostRequest { +export interface PopulatePromptsIdPopulatePostRequest { /** * A specific Version ID of the Prompt to retrieve to populate the template. */ diff --git a/src/api/resources/prompts/client/requests/PromptLogRequest.ts b/src/api/resources/prompts/client/requests/PromptLogRequest.ts index 20a4b056..45a47afd 100644 --- a/src/api/resources/prompts/client/requests/PromptLogRequest.ts +++ b/src/api/resources/prompts/client/requests/PromptLogRequest.ts @@ -71,7 +71,7 @@ export interface PromptLogRequest { * Controls how the model uses tools. The following options are supported: * - `'none'` means the model will not call any tool and instead generates a message; this is the default when no tools are provided as part of the Prompt. * - `'auto'` means the model can decide to call one or more of the provided tools; this is the default when tools are provided as part of the Prompt. - * - `'required'` means the model can decide to call one or more of the provided tools. + * - `'required'` means the model must call one or more of the provided tools. * - `{'type': 'function', 'function': {name': }}` forces the model to use the named function. */ toolChoice?: Humanloop.PromptLogRequestToolChoice; diff --git a/src/api/resources/prompts/client/requests/PromptLogUpdateRequest.ts b/src/api/resources/prompts/client/requests/PromptLogUpdateRequest.ts index 321707a6..32035be7 100644 --- a/src/api/resources/prompts/client/requests/PromptLogUpdateRequest.ts +++ b/src/api/resources/prompts/client/requests/PromptLogUpdateRequest.ts @@ -29,7 +29,7 @@ export interface PromptLogUpdateRequest { * Controls how the model uses tools. The following options are supported: * - `'none'` means the model will not call any tool and instead generates a message; this is the default when no tools are provided as part of the Prompt. * - `'auto'` means the model can decide to call one or more of the provided tools; this is the default when tools are provided as part of the Prompt. - * - `'required'` means the model can decide to call one or more of the provided tools. + * - `'required'` means the model must call one or more of the provided tools. * - `{'type': 'function', 'function': {name': }}` forces the model to use the named function. */ toolChoice?: Humanloop.PromptLogUpdateRequestToolChoice; diff --git a/src/api/resources/prompts/client/requests/PromptRequest.ts b/src/api/resources/prompts/client/requests/PromptRequest.ts index 243ae0b5..4465486e 100644 --- a/src/api/resources/prompts/client/requests/PromptRequest.ts +++ b/src/api/resources/prompts/client/requests/PromptRequest.ts @@ -16,8 +16,7 @@ import * as Humanloop from "../../../../index"; * }], * provider: "openai", * maxTokens: -1, - * temperature: 0.7, - * commitMessage: "Initial commit" + * temperature: 0.7 * } */ export interface PromptRequest { @@ -60,16 +59,18 @@ export interface PromptRequest { seed?: number; /** The format of the response. Only `{"type": "json_object"}` is currently supported for chat. */ responseFormat?: Humanloop.ResponseFormat; - /** Give model guidance on how many reasoning tokens it should generate before creating a response to the prompt. This is only supported for OpenAI reasoning (o1, o3-mini) models. */ - reasoningEffort?: Humanloop.ReasoningEffort; + /** Guidance on how many reasoning tokens it should generate before creating a response to the prompt. OpenAI reasoning models (o1, o3-mini) expect a OpenAIReasoningEffort enum. Anthropic reasoning models expect an integer, which signifies the maximum token budget. */ + reasoningEffort?: Humanloop.PromptRequestReasoningEffort; /** The tool specification that the model can choose to call if Tool calling is supported. */ tools?: Humanloop.ToolFunction[]; /** The IDs of the Tools in your organization that the model can choose to call if Tool calling is supported. The default deployed version of that tool is called. */ linkedTools?: string[]; /** Additional fields to describe the Prompt. Helpful to separate Prompt versions from each other with details on how they were created or used. */ attributes?: Record; - /** Message describing the changes made. */ - commitMessage?: string; + /** Unique name for the Prompt version. Version names must be unique for a given Prompt. */ + versionName?: string; + /** Description of the version, e.g., the changes made in this version. */ + versionDescription?: string; /** Description of the Prompt. */ description?: string; /** List of tags associated with this prompt. */ diff --git a/src/api/resources/prompts/client/requests/PromptsCallRequest.ts b/src/api/resources/prompts/client/requests/PromptsCallRequest.ts index ee30518d..4e1595fc 100644 --- a/src/api/resources/prompts/client/requests/PromptsCallRequest.ts +++ b/src/api/resources/prompts/client/requests/PromptsCallRequest.ts @@ -87,7 +87,7 @@ export interface PromptsCallRequest { * Controls how the model uses tools. The following options are supported: * - `'none'` means the model will not call any tool and instead generates a message; this is the default when no tools are provided as part of the Prompt. * - `'auto'` means the model can decide to call one or more of the provided tools; this is the default when tools are provided as part of the Prompt. - * - `'required'` means the model can decide to call one or more of the provided tools. + * - `'required'` means the model must call one or more of the provided tools. * - `{'type': 'function', 'function': {name': }}` forces the model to use the named function. */ toolChoice?: Humanloop.PromptsCallRequestToolChoice; diff --git a/src/api/resources/prompts/client/requests/PromptsCallStreamRequest.ts b/src/api/resources/prompts/client/requests/PromptsCallStreamRequest.ts index 8e67ec92..b444e68c 100644 --- a/src/api/resources/prompts/client/requests/PromptsCallStreamRequest.ts +++ b/src/api/resources/prompts/client/requests/PromptsCallStreamRequest.ts @@ -27,7 +27,7 @@ export interface PromptsCallStreamRequest { * Controls how the model uses tools. The following options are supported: * - `'none'` means the model will not call any tool and instead generates a message; this is the default when no tools are provided as part of the Prompt. * - `'auto'` means the model can decide to call one or more of the provided tools; this is the default when tools are provided as part of the Prompt. - * - `'required'` means the model can decide to call one or more of the provided tools. + * - `'required'` means the model must call one or more of the provided tools. * - `{'type': 'function', 'function': {name': }}` forces the model to use the named function. */ toolChoice?: Humanloop.PromptsCallStreamRequestToolChoice; diff --git a/src/api/resources/prompts/client/requests/index.ts b/src/api/resources/prompts/client/requests/index.ts index 8e7655e4..f17b6d9f 100644 --- a/src/api/resources/prompts/client/requests/index.ts +++ b/src/api/resources/prompts/client/requests/index.ts @@ -6,6 +6,6 @@ export { type ListPromptsGetRequest } from "./ListPromptsGetRequest"; export { type PromptRequest } from "./PromptRequest"; export { type GetPromptsIdGetRequest } from "./GetPromptsIdGetRequest"; export { type UpdatePromptRequest } from "./UpdatePromptRequest"; -export { type PopulateTemplatePromptsIdPopulatePostRequest } from "./PopulateTemplatePromptsIdPopulatePostRequest"; +export { type PopulatePromptsIdPopulatePostRequest } from "./PopulatePromptsIdPopulatePostRequest"; export { type ListVersionsPromptsIdVersionsGetRequest } from "./ListVersionsPromptsIdVersionsGetRequest"; export { type SetDeploymentPromptsIdEnvironmentsEnvironmentIdPostRequest } from "./SetDeploymentPromptsIdEnvironmentsEnvironmentIdPostRequest"; diff --git a/src/api/resources/prompts/types/PromptLogRequestToolChoice.ts b/src/api/resources/prompts/types/PromptLogRequestToolChoice.ts index 0b3bce5e..3b63c853 100644 --- a/src/api/resources/prompts/types/PromptLogRequestToolChoice.ts +++ b/src/api/resources/prompts/types/PromptLogRequestToolChoice.ts @@ -8,7 +8,7 @@ import * as Humanloop from "../../../index"; * Controls how the model uses tools. The following options are supported: * - `'none'` means the model will not call any tool and instead generates a message; this is the default when no tools are provided as part of the Prompt. * - `'auto'` means the model can decide to call one or more of the provided tools; this is the default when tools are provided as part of the Prompt. - * - `'required'` means the model can decide to call one or more of the provided tools. + * - `'required'` means the model must call one or more of the provided tools. * - `{'type': 'function', 'function': {name': }}` forces the model to use the named function. */ export type PromptLogRequestToolChoice = "none" | "auto" | "required" | Humanloop.ToolChoice; diff --git a/src/api/resources/prompts/types/PromptLogUpdateRequestToolChoice.ts b/src/api/resources/prompts/types/PromptLogUpdateRequestToolChoice.ts index d7e2efdb..24c08a13 100644 --- a/src/api/resources/prompts/types/PromptLogUpdateRequestToolChoice.ts +++ b/src/api/resources/prompts/types/PromptLogUpdateRequestToolChoice.ts @@ -8,7 +8,7 @@ import * as Humanloop from "../../../index"; * Controls how the model uses tools. The following options are supported: * - `'none'` means the model will not call any tool and instead generates a message; this is the default when no tools are provided as part of the Prompt. * - `'auto'` means the model can decide to call one or more of the provided tools; this is the default when tools are provided as part of the Prompt. - * - `'required'` means the model can decide to call one or more of the provided tools. + * - `'required'` means the model must call one or more of the provided tools. * - `{'type': 'function', 'function': {name': }}` forces the model to use the named function. */ export type PromptLogUpdateRequestToolChoice = "none" | "auto" | "required" | Humanloop.ToolChoice; diff --git a/src/api/resources/prompts/types/PromptRequestReasoningEffort.ts b/src/api/resources/prompts/types/PromptRequestReasoningEffort.ts new file mode 100644 index 00000000..0981bb2a --- /dev/null +++ b/src/api/resources/prompts/types/PromptRequestReasoningEffort.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../../../index"; + +/** + * Guidance on how many reasoning tokens it should generate before creating a response to the prompt. OpenAI reasoning models (o1, o3-mini) expect a OpenAIReasoningEffort enum. Anthropic reasoning models expect an integer, which signifies the maximum token budget. + */ +export type PromptRequestReasoningEffort = Humanloop.OpenAiReasoningEffort | number; diff --git a/src/api/resources/prompts/types/PromptsCallRequestToolChoice.ts b/src/api/resources/prompts/types/PromptsCallRequestToolChoice.ts index fdef45fa..10ff4848 100644 --- a/src/api/resources/prompts/types/PromptsCallRequestToolChoice.ts +++ b/src/api/resources/prompts/types/PromptsCallRequestToolChoice.ts @@ -8,7 +8,7 @@ import * as Humanloop from "../../../index"; * Controls how the model uses tools. The following options are supported: * - `'none'` means the model will not call any tool and instead generates a message; this is the default when no tools are provided as part of the Prompt. * - `'auto'` means the model can decide to call one or more of the provided tools; this is the default when tools are provided as part of the Prompt. - * - `'required'` means the model can decide to call one or more of the provided tools. + * - `'required'` means the model must call one or more of the provided tools. * - `{'type': 'function', 'function': {name': }}` forces the model to use the named function. */ export type PromptsCallRequestToolChoice = "none" | "auto" | "required" | Humanloop.ToolChoice; diff --git a/src/api/resources/prompts/types/PromptsCallStreamRequestToolChoice.ts b/src/api/resources/prompts/types/PromptsCallStreamRequestToolChoice.ts index 610a475c..00253d44 100644 --- a/src/api/resources/prompts/types/PromptsCallStreamRequestToolChoice.ts +++ b/src/api/resources/prompts/types/PromptsCallStreamRequestToolChoice.ts @@ -8,7 +8,7 @@ import * as Humanloop from "../../../index"; * Controls how the model uses tools. The following options are supported: * - `'none'` means the model will not call any tool and instead generates a message; this is the default when no tools are provided as part of the Prompt. * - `'auto'` means the model can decide to call one or more of the provided tools; this is the default when tools are provided as part of the Prompt. - * - `'required'` means the model can decide to call one or more of the provided tools. + * - `'required'` means the model must call one or more of the provided tools. * - `{'type': 'function', 'function': {name': }}` forces the model to use the named function. */ export type PromptsCallStreamRequestToolChoice = "none" | "auto" | "required" | Humanloop.ToolChoice; diff --git a/src/api/resources/prompts/types/index.ts b/src/api/resources/prompts/types/index.ts index a5d3901d..8265b2f3 100644 --- a/src/api/resources/prompts/types/index.ts +++ b/src/api/resources/prompts/types/index.ts @@ -4,3 +4,4 @@ export * from "./PromptsCallStreamRequestToolChoice"; export * from "./PromptsCallRequestToolChoice"; export * from "./PromptRequestTemplate"; export * from "./PromptRequestStop"; +export * from "./PromptRequestReasoningEffort"; diff --git a/src/api/resources/tools/client/Client.ts b/src/api/resources/tools/client/Client.ts index fc218b7b..74903740 100644 --- a/src/api/resources/tools/client/Client.ts +++ b/src/api/resources/tools/client/Client.ts @@ -33,6 +33,112 @@ export declare namespace Tools { export class Tools { constructor(protected readonly _options: Tools.Options = {}) {} + /** + * Call a Tool. + * + * Calling a Tool with inputs runs the tool's source code and logs the result and metadata to Humanloop. + * + * You can use query parameters `version_id`, or `environment`, to target + * an existing version of the Tool. Otherwise, the default deployed version will be chosen. + * + * Instead of targeting an existing version explicitly, you can instead pass in + * Tool details in the request body. In this case, we will check if the details correspond + * to an existing version of the Tool. If they do not, we will create a new version. This is helpful + * in the case where you are storing or deriving your Tool details in code. + * + * @param {Humanloop.ToolCallRequest} request + * @param {Tools.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Humanloop.UnprocessableEntityError} + * + * @example + * await client.tools.call() + */ + public async call( + request: Humanloop.ToolCallRequest = {}, + requestOptions?: Tools.RequestOptions, + ): Promise { + const { versionId, environment, ..._body } = request; + const _queryParams: Record = {}; + if (versionId != null) { + _queryParams["version_id"] = versionId; + } + + if (environment != null) { + _queryParams["environment"] = environment; + } + + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.HumanloopEnvironment.Default, + "tools/call", + ), + method: "POST", + headers: { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "humanloop", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + ...requestOptions?.headers, + }, + contentType: "application/json", + queryParameters: _queryParams, + requestType: "json", + body: serializers.ToolCallRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.ToolCallResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 422: + throw new Humanloop.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + default: + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.HumanloopTimeoutError("Timeout exceeded when calling POST /tools/call."); + case "unknown": + throw new errors.HumanloopError({ + message: _response.error.errorMessage, + }); + } + } + /** * Log to a Tool. * @@ -105,8 +211,8 @@ export class Tools { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -197,8 +303,8 @@ export class Tools { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -307,8 +413,8 @@ export class Tools { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -380,9 +486,9 @@ export class Tools { * * Tools are identified by the `ID` or their `path`. The name, description and parameters determine the versions of the Tool. * - * If you provide a commit message, then the new version will be committed; - * otherwise it will be uncommitted. If you try to commit an already committed version, - * an exception will be raised. + * You can provide `version_name` and `version_description` to identify and describe your versions. + * Version names must be unique within a Tool - attempting to create a version with a name + * that already exists will result in a 409 Conflict error. * * @param {Humanloop.ToolRequest} request * @param {Tools.RequestOptions} requestOptions - Request-specific configuration. @@ -410,8 +516,7 @@ export class Tools { * "b" * ] * } - * }, - * commitMessage: "Initial commit" + * } * }) */ public async upsert( @@ -429,8 +534,8 @@ export class Tools { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -529,8 +634,8 @@ export class Tools { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -611,8 +716,8 @@ export class Tools { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -693,8 +798,8 @@ export class Tools { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -762,21 +867,15 @@ export class Tools { * @throws {@link Humanloop.UnprocessableEntityError} * * @example - * await client.tools.listVersions("tl_789ghi", { - * status: "committed" - * }) + * await client.tools.listVersions("tl_789ghi") */ public async listVersions( id: string, request: Humanloop.ListVersionsToolsIdVersionsGetRequest = {}, requestOptions?: Tools.RequestOptions, ): Promise { - const { status, evaluatorAggregates } = request; + const { evaluatorAggregates } = request; const _queryParams: Record = {}; - if (status != null) { - _queryParams["status"] = serializers.VersionStatus.jsonOrThrow(status, { unrecognizedObjectKeys: "strip" }); - } - if (evaluatorAggregates != null) { _queryParams["evaluator_aggregates"] = evaluatorAggregates.toString(); } @@ -792,8 +891,8 @@ export class Tools { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -852,41 +951,35 @@ export class Tools { } /** - * Commit a version of the Tool with a commit message. - * - * If the version is already committed, an exception will be raised. + * Delete a version of the Tool. * * @param {string} id - Unique identifier for Tool. * @param {string} versionId - Unique identifier for the specific version of the Tool. - * @param {Humanloop.CommitRequest} request * @param {Tools.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Humanloop.UnprocessableEntityError} * * @example - * await client.tools.commit("tl_789ghi", "tv_012jkl", { - * commitMessage: "Initial commit" - * }) + * await client.tools.deleteToolVersion("id", "version_id") */ - public async commit( + public async deleteToolVersion( id: string, versionId: string, - request: Humanloop.CommitRequest, requestOptions?: Tools.RequestOptions, - ): Promise { + ): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.baseUrl)) ?? (await core.Supplier.get(this._options.environment)) ?? environments.HumanloopEnvironment.Default, - `tools/${encodeURIComponent(id)}/versions/${encodeURIComponent(versionId)}/commit`, + `tools/${encodeURIComponent(id)}/versions/${encodeURIComponent(versionId)}`, ), - method: "POST", + method: "DELETE", headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -894,19 +987,12 @@ export class Tools { }, contentType: "application/json", requestType: "json", - body: serializers.CommitRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return serializers.ToolResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }); + return; } if (_response.error.reason === "status-code") { @@ -937,7 +1023,7 @@ export class Tools { }); case "timeout": throw new errors.HumanloopTimeoutError( - "Timeout exceeded when calling POST /tools/{id}/versions/{version_id}/commit.", + "Timeout exceeded when calling DELETE /tools/{id}/versions/{version_id}.", ); case "unknown": throw new errors.HumanloopError({ @@ -947,22 +1033,24 @@ export class Tools { } /** - * Delete a version of the Tool. + * Update the name or description of the Tool version. * * @param {string} id - Unique identifier for Tool. * @param {string} versionId - Unique identifier for the specific version of the Tool. + * @param {Humanloop.UpdateVersionRequest} request * @param {Tools.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Humanloop.UnprocessableEntityError} * * @example - * await client.tools.deleteToolVersion("id", "version_id") + * await client.tools.updateToolVersion("id", "version_id", {}) */ - public async deleteToolVersion( + public async updateToolVersion( id: string, versionId: string, + request: Humanloop.UpdateVersionRequest, requestOptions?: Tools.RequestOptions, - ): Promise { + ): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.baseUrl)) ?? @@ -970,12 +1058,12 @@ export class Tools { environments.HumanloopEnvironment.Default, `tools/${encodeURIComponent(id)}/versions/${encodeURIComponent(versionId)}`, ), - method: "DELETE", + method: "PATCH", headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -983,12 +1071,19 @@ export class Tools { }, contentType: "application/json", requestType: "json", + body: serializers.UpdateVersionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }), timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, maxRetries: requestOptions?.maxRetries, abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return; + return serializers.ToolResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); } if (_response.error.reason === "status-code") { @@ -1019,7 +1114,7 @@ export class Tools { }); case "timeout": throw new errors.HumanloopTimeoutError( - "Timeout exceeded when calling DELETE /tools/{id}/versions/{version_id}.", + "Timeout exceeded when calling PATCH /tools/{id}/versions/{version_id}.", ); case "unknown": throw new errors.HumanloopError({ @@ -1066,8 +1161,8 @@ export class Tools { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -1158,8 +1253,8 @@ export class Tools { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -1238,8 +1333,8 @@ export class Tools { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -1331,8 +1426,8 @@ export class Tools { headers: { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "humanloop", - "X-Fern-SDK-Version": "0.8.18", - "User-Agent": "humanloop/0.8.18", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, ...(await this._getCustomAuthorizationHeaders()), @@ -1392,6 +1487,270 @@ export class Tools { } } + /** + * @param {string} id - Unique identifier for File. + * @param {Tools.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Humanloop.UnprocessableEntityError} + * + * @example + * await client.tools.getEnvironmentVariables("id") + */ + public async getEnvironmentVariables( + id: string, + requestOptions?: Tools.RequestOptions, + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.HumanloopEnvironment.Default, + `tools/${encodeURIComponent(id)}/environment-variables`, + ), + method: "GET", + headers: { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "humanloop", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.tools.getEnvironmentVariables.Response.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 422: + throw new Humanloop.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + default: + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.HumanloopTimeoutError( + "Timeout exceeded when calling GET /tools/{id}/environment-variables.", + ); + case "unknown": + throw new errors.HumanloopError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * Add an environment variable to a Tool. + * + * @param {string} id - Unique identifier for Tool. + * @param {Humanloop.FileEnvironmentVariableRequest[]} request + * @param {Tools.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Humanloop.UnprocessableEntityError} + * + * @example + * await client.tools.addEnvironmentVariable("id", [{ + * name: "name", + * value: "value" + * }]) + */ + public async addEnvironmentVariable( + id: string, + request: Humanloop.FileEnvironmentVariableRequest[], + requestOptions?: Tools.RequestOptions, + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.HumanloopEnvironment.Default, + `tools/${encodeURIComponent(id)}/environment-variables`, + ), + method: "POST", + headers: { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "humanloop", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + body: serializers.tools.addEnvironmentVariable.Request.jsonOrThrow(request, { + unrecognizedObjectKeys: "strip", + }), + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.tools.addEnvironmentVariable.Response.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 422: + throw new Humanloop.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + default: + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.HumanloopTimeoutError( + "Timeout exceeded when calling POST /tools/{id}/environment-variables.", + ); + case "unknown": + throw new errors.HumanloopError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {string} id - Unique identifier for File. + * @param {string} name - Name of the Environment Variable to delete. + * @param {Tools.RequestOptions} requestOptions - Request-specific configuration. + * + * @throws {@link Humanloop.UnprocessableEntityError} + * + * @example + * await client.tools.deleteEnvironmentVariable("id", "name") + */ + public async deleteEnvironmentVariable( + id: string, + name: string, + requestOptions?: Tools.RequestOptions, + ): Promise { + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: urlJoin( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.HumanloopEnvironment.Default, + `tools/${encodeURIComponent(id)}/environment-variables/${encodeURIComponent(name)}`, + ), + method: "DELETE", + headers: { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "humanloop", + "X-Fern-SDK-Version": "0.8.20", + "User-Agent": "humanloop/0.8.20", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...(await this._getCustomAuthorizationHeaders()), + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return serializers.tools.deleteEnvironmentVariable.Response.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }); + } + + if (_response.error.reason === "status-code") { + switch (_response.error.statusCode) { + case 422: + throw new Humanloop.UnprocessableEntityError( + serializers.HttpValidationError.parseOrThrow(_response.error.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + ); + default: + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.HumanloopError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.HumanloopTimeoutError( + "Timeout exceeded when calling DELETE /tools/{id}/environment-variables/{name}.", + ); + case "unknown": + throw new errors.HumanloopError({ + message: _response.error.errorMessage, + }); + } + } + protected async _getCustomAuthorizationHeaders() { const apiKeyValue = (await core.Supplier.get(this._options.apiKey)) ?? process?.env["HUMANLOOP_API_KEY"]; return { "X-API-KEY": apiKeyValue }; diff --git a/src/api/resources/tools/client/requests/ListVersionsToolsIdVersionsGetRequest.ts b/src/api/resources/tools/client/requests/ListVersionsToolsIdVersionsGetRequest.ts index d2a6517a..541b2326 100644 --- a/src/api/resources/tools/client/requests/ListVersionsToolsIdVersionsGetRequest.ts +++ b/src/api/resources/tools/client/requests/ListVersionsToolsIdVersionsGetRequest.ts @@ -2,19 +2,11 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Humanloop from "../../../../index"; - /** * @example - * { - * status: "committed" - * } + * {} */ export interface ListVersionsToolsIdVersionsGetRequest { - /** - * Filter versions by status: 'uncommitted', 'committed'. If no status is provided, all versions are returned. - */ - status?: Humanloop.VersionStatus; /** * Whether to include Evaluator aggregate results for the versions in the response */ diff --git a/src/api/resources/tools/client/requests/ToolCallRequest.ts b/src/api/resources/tools/client/requests/ToolCallRequest.ts new file mode 100644 index 00000000..e8705964 --- /dev/null +++ b/src/api/resources/tools/client/requests/ToolCallRequest.ts @@ -0,0 +1,50 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../../../../index"; + +/** + * @example + * {} + */ +export interface ToolCallRequest { + /** + * A specific Version ID of the Tool to call. + */ + versionId?: string; + /** + * Name of the Environment identifying a deployed version to call. + */ + environment?: string; + /** Path of the Tool, including the name. This locates the Tool in the Humanloop filesystem and is used as as a unique identifier. For example: `folder/name` or just `name`. */ + path?: string; + /** ID for an existing Tool. */ + id?: string; + /** Details of your Tool. A new Tool version will be created if the provided details are new. */ + tool?: Humanloop.ToolKernelRequest; + /** The inputs passed to the prompt template. */ + inputs?: Record; + /** Identifies where the model was called from. */ + source?: string; + /** Any additional metadata to record. */ + metadata?: Record; + /** When the logged event started. */ + startTime?: Date; + /** When the logged event ended. */ + endTime?: Date; + /** Status of a Log. Set to `incomplete` if you intend to update and eventually complete the Log and want the File's monitoring Evaluators to wait until you mark it as `complete`. If log_status is not provided, observability will pick up the Log as soon as possible. Updating this from specified to unspecified is undefined behavior. */ + logStatus?: Humanloop.LogStatus; + /** Unique identifier for the Datapoint that this Log is derived from. This can be used by Humanloop to associate Logs to Evaluations. If provided, Humanloop will automatically associate this Log to Evaluations that require a Log for this Datapoint-Version pair. */ + sourceDatapointId?: string; + /** The ID of the parent Log to nest this Log under in a Trace. */ + traceParentId?: string; + /** End-user ID related to the Log. */ + user?: string; + /** The name of the Environment the Log is associated to. */ + toolCallRequestEnvironment?: string; + /** Whether the request/response payloads will be stored on Humanloop. */ + save?: boolean; + /** This will identify a Log. If you don't provide a Log ID, Humanloop will generate one for you. */ + logId?: string; +} diff --git a/src/api/resources/tools/client/requests/ToolLogRequest.ts b/src/api/resources/tools/client/requests/ToolLogRequest.ts index f67ac8a7..3992c004 100644 --- a/src/api/resources/tools/client/requests/ToolLogRequest.ts +++ b/src/api/resources/tools/client/requests/ToolLogRequest.ts @@ -49,6 +49,8 @@ export interface ToolLogRequest { path?: string; /** ID for an existing Tool. */ id?: string; + /** Details of your Tool. A new Tool version will be created if the provided details are new. */ + tool?: Humanloop.ToolKernelRequest; /** When the logged event started. */ startTime?: Date; /** When the logged event ended. */ @@ -87,6 +89,4 @@ export interface ToolLogRequest { save?: boolean; /** This will identify a Log. If you don't provide a Log ID, Humanloop will generate one for you. */ logId?: string; - /** Details of your Tool. A new Tool version will be created if the provided details are new. */ - tool?: Humanloop.ToolKernelRequest; } diff --git a/src/api/resources/tools/client/requests/ToolRequest.ts b/src/api/resources/tools/client/requests/ToolRequest.ts index 4f8b33a4..7c3e9c21 100644 --- a/src/api/resources/tools/client/requests/ToolRequest.ts +++ b/src/api/resources/tools/client/requests/ToolRequest.ts @@ -26,8 +26,7 @@ import * as Humanloop from "../../../../index"; * "b" * ] * } - * }, - * commitMessage: "Initial commit" + * } * } */ export interface ToolRequest { @@ -45,6 +44,8 @@ export interface ToolRequest { attributes?: Record; /** Type of Tool. */ toolType?: Humanloop.FilesToolType; - /** Message describing the changes made. */ - commitMessage?: string; + /** Unique identifier for this Tool version. Each Tool can only have one version with a given name. */ + versionName?: string; + /** Description of the Version. */ + versionDescription?: string; } diff --git a/src/api/resources/tools/client/requests/index.ts b/src/api/resources/tools/client/requests/index.ts index e112a4a5..9c8b0519 100644 --- a/src/api/resources/tools/client/requests/index.ts +++ b/src/api/resources/tools/client/requests/index.ts @@ -1,3 +1,4 @@ +export { type ToolCallRequest } from "./ToolCallRequest"; export { type ToolLogRequest } from "./ToolLogRequest"; export { type ToolLogUpdateRequest } from "./ToolLogUpdateRequest"; export { type ListToolsGetRequest } from "./ListToolsGetRequest"; diff --git a/src/api/types/AgentCallResponse.ts b/src/api/types/AgentCallResponse.ts new file mode 100644 index 00000000..ad4bbd24 --- /dev/null +++ b/src/api/types/AgentCallResponse.ts @@ -0,0 +1,53 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../index"; + +/** + * Response model for a Agent call. + */ +export interface AgentCallResponse { + /** When the logged event started. */ + startTime?: Date; + /** When the logged event ended. */ + endTime?: Date; + /** The messages passed to the to provider chat endpoint. */ + messages?: Humanloop.ChatMessage[]; + /** + * Controls how the model uses tools. The following options are supported: + * - `'none'` means the model will not call any tool and instead generates a message; this is the default when no tools are provided as part of the Prompt. + * - `'auto'` means the model can decide to call one or more of the provided tools; this is the default when tools are provided as part of the Prompt. + * - `'required'` means the model must call one or more of the provided tools. + * - `{'type': 'function', 'function': {name': }}` forces the model to use the named function. + */ + toolChoice?: Humanloop.AgentCallResponseToolChoice; + /** Prompt used to generate the Log. */ + prompt: Humanloop.PromptResponse; + /** The inputs passed to the prompt template. */ + inputs?: Record; + /** Identifies where the model was called from. */ + source?: string; + /** Any additional metadata to record. */ + metadata?: Record; + /** Status of a Log. Set to `incomplete` if you intend to update and eventually complete the Log and want the File's monitoring Evaluators to wait until you mark it as `complete`. If log_status is not provided, observability will pick up the Log as soon as possible. Updating this from specified to unspecified is undefined behavior. */ + logStatus?: Humanloop.LogStatus; + /** Unique identifier for the Datapoint that this Log is derived from. This can be used by Humanloop to associate Logs to Evaluations. If provided, Humanloop will automatically associate this Log to Evaluations that require a Log for this Datapoint-Version pair. */ + sourceDatapointId?: string; + /** The ID of the parent Log to nest this Log under in a Trace. */ + traceParentId?: string; + /** End-user ID related to the Log. */ + user?: string; + /** The name of the Environment the Log is associated to. */ + environment?: string; + /** Whether the request/response payloads will be stored on Humanloop. */ + save?: boolean; + /** This will identify a Log. If you don't provide a Log ID, Humanloop will generate one for you. */ + logId?: string; + /** ID of the log. */ + id: string; + /** ID of the Trace containing the Prompt Call Log. */ + traceId?: string; + /** The logs generated by the Prompt call. */ + logs: Humanloop.PromptCallLogResponse[]; +} diff --git a/src/api/types/AgentCallResponseToolChoice.ts b/src/api/types/AgentCallResponseToolChoice.ts new file mode 100644 index 00000000..03797dcf --- /dev/null +++ b/src/api/types/AgentCallResponseToolChoice.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../index"; + +/** + * Controls how the model uses tools. The following options are supported: + * - `'none'` means the model will not call any tool and instead generates a message; this is the default when no tools are provided as part of the Prompt. + * - `'auto'` means the model can decide to call one or more of the provided tools; this is the default when tools are provided as part of the Prompt. + * - `'required'` means the model must call one or more of the provided tools. + * - `{'type': 'function', 'function': {name': }}` forces the model to use the named function. + */ +export type AgentCallResponseToolChoice = "none" | "auto" | "required" | Humanloop.ToolChoice; diff --git a/src/api/types/AgentCallStreamResponse.ts b/src/api/types/AgentCallStreamResponse.ts new file mode 100644 index 00000000..952f37c1 --- /dev/null +++ b/src/api/types/AgentCallStreamResponse.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../index"; + +/** + * Response model for calling Agent in streaming mode. + */ +export interface AgentCallStreamResponse { + logId: string; + message: string; + payload?: Humanloop.AgentCallStreamResponsePayload; + type: Humanloop.EventType; +} diff --git a/src/api/types/AgentCallStreamResponsePayload.ts b/src/api/types/AgentCallStreamResponsePayload.ts new file mode 100644 index 00000000..67414449 --- /dev/null +++ b/src/api/types/AgentCallStreamResponsePayload.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../index"; + +export type AgentCallStreamResponsePayload = Humanloop.LogStreamResponse | Humanloop.LogResponse | Humanloop.ToolCall; diff --git a/src/api/types/AgentContinueResponse.ts b/src/api/types/AgentContinueResponse.ts new file mode 100644 index 00000000..e4b26972 --- /dev/null +++ b/src/api/types/AgentContinueResponse.ts @@ -0,0 +1,53 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../index"; + +/** + * Response model for continuing an Agent call. + */ +export interface AgentContinueResponse { + /** When the logged event started. */ + startTime?: Date; + /** When the logged event ended. */ + endTime?: Date; + /** The messages passed to the to provider chat endpoint. */ + messages?: Humanloop.ChatMessage[]; + /** + * Controls how the model uses tools. The following options are supported: + * - `'none'` means the model will not call any tool and instead generates a message; this is the default when no tools are provided as part of the Prompt. + * - `'auto'` means the model can decide to call one or more of the provided tools; this is the default when tools are provided as part of the Prompt. + * - `'required'` means the model must call one or more of the provided tools. + * - `{'type': 'function', 'function': {name': }}` forces the model to use the named function. + */ + toolChoice?: Humanloop.AgentContinueResponseToolChoice; + /** Prompt used to generate the Log. */ + prompt: Humanloop.PromptResponse; + /** The inputs passed to the prompt template. */ + inputs?: Record; + /** Identifies where the model was called from. */ + source?: string; + /** Any additional metadata to record. */ + metadata?: Record; + /** Status of a Log. Set to `incomplete` if you intend to update and eventually complete the Log and want the File's monitoring Evaluators to wait until you mark it as `complete`. If log_status is not provided, observability will pick up the Log as soon as possible. Updating this from specified to unspecified is undefined behavior. */ + logStatus?: Humanloop.LogStatus; + /** Unique identifier for the Datapoint that this Log is derived from. This can be used by Humanloop to associate Logs to Evaluations. If provided, Humanloop will automatically associate this Log to Evaluations that require a Log for this Datapoint-Version pair. */ + sourceDatapointId?: string; + /** The ID of the parent Log to nest this Log under in a Trace. */ + traceParentId?: string; + /** End-user ID related to the Log. */ + user?: string; + /** The name of the Environment the Log is associated to. */ + environment?: string; + /** Whether the request/response payloads will be stored on Humanloop. */ + save?: boolean; + /** This will identify a Log. If you don't provide a Log ID, Humanloop will generate one for you. */ + logId?: string; + /** ID of the log. */ + id: string; + /** ID of the Trace containing the Prompt Call Log. */ + traceId?: string; + /** The logs generated by the Prompt call. */ + logs: Humanloop.PromptCallLogResponse[]; +} diff --git a/src/api/types/AgentContinueResponseToolChoice.ts b/src/api/types/AgentContinueResponseToolChoice.ts new file mode 100644 index 00000000..a2ffcef6 --- /dev/null +++ b/src/api/types/AgentContinueResponseToolChoice.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../index"; + +/** + * Controls how the model uses tools. The following options are supported: + * - `'none'` means the model will not call any tool and instead generates a message; this is the default when no tools are provided as part of the Prompt. + * - `'auto'` means the model can decide to call one or more of the provided tools; this is the default when tools are provided as part of the Prompt. + * - `'required'` means the model must call one or more of the provided tools. + * - `{'type': 'function', 'function': {name': }}` forces the model to use the named function. + */ +export type AgentContinueResponseToolChoice = "none" | "auto" | "required" | Humanloop.ToolChoice; diff --git a/src/api/types/AgentContinueStreamResponse.ts b/src/api/types/AgentContinueStreamResponse.ts new file mode 100644 index 00000000..62b41c80 --- /dev/null +++ b/src/api/types/AgentContinueStreamResponse.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../index"; + +/** + * Response model for continuing an Agent call in streaming mode. + */ +export interface AgentContinueStreamResponse { + logId: string; + message: string; + payload?: Humanloop.AgentContinueStreamResponsePayload; + type: Humanloop.EventType; +} diff --git a/src/api/types/AgentContinueStreamResponsePayload.ts b/src/api/types/AgentContinueStreamResponsePayload.ts new file mode 100644 index 00000000..adbbbf0f --- /dev/null +++ b/src/api/types/AgentContinueStreamResponsePayload.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../index"; + +export type AgentContinueStreamResponsePayload = + | Humanloop.LogStreamResponse + | Humanloop.LogResponse + | Humanloop.ToolCall; diff --git a/src/api/types/AgentInlineTool.ts b/src/api/types/AgentInlineTool.ts new file mode 100644 index 00000000..314dee50 --- /dev/null +++ b/src/api/types/AgentInlineTool.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../index"; + +export interface AgentInlineTool { + type: "inline"; + jsonSchema: Humanloop.ToolFunction; + stopAgent: Humanloop.StopAgentEnum; +} diff --git a/src/api/types/AgentKernelRequest.ts b/src/api/types/AgentKernelRequest.ts new file mode 100644 index 00000000..c43e0906 --- /dev/null +++ b/src/api/types/AgentKernelRequest.ts @@ -0,0 +1,55 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../index"; + +/** + * Base class used by both PromptKernelRequest and AgentKernelRequest. + * + * Contains the consistent Prompt-related fields. + */ +export interface AgentKernelRequest { + /** The model instance used, e.g. `gpt-4`. See [supported models](https://humanloop.com/docs/reference/supported-models) */ + model: string; + /** The provider model endpoint used. */ + endpoint?: Humanloop.ModelEndpoints; + /** + * The template contains the main structure and instructions for the model, including input variables for dynamic values. + * + * For chat models, provide the template as a ChatTemplate (a list of messages), e.g. a system message, followed by a user message with an input variable. + * For completion models, provide a prompt template as a string. + * + * Input variables should be specified with double curly bracket syntax: `{{input_name}}`. + */ + template?: Humanloop.AgentKernelRequestTemplate; + /** The template language to use for rendering the template. */ + templateLanguage?: Humanloop.TemplateLanguage; + /** The company providing the underlying model service. */ + provider?: Humanloop.ModelProviders; + /** The maximum number of tokens to generate. Provide max_tokens=-1 to dynamically calculate the maximum number of tokens to generate given the length of the prompt */ + maxTokens?: number; + /** What sampling temperature to use when making a generation. Higher values means the model will be more creative. */ + temperature?: number; + /** An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. */ + topP?: number; + /** The string (or list of strings) after which the model will stop generating. The returned text will not contain the stop sequence. */ + stop?: Humanloop.AgentKernelRequestStop; + /** Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the generation so far. */ + presencePenalty?: number; + /** Number between -2.0 and 2.0. Positive values penalize new tokens based on how frequently they appear in the generation so far. */ + frequencyPenalty?: number; + /** Other parameter values to be passed to the provider call. */ + other?: Record; + /** If specified, model will make a best effort to sample deterministically, but it is not guaranteed. */ + seed?: number; + /** The format of the response. Only `{"type": "json_object"}` is currently supported for chat. */ + responseFormat?: Humanloop.ResponseFormat; + /** Guidance on how many reasoning tokens it should generate before creating a response to the prompt. OpenAI reasoning models (o1, o3-mini) expect a OpenAIReasoningEffort enum. Anthropic reasoning models expect an integer, which signifies the maximum token budget. */ + reasoningEffort?: Humanloop.AgentKernelRequestReasoningEffort; + tools?: Humanloop.AgentKernelRequestToolsItem[]; + /** Additional fields to describe the Prompt. Helpful to separate Prompt versions from each other with details on how they were created or used. */ + attributes?: Record; + /** The maximum number of iterations the Agent can run. This is used to limit the number of times the Agent model is called. */ + maxIterations?: number; +} diff --git a/src/api/types/AgentKernelRequestReasoningEffort.ts b/src/api/types/AgentKernelRequestReasoningEffort.ts new file mode 100644 index 00000000..eca9d494 --- /dev/null +++ b/src/api/types/AgentKernelRequestReasoningEffort.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../index"; + +/** + * Guidance on how many reasoning tokens it should generate before creating a response to the prompt. OpenAI reasoning models (o1, o3-mini) expect a OpenAIReasoningEffort enum. Anthropic reasoning models expect an integer, which signifies the maximum token budget. + */ +export type AgentKernelRequestReasoningEffort = Humanloop.OpenAiReasoningEffort | number; diff --git a/src/api/types/AgentKernelRequestStop.ts b/src/api/types/AgentKernelRequestStop.ts new file mode 100644 index 00000000..cb66c6e5 --- /dev/null +++ b/src/api/types/AgentKernelRequestStop.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * The string (or list of strings) after which the model will stop generating. The returned text will not contain the stop sequence. + */ +export type AgentKernelRequestStop = string | string[]; diff --git a/src/api/types/AgentKernelRequestTemplate.ts b/src/api/types/AgentKernelRequestTemplate.ts new file mode 100644 index 00000000..ed8c876a --- /dev/null +++ b/src/api/types/AgentKernelRequestTemplate.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../index"; + +/** + * The template contains the main structure and instructions for the model, including input variables for dynamic values. + * + * For chat models, provide the template as a ChatTemplate (a list of messages), e.g. a system message, followed by a user message with an input variable. + * For completion models, provide a prompt template as a string. + * + * Input variables should be specified with double curly bracket syntax: `{{input_name}}`. + */ +export type AgentKernelRequestTemplate = string | Humanloop.ChatMessage[]; diff --git a/src/api/types/AgentKernelRequestToolsItem.ts b/src/api/types/AgentKernelRequestToolsItem.ts new file mode 100644 index 00000000..f3b126f9 --- /dev/null +++ b/src/api/types/AgentKernelRequestToolsItem.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../index"; + +export type AgentKernelRequestToolsItem = Humanloop.AgentLinkedFileRequest | Humanloop.AgentInlineTool; diff --git a/src/api/types/AgentLinkedFileRequest.ts b/src/api/types/AgentLinkedFileRequest.ts new file mode 100644 index 00000000..a307e378 --- /dev/null +++ b/src/api/types/AgentLinkedFileRequest.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../index"; + +export interface AgentLinkedFileRequest { + type: "file"; + link: Humanloop.LinkedFileRequest; + stopAgent: Humanloop.StopAgentEnum; +} diff --git a/src/api/types/AgentLinkedFileResponse.ts b/src/api/types/AgentLinkedFileResponse.ts new file mode 100644 index 00000000..a0d07b03 --- /dev/null +++ b/src/api/types/AgentLinkedFileResponse.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../index"; + +export interface AgentLinkedFileResponse { + type: "file"; + link: Humanloop.LinkedFileRequest; + stopAgent: Humanloop.StopAgentEnum; + file?: Humanloop.AgentLinkedFileResponseFile; +} diff --git a/src/api/types/PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseRecordsItem.ts b/src/api/types/AgentLinkedFileResponseFile.ts similarity index 62% rename from src/api/types/PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseRecordsItem.ts rename to src/api/types/AgentLinkedFileResponseFile.ts index 260bc9bd..16b31656 100644 --- a/src/api/types/PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseRecordsItem.ts +++ b/src/api/types/AgentLinkedFileResponseFile.ts @@ -4,9 +4,10 @@ import * as Humanloop from "../index"; -export type PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseRecordsItem = +export type AgentLinkedFileResponseFile = | Humanloop.PromptResponse | Humanloop.ToolResponse | Humanloop.DatasetResponse | Humanloop.EvaluatorResponse - | Humanloop.FlowResponse; + | Humanloop.FlowResponse + | Humanloop.AgentResponse; diff --git a/src/api/types/AgentLogResponse.ts b/src/api/types/AgentLogResponse.ts new file mode 100644 index 00000000..6349e664 --- /dev/null +++ b/src/api/types/AgentLogResponse.ts @@ -0,0 +1,87 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../index"; + +/** + * General request for creating a Log + */ +export interface AgentLogResponse { + /** The message returned by the provider. */ + outputMessage?: Humanloop.ChatMessage; + /** Number of tokens in the prompt used to generate the output. */ + promptTokens?: number; + /** Number of reasoning tokens used to generate the output. */ + reasoningTokens?: number; + /** Number of tokens in the output generated by the model. */ + outputTokens?: number; + /** Cost in dollars associated to the tokens in the prompt. */ + promptCost?: number; + /** Cost in dollars associated to the tokens in the output. */ + outputCost?: number; + /** Reason the generation finished. */ + finishReason?: string; + /** The messages passed to the to provider chat endpoint. */ + messages?: Humanloop.ChatMessage[]; + /** + * Controls how the model uses tools. The following options are supported: + * - `'none'` means the model will not call any tool and instead generates a message; this is the default when no tools are provided as part of the Prompt. + * - `'auto'` means the model can decide to call one or more of the provided tools; this is the default when tools are provided as part of the Prompt. + * - `'required'` means the model must call one or more of the provided tools. + * - `{'type': 'function', 'function': {name': }}` forces the model to use the named function. + */ + toolChoice?: Humanloop.AgentLogResponseToolChoice; + /** Agent that generated the Log. */ + agent: Humanloop.AgentResponse; + /** When the logged event started. */ + startTime?: Date; + /** When the logged event ended. */ + endTime?: Date; + /** Generated output from your model for the provided inputs. Can be `None` if logging an error, or if creating a parent Log with the intention to populate it later. */ + output?: string; + /** User defined timestamp for when the log was created. */ + createdAt?: Date; + /** Error message if the log is an error. */ + error?: string; + /** Duration of the logged event in seconds. */ + providerLatency?: number; + /** Captured log and debug statements. */ + stdout?: string; + /** Raw request sent to provider. */ + providerRequest?: Record; + /** Raw response received the provider. */ + providerResponse?: Record; + /** The inputs passed to the prompt template. */ + inputs?: Record; + /** Identifies where the model was called from. */ + source?: string; + /** Any additional metadata to record. */ + metadata?: Record; + /** Status of a Log. Set to `incomplete` if you intend to update and eventually complete the Log and want the File's monitoring Evaluators to wait until you mark it as `complete`. If log_status is not provided, observability will pick up the Log as soon as possible. Updating this from specified to unspecified is undefined behavior. */ + logStatus?: Humanloop.LogStatus; + /** Unique identifier for the Datapoint that this Log is derived from. This can be used by Humanloop to associate Logs to Evaluations. If provided, Humanloop will automatically associate this Log to Evaluations that require a Log for this Datapoint-Version pair. */ + sourceDatapointId?: string; + /** The ID of the parent Log to nest this Log under in a Trace. */ + traceParentId?: string; + /** Array of Batch IDs that this Log is part of. Batches are used to group Logs together for offline Evaluations */ + batches?: string[]; + /** End-user ID related to the Log. */ + user?: string; + /** The name of the Environment the Log is associated to. */ + environment?: string; + /** Whether the request/response payloads will be stored on Humanloop. */ + save?: boolean; + /** This will identify a Log. If you don't provide a Log ID, Humanloop will generate one for you. */ + logId?: string; + /** Unique identifier for the Log. */ + id: string; + /** List of Evaluator Logs associated with the Log. These contain Evaluator judgments on the Log. */ + evaluatorLogs: Humanloop.EvaluatorLogResponse[]; + /** Identifier for the Flow that the Trace belongs to. */ + traceFlowId?: string; + /** Identifier for the Trace that the Log belongs to. */ + traceId?: string; + /** Logs nested under this Log in the Trace. */ + traceChildren?: Humanloop.LogResponse[]; +} diff --git a/src/api/types/AgentLogResponseToolChoice.ts b/src/api/types/AgentLogResponseToolChoice.ts new file mode 100644 index 00000000..8f6e704d --- /dev/null +++ b/src/api/types/AgentLogResponseToolChoice.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../index"; + +/** + * Controls how the model uses tools. The following options are supported: + * - `'none'` means the model will not call any tool and instead generates a message; this is the default when no tools are provided as part of the Prompt. + * - `'auto'` means the model can decide to call one or more of the provided tools; this is the default when tools are provided as part of the Prompt. + * - `'required'` means the model must call one or more of the provided tools. + * - `{'type': 'function', 'function': {name': }}` forces the model to use the named function. + */ +export type AgentLogResponseToolChoice = "none" | "auto" | "required" | Humanloop.ToolChoice; diff --git a/src/api/types/AgentLogStreamResponse.ts b/src/api/types/AgentLogStreamResponse.ts new file mode 100644 index 00000000..cba89fe7 --- /dev/null +++ b/src/api/types/AgentLogStreamResponse.ts @@ -0,0 +1,41 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../index"; + +/** + * Prompt specific log output shared between PromptLogRequest and PromptCallLogResponse. + */ +export interface AgentLogStreamResponse { + /** Generated output from your model for the provided inputs. Can be `None` if logging an error, or if creating a parent Log with the intention to populate it later. */ + output?: string; + /** User defined timestamp for when the log was created. */ + createdAt?: Date; + /** Error message if the log is an error. */ + error?: string; + /** Duration of the logged event in seconds. */ + providerLatency?: number; + /** Captured log and debug statements. */ + stdout?: string; + /** The message returned by the provider. */ + outputMessage?: Humanloop.ChatMessage; + /** Number of tokens in the prompt used to generate the output. */ + promptTokens?: number; + /** Number of reasoning tokens used to generate the output. */ + reasoningTokens?: number; + /** Number of tokens in the output generated by the model. */ + outputTokens?: number; + /** Cost in dollars associated to the tokens in the prompt. */ + promptCost?: number; + /** Cost in dollars associated to the tokens in the output. */ + outputCost?: number; + /** Reason the generation finished. */ + finishReason?: string; + /** ID of the log. */ + id: string; + /** ID of the Agent the log belongs to. */ + agentId: string; + /** ID of the specific version of the Agent. */ + versionId: string; +} diff --git a/src/api/types/AgentResponse.ts b/src/api/types/AgentResponse.ts new file mode 100644 index 00000000..b9251aac --- /dev/null +++ b/src/api/types/AgentResponse.ts @@ -0,0 +1,103 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../index"; + +/** + * Base type that all File Responses should inherit from. + * + * Attributes defined here are common to all File Responses and should be overridden + * in the inheriting classes with documentation and appropriate Field definitions. + */ +export interface AgentResponse { + /** Path of the Agent, including the name, which is used as a unique identifier. */ + path: string; + /** Unique identifier for the Agent. */ + id: string; + /** ID of the directory that the file is in on Humanloop. */ + directoryId?: string; + /** The model instance used, e.g. `gpt-4`. See [supported models](https://humanloop.com/docs/reference/supported-models) */ + model: string; + /** The provider model endpoint used. */ + endpoint?: Humanloop.ModelEndpoints; + /** + * The template contains the main structure and instructions for the model, including input variables for dynamic values. + * + * For chat models, provide the template as a ChatTemplate (a list of messages), e.g. a system message, followed by a user message with an input variable. + * For completion models, provide a prompt template as a string. + * + * Input variables should be specified with double curly bracket syntax: `{{input_name}}`. + */ + template?: Humanloop.AgentResponseTemplate; + /** The template language to use for rendering the template. */ + templateLanguage?: Humanloop.TemplateLanguage; + /** The company providing the underlying model service. */ + provider?: Humanloop.ModelProviders; + /** The maximum number of tokens to generate. Provide max_tokens=-1 to dynamically calculate the maximum number of tokens to generate given the length of the prompt */ + maxTokens?: number; + /** What sampling temperature to use when making a generation. Higher values means the model will be more creative. */ + temperature?: number; + /** An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. */ + topP?: number; + /** The string (or list of strings) after which the model will stop generating. The returned text will not contain the stop sequence. */ + stop?: Humanloop.AgentResponseStop; + /** Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the generation so far. */ + presencePenalty?: number; + /** Number between -2.0 and 2.0. Positive values penalize new tokens based on how frequently they appear in the generation so far. */ + frequencyPenalty?: number; + /** Other parameter values to be passed to the provider call. */ + other?: Record; + /** If specified, model will make a best effort to sample deterministically, but it is not guaranteed. */ + seed?: number; + /** The format of the response. Only `{"type": "json_object"}` is currently supported for chat. */ + responseFormat?: Humanloop.ResponseFormat; + /** Guidance on how many reasoning tokens it should generate before creating a response to the prompt. OpenAI reasoning models (o1, o3-mini) expect a OpenAIReasoningEffort enum. Anthropic reasoning models expect an integer, which signifies the maximum token budget. */ + reasoningEffort?: Humanloop.AgentResponseReasoningEffort; + /** List of tools that the Agent can call. These can be linked files or inline tools. */ + tools: Humanloop.AgentResponseToolsItem[]; + /** Additional fields to describe the Prompt. Helpful to separate Prompt versions from each other with details on how they were created or used. */ + attributes?: Record; + /** The maximum number of iterations the Agent can run. This is used to limit the number of times the Agent model is called. */ + maxIterations?: number; + /** Unique name for the Agent version. Version names must be unique for a given Agent. */ + versionName?: string; + /** Description of the version, e.g., the changes made in this version. */ + versionDescription?: string; + /** Description of the Agent. */ + description?: string; + /** List of tags associated with the file. */ + tags?: string[]; + /** Long description of the file. */ + readme?: string; + /** Name of the Agent. */ + name: string; + /** The JSON schema for the Prompt. */ + schema?: Record; + /** Unique identifier for the specific Agent Version. If no query params provided, the default deployed Agent Version is returned. */ + versionId: string; + type?: "agent"; + /** The list of environments the Agent Version is deployed to. */ + environments?: Humanloop.EnvironmentResponse[]; + createdAt: Date; + updatedAt: Date; + /** The user who created the Agent. */ + createdBy?: Humanloop.UserResponse | undefined; + /** The user who committed the Agent Version. */ + committedBy?: Humanloop.UserResponse | undefined; + /** The date and time the Agent Version was committed. */ + committedAt?: Date; + /** The status of the Agent Version. */ + status: Humanloop.VersionStatus; + lastUsedAt: Date; + /** The number of logs that have been generated for this Agent Version */ + versionLogsCount: number; + /** The number of logs that have been generated across all Agent Versions */ + totalLogsCount: number; + /** Inputs associated to the Agent. Inputs correspond to any of the variables used within the Agent template. */ + inputs: Humanloop.InputResponse[]; + /** Evaluators that have been attached to this Agent that are used for monitoring logs. */ + evaluators?: Humanloop.MonitoringEvaluatorResponse[]; + /** Aggregation of Evaluator results for the Agent Version. */ + evaluatorAggregates?: Humanloop.EvaluatorAggregate[]; +} diff --git a/src/api/types/AgentResponseReasoningEffort.ts b/src/api/types/AgentResponseReasoningEffort.ts new file mode 100644 index 00000000..885f8354 --- /dev/null +++ b/src/api/types/AgentResponseReasoningEffort.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../index"; + +/** + * Guidance on how many reasoning tokens it should generate before creating a response to the prompt. OpenAI reasoning models (o1, o3-mini) expect a OpenAIReasoningEffort enum. Anthropic reasoning models expect an integer, which signifies the maximum token budget. + */ +export type AgentResponseReasoningEffort = Humanloop.OpenAiReasoningEffort | number; diff --git a/src/api/types/AgentResponseStop.ts b/src/api/types/AgentResponseStop.ts new file mode 100644 index 00000000..9df91298 --- /dev/null +++ b/src/api/types/AgentResponseStop.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * The string (or list of strings) after which the model will stop generating. The returned text will not contain the stop sequence. + */ +export type AgentResponseStop = string | string[]; diff --git a/src/api/types/AgentResponseTemplate.ts b/src/api/types/AgentResponseTemplate.ts new file mode 100644 index 00000000..8ee8fc11 --- /dev/null +++ b/src/api/types/AgentResponseTemplate.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../index"; + +/** + * The template contains the main structure and instructions for the model, including input variables for dynamic values. + * + * For chat models, provide the template as a ChatTemplate (a list of messages), e.g. a system message, followed by a user message with an input variable. + * For completion models, provide a prompt template as a string. + * + * Input variables should be specified with double curly bracket syntax: `{{input_name}}`. + */ +export type AgentResponseTemplate = string | Humanloop.ChatMessage[]; diff --git a/src/api/types/AgentResponseToolsItem.ts b/src/api/types/AgentResponseToolsItem.ts new file mode 100644 index 00000000..a69127ec --- /dev/null +++ b/src/api/types/AgentResponseToolsItem.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../index"; + +export type AgentResponseToolsItem = Humanloop.AgentLinkedFileResponse | Humanloop.AgentInlineTool; diff --git a/src/api/types/AnthropicRedactedThinkingContent.ts b/src/api/types/AnthropicRedactedThinkingContent.ts new file mode 100644 index 00000000..a9e0485e --- /dev/null +++ b/src/api/types/AnthropicRedactedThinkingContent.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface AnthropicRedactedThinkingContent { + type: "redacted_thinking"; + /** Thinking block Anthropic redacted for safety reasons. User is expected to pass the block back to Anthropic */ + data: string; +} diff --git a/src/api/types/AnthropicThinkingContent.ts b/src/api/types/AnthropicThinkingContent.ts new file mode 100644 index 00000000..e064143a --- /dev/null +++ b/src/api/types/AnthropicThinkingContent.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface AnthropicThinkingContent { + type: "thinking"; + /** Model's chain-of-thought for providing the response. */ + thinking: string; + /** Cryptographic signature that verifies the thinking block was generated by Anthropic. */ + signature: string; +} diff --git a/src/api/types/ChatMessage.ts b/src/api/types/ChatMessage.ts index a410aa3f..966d569d 100644 --- a/src/api/types/ChatMessage.ts +++ b/src/api/types/ChatMessage.ts @@ -15,4 +15,6 @@ export interface ChatMessage { role: Humanloop.ChatRole; /** A list of tool calls requested by the assistant. */ toolCalls?: Humanloop.ToolCall[]; + /** Model's chain-of-thought for providing the response. Present on assistant messages if model supports it. */ + thinking?: Humanloop.ChatMessageThinkingItem[]; } diff --git a/src/api/types/ChatMessageThinkingItem.ts b/src/api/types/ChatMessageThinkingItem.ts new file mode 100644 index 00000000..ecb0eb00 --- /dev/null +++ b/src/api/types/ChatMessageThinkingItem.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../index"; + +export type ChatMessageThinkingItem = Humanloop.AnthropicThinkingContent | Humanloop.AnthropicRedactedThinkingContent; diff --git a/src/api/types/CommitRequest.ts b/src/api/types/CommitRequest.ts deleted file mode 100644 index 93296b50..00000000 --- a/src/api/types/CommitRequest.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export interface CommitRequest { - /** Message describing the changes made. */ - commitMessage: string; -} diff --git a/src/api/types/CreateAgentLogResponse.ts b/src/api/types/CreateAgentLogResponse.ts new file mode 100644 index 00000000..c2ef1608 --- /dev/null +++ b/src/api/types/CreateAgentLogResponse.ts @@ -0,0 +1,19 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../index"; + +/** + * Response for an Agent Log. + */ +export interface CreateAgentLogResponse { + /** Unique identifier for the Log. */ + id: string; + /** Unique identifier for the Agent. */ + agentId: string; + /** Unique identifier for the Flow Version. */ + versionId: string; + /** Status of the Flow Log. When a Flow Log is marked as `complete`, no more Logs can be added to it. Monitoring Evaluators will only run on `complete` Flow Logs. */ + logStatus?: Humanloop.LogStatus; +} diff --git a/src/api/types/DatasetResponse.ts b/src/api/types/DatasetResponse.ts index 42ca17cf..12b2b2e3 100644 --- a/src/api/types/DatasetResponse.ts +++ b/src/api/types/DatasetResponse.ts @@ -21,6 +21,8 @@ export interface DatasetResponse { name: string; /** Description of the Dataset. */ description?: string; + /** The JSON schema for the File. */ + schema?: Record; /** Long description of the file. */ readme?: string; /** List of tags associated with the file. */ @@ -34,15 +36,11 @@ export interface DatasetResponse { updatedAt: Date; /** The user who created the Dataset. */ createdBy?: Humanloop.UserResponse | undefined; - /** The user who committed the Dataset Version. */ - committedBy?: Humanloop.UserResponse | undefined; - /** The date and time the Dataset Version was committed. */ - committedAt?: Date; - /** The status of the Dataset Version. */ - status: Humanloop.VersionStatus; lastUsedAt: Date; - /** Message describing the changes made. If provided, a committed version of the Dataset is created. Otherwise, an uncommitted version is created. */ - commitMessage?: string; + /** Unique name for the Dataset version. Version names must be unique for a given Dataset. */ + versionName?: string; + /** Description of the version, e.g., the changes made in this version. */ + versionDescription?: string; /** The number of Datapoints in this Dataset version. */ datapointsCount: number; /** The list of Datapoints in this Dataset version. Only provided if explicitly requested. */ diff --git a/src/api/types/DirectoryWithParentsAndChildrenResponseFilesItem.ts b/src/api/types/DirectoryWithParentsAndChildrenResponseFilesItem.ts index 6d61da80..12121f31 100644 --- a/src/api/types/DirectoryWithParentsAndChildrenResponseFilesItem.ts +++ b/src/api/types/DirectoryWithParentsAndChildrenResponseFilesItem.ts @@ -9,4 +9,5 @@ export type DirectoryWithParentsAndChildrenResponseFilesItem = | Humanloop.ToolResponse | Humanloop.EvaluatorResponse | Humanloop.DatasetResponse - | Humanloop.FlowResponse; + | Humanloop.FlowResponse + | Humanloop.AgentResponse; diff --git a/src/api/types/EvaluatorResponse.ts b/src/api/types/EvaluatorResponse.ts index 80d40ac3..bfb6faf6 100644 --- a/src/api/types/EvaluatorResponse.ts +++ b/src/api/types/EvaluatorResponse.ts @@ -14,13 +14,17 @@ export interface EvaluatorResponse { id: string; /** ID of the directory that the file is in on Humanloop. */ directoryId?: string; - /** Message describing the changes made. */ - commitMessage?: string; + /** Unique name for the Evaluator version. Version names must be unique for a given Evaluator. */ + versionName?: string; + /** Description of the version, e.g., the changes made in this version. */ + versionDescription?: string; spec: Humanloop.EvaluatorResponseSpec; /** Name of the Evaluator, which is used as a unique identifier. */ name: string; /** Description of the Evaluator. */ description?: string; + /** The JSON schema for the File. */ + schema?: Record; /** Long description of the file. */ readme?: string; /** List of tags associated with the file. */ @@ -34,11 +38,6 @@ export interface EvaluatorResponse { updatedAt: Date; /** The user who created the Evaluator. */ createdBy?: Humanloop.UserResponse | undefined; - /** The user who committed the Evaluator Version. */ - committedBy?: Humanloop.UserResponse | undefined; - /** The date and time the Evaluator Version was committed. */ - committedAt?: Date; - status: Humanloop.VersionStatus; lastUsedAt: Date; /** The number of logs that have been generated for this Evaluator Version */ versionLogsCount: number; diff --git a/src/api/types/EventType.ts b/src/api/types/EventType.ts new file mode 100644 index 00000000..cba1c9f1 --- /dev/null +++ b/src/api/types/EventType.ts @@ -0,0 +1,34 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * An enumeration. + */ +export type EventType = + | "agent_turn_start" + | "agent_turn_suspend" + | "agent_turn_continue" + | "agent_turn_end" + | "agent_start" + | "agent_update" + | "agent_end" + | "tool_start" + | "tool_update" + | "tool_end" + | "error" + | "agent_generation_error"; +export const EventType = { + AgentTurnStart: "agent_turn_start", + AgentTurnSuspend: "agent_turn_suspend", + AgentTurnContinue: "agent_turn_continue", + AgentTurnEnd: "agent_turn_end", + AgentStart: "agent_start", + AgentUpdate: "agent_update", + AgentEnd: "agent_end", + ToolStart: "tool_start", + ToolUpdate: "tool_update", + ToolEnd: "tool_end", + Error: "error", + AgentGenerationError: "agent_generation_error", +} as const; diff --git a/src/api/types/FileEnvironmentResponseFile.ts b/src/api/types/FileEnvironmentResponseFile.ts index 6941ac11..cb3c798e 100644 --- a/src/api/types/FileEnvironmentResponseFile.ts +++ b/src/api/types/FileEnvironmentResponseFile.ts @@ -12,4 +12,5 @@ export type FileEnvironmentResponseFile = | Humanloop.ToolResponse | Humanloop.DatasetResponse | Humanloop.EvaluatorResponse - | Humanloop.FlowResponse; + | Humanloop.FlowResponse + | Humanloop.AgentResponse; diff --git a/src/api/types/FileEnvironmentVariableRequest.ts b/src/api/types/FileEnvironmentVariableRequest.ts new file mode 100644 index 00000000..00274bc2 --- /dev/null +++ b/src/api/types/FileEnvironmentVariableRequest.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface FileEnvironmentVariableRequest { + /** Name of the environment variable. */ + name: string; + /** Value of the environment variable. */ + value: string; +} diff --git a/src/api/types/FileType.ts b/src/api/types/FileType.ts index 35763ee0..1d4676e7 100644 --- a/src/api/types/FileType.ts +++ b/src/api/types/FileType.ts @@ -5,11 +5,12 @@ /** * Enum for File types. */ -export type FileType = "prompt" | "tool" | "dataset" | "evaluator" | "flow"; +export type FileType = "prompt" | "tool" | "dataset" | "evaluator" | "flow" | "agent"; export const FileType = { Prompt: "prompt", Tool: "tool", Dataset: "dataset", Evaluator: "evaluator", Flow: "flow", + Agent: "agent", } as const; diff --git a/src/api/types/FilesToolType.ts b/src/api/types/FilesToolType.ts index d96527e1..4d8bb11c 100644 --- a/src/api/types/FilesToolType.ts +++ b/src/api/types/FilesToolType.ts @@ -5,7 +5,14 @@ /** * Type of tool. */ -export type FilesToolType = "pinecone_search" | "google" | "mock" | "snippet" | "json_schema" | "get_api_call"; +export type FilesToolType = + | "pinecone_search" + | "google" + | "mock" + | "snippet" + | "json_schema" + | "get_api_call" + | "python"; export const FilesToolType = { PineconeSearch: "pinecone_search", Google: "google", @@ -13,4 +20,5 @@ export const FilesToolType = { Snippet: "snippet", JsonSchema: "json_schema", GetApiCall: "get_api_call", + Python: "python", } as const; diff --git a/src/api/types/FlowResponse.ts b/src/api/types/FlowResponse.ts index 2fa4867e..1af64d3a 100644 --- a/src/api/types/FlowResponse.ts +++ b/src/api/types/FlowResponse.ts @@ -16,12 +16,16 @@ export interface FlowResponse { directoryId?: string; /** A key-value object identifying the Flow Version. */ attributes: Record; - /** Message describing the changes made. If provided, a committed version of the Flow is created. Otherwise, an uncommitted version is created. */ - commitMessage?: string; + /** Unique name for the Flow version. Version names must be unique for a given Flow. */ + versionName?: string; + /** Description of the Version. */ + versionDescription?: string; /** Name of the Flow. */ name: string; /** Description of the Flow. */ description?: string; + /** The JSON schema for the File. */ + schema?: Record; /** Long description of the file. */ readme?: string; /** List of tags associated with the file. */ @@ -35,12 +39,6 @@ export interface FlowResponse { updatedAt: Date; /** The user who created the Flow. */ createdBy?: Humanloop.UserResponse | undefined; - /** The user who committed the Flow Version. */ - committedBy?: Humanloop.UserResponse | undefined; - /** The date and time the Flow Version was committed. */ - committedAt?: Date; - /** The status of the Flow Version. */ - status: Humanloop.VersionStatus; lastUsedAt: Date; /** The number of logs that have been generated for this Flow Version */ versionLogsCount: number; diff --git a/src/api/types/LinkedFileRequest.ts b/src/api/types/LinkedFileRequest.ts new file mode 100644 index 00000000..88a2a13d --- /dev/null +++ b/src/api/types/LinkedFileRequest.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface LinkedFileRequest { + fileId: string; + environmentId?: string; + versionId?: string; +} diff --git a/src/api/types/ListAgents.ts b/src/api/types/ListAgents.ts new file mode 100644 index 00000000..3510a066 --- /dev/null +++ b/src/api/types/ListAgents.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../index"; + +export interface ListAgents { + /** The list of Agents. */ + records: Humanloop.AgentResponse[]; +} diff --git a/src/api/types/LogResponse.ts b/src/api/types/LogResponse.ts index 68536c5e..aa15dc2c 100644 --- a/src/api/types/LogResponse.ts +++ b/src/api/types/LogResponse.ts @@ -8,4 +8,5 @@ export type LogResponse = | Humanloop.PromptLogResponse | Humanloop.ToolLogResponse | Humanloop.EvaluatorLogResponse - | Humanloop.FlowLogResponse; + | Humanloop.FlowLogResponse + | Humanloop.AgentLogResponse; diff --git a/src/api/types/LogStreamResponse.ts b/src/api/types/LogStreamResponse.ts new file mode 100644 index 00000000..488cfeac --- /dev/null +++ b/src/api/types/LogStreamResponse.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../index"; + +export type LogStreamResponse = Humanloop.PromptCallStreamResponse | Humanloop.AgentLogStreamResponse; diff --git a/src/api/types/ModelProviders.ts b/src/api/types/ModelProviders.ts index f87ac682..6147b168 100644 --- a/src/api/types/ModelProviders.ts +++ b/src/api/types/ModelProviders.ts @@ -6,25 +6,25 @@ * Supported model providers. */ export type ModelProviders = - | "openai" - | "openai_azure" - | "mock" | "anthropic" | "bedrock" | "cohere" - | "replicate" + | "deepseek" | "google" | "groq" - | "deepseek"; + | "mock" + | "openai" + | "openai_azure" + | "replicate"; export const ModelProviders = { - Openai: "openai", - OpenaiAzure: "openai_azure", - Mock: "mock", Anthropic: "anthropic", Bedrock: "bedrock", Cohere: "cohere", - Replicate: "replicate", + Deepseek: "deepseek", Google: "google", Groq: "groq", - Deepseek: "deepseek", + Mock: "mock", + Openai: "openai", + OpenaiAzure: "openai_azure", + Replicate: "replicate", } as const; diff --git a/src/api/types/ReasoningEffort.ts b/src/api/types/OpenAiReasoningEffort.ts similarity index 63% rename from src/api/types/ReasoningEffort.ts rename to src/api/types/OpenAiReasoningEffort.ts index 5aacc51a..a9dd607f 100644 --- a/src/api/types/ReasoningEffort.ts +++ b/src/api/types/OpenAiReasoningEffort.ts @@ -5,8 +5,8 @@ /** * Supported reasoning effort. */ -export type ReasoningEffort = "high" | "medium" | "low"; -export const ReasoningEffort = { +export type OpenAiReasoningEffort = "high" | "medium" | "low"; +export const OpenAiReasoningEffort = { High: "high", Medium: "medium", Low: "low", diff --git a/src/api/types/PaginatedDataAgentResponse.ts b/src/api/types/PaginatedDataAgentResponse.ts new file mode 100644 index 00000000..f5af5b6b --- /dev/null +++ b/src/api/types/PaginatedDataAgentResponse.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../index"; + +export interface PaginatedDataAgentResponse { + records: Humanloop.AgentResponse[]; + page: number; + size: number; + total: number; +} diff --git a/src/api/types/PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponse.ts b/src/api/types/PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseAgentResponse.ts similarity index 69% rename from src/api/types/PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponse.ts rename to src/api/types/PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseAgentResponse.ts index 260194eb..308a2c42 100644 --- a/src/api/types/PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponse.ts +++ b/src/api/types/PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseAgentResponse.ts @@ -4,8 +4,8 @@ import * as Humanloop from "../index"; -export interface PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponse { - records: Humanloop.PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseRecordsItem[]; +export interface PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseAgentResponse { + records: Humanloop.PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseAgentResponseRecordsItem[]; page: number; size: number; total: number; diff --git a/src/api/types/PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseAgentResponseRecordsItem.ts b/src/api/types/PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseAgentResponseRecordsItem.ts new file mode 100644 index 00000000..e8363384 --- /dev/null +++ b/src/api/types/PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseAgentResponseRecordsItem.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../index"; + +export type PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseAgentResponseRecordsItem = + + | Humanloop.PromptResponse + | Humanloop.ToolResponse + | Humanloop.DatasetResponse + | Humanloop.EvaluatorResponse + | Humanloop.FlowResponse + | Humanloop.AgentResponse; diff --git a/src/api/types/PopulateTemplateResponse.ts b/src/api/types/PopulateTemplateResponse.ts index 08a49ed8..c92b9621 100644 --- a/src/api/types/PopulateTemplateResponse.ts +++ b/src/api/types/PopulateTemplateResponse.ts @@ -52,16 +52,18 @@ export interface PopulateTemplateResponse { seed?: number; /** The format of the response. Only `{"type": "json_object"}` is currently supported for chat. */ responseFormat?: Humanloop.ResponseFormat; - /** Give model guidance on how many reasoning tokens it should generate before creating a response to the prompt. This is only supported for OpenAI reasoning (o1, o3-mini) models. */ - reasoningEffort?: Humanloop.ReasoningEffort; + /** Guidance on how many reasoning tokens it should generate before creating a response to the prompt. OpenAI reasoning models (o1, o3-mini) expect a OpenAIReasoningEffort enum. Anthropic reasoning models expect an integer, which signifies the maximum token budget. */ + reasoningEffort?: Humanloop.PopulateTemplateResponseReasoningEffort; /** The tool specification that the model can choose to call if Tool calling is supported. */ tools?: Humanloop.ToolFunction[]; /** The tools linked to your prompt that the model can call. */ linkedTools?: Humanloop.LinkedToolResponse[]; /** Additional fields to describe the Prompt. Helpful to separate Prompt versions from each other with details on how they were created or used. */ attributes?: Record; - /** Message describing the changes made. */ - commitMessage?: string; + /** Unique name for the Prompt version. Version names must be unique for a given Prompt. */ + versionName?: string; + /** Description of the version, e.g., the changes made in this version. */ + versionDescription?: string; /** Description of the Prompt. */ description?: string; /** List of tags associated with the file. */ @@ -70,6 +72,8 @@ export interface PopulateTemplateResponse { readme?: string; /** Name of the Prompt. */ name: string; + /** The JSON schema for the Prompt. */ + schema?: Record; /** Unique identifier for the specific Prompt Version. If no query params provided, the default deployed Prompt Version is returned. */ versionId: string; type?: "prompt"; @@ -79,12 +83,6 @@ export interface PopulateTemplateResponse { updatedAt: Date; /** The user who created the Prompt. */ createdBy?: Humanloop.UserResponse | undefined; - /** The user who committed the Prompt Version. */ - committedBy?: Humanloop.UserResponse | undefined; - /** The date and time the Prompt Version was committed. */ - committedAt?: Date; - /** The status of the Prompt Version. */ - status: Humanloop.VersionStatus; lastUsedAt: Date; /** The number of logs that have been generated for this Prompt Version */ versionLogsCount: number; diff --git a/src/api/types/PopulateTemplateResponseReasoningEffort.ts b/src/api/types/PopulateTemplateResponseReasoningEffort.ts new file mode 100644 index 00000000..1d83b6f8 --- /dev/null +++ b/src/api/types/PopulateTemplateResponseReasoningEffort.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../index"; + +/** + * Guidance on how many reasoning tokens it should generate before creating a response to the prompt. OpenAI reasoning models (o1, o3-mini) expect a OpenAIReasoningEffort enum. Anthropic reasoning models expect an integer, which signifies the maximum token budget. + */ +export type PopulateTemplateResponseReasoningEffort = Humanloop.OpenAiReasoningEffort | number; diff --git a/src/api/types/PromptCallResponse.ts b/src/api/types/PromptCallResponse.ts index 267a3f2b..2708447f 100644 --- a/src/api/types/PromptCallResponse.ts +++ b/src/api/types/PromptCallResponse.ts @@ -18,7 +18,7 @@ export interface PromptCallResponse { * Controls how the model uses tools. The following options are supported: * - `'none'` means the model will not call any tool and instead generates a message; this is the default when no tools are provided as part of the Prompt. * - `'auto'` means the model can decide to call one or more of the provided tools; this is the default when tools are provided as part of the Prompt. - * - `'required'` means the model can decide to call one or more of the provided tools. + * - `'required'` means the model must call one or more of the provided tools. * - `{'type': 'function', 'function': {name': }}` forces the model to use the named function. */ toolChoice?: Humanloop.PromptCallResponseToolChoice; diff --git a/src/api/types/PromptCallResponseToolChoice.ts b/src/api/types/PromptCallResponseToolChoice.ts index 686aaabd..bdb41cc5 100644 --- a/src/api/types/PromptCallResponseToolChoice.ts +++ b/src/api/types/PromptCallResponseToolChoice.ts @@ -8,7 +8,7 @@ import * as Humanloop from "../index"; * Controls how the model uses tools. The following options are supported: * - `'none'` means the model will not call any tool and instead generates a message; this is the default when no tools are provided as part of the Prompt. * - `'auto'` means the model can decide to call one or more of the provided tools; this is the default when tools are provided as part of the Prompt. - * - `'required'` means the model can decide to call one or more of the provided tools. + * - `'required'` means the model must call one or more of the provided tools. * - `{'type': 'function', 'function': {name': }}` forces the model to use the named function. */ export type PromptCallResponseToolChoice = "none" | "auto" | "required" | Humanloop.ToolChoice; diff --git a/src/api/types/PromptKernelRequest.ts b/src/api/types/PromptKernelRequest.ts index 2e1ec153..9225e0b9 100644 --- a/src/api/types/PromptKernelRequest.ts +++ b/src/api/types/PromptKernelRequest.ts @@ -4,6 +4,11 @@ import * as Humanloop from "../index"; +/** + * Base class used by both PromptKernelRequest and AgentKernelRequest. + * + * Contains the consistent Prompt-related fields. + */ export interface PromptKernelRequest { /** The model instance used, e.g. `gpt-4`. See [supported models](https://humanloop.com/docs/reference/supported-models) */ model: string; @@ -40,8 +45,8 @@ export interface PromptKernelRequest { seed?: number; /** The format of the response. Only `{"type": "json_object"}` is currently supported for chat. */ responseFormat?: Humanloop.ResponseFormat; - /** Give model guidance on how many reasoning tokens it should generate before creating a response to the prompt. This is only supported for OpenAI reasoning (o1, o3-mini) models. */ - reasoningEffort?: Humanloop.ReasoningEffort; + /** Guidance on how many reasoning tokens it should generate before creating a response to the prompt. OpenAI reasoning models (o1, o3-mini) expect a OpenAIReasoningEffort enum. Anthropic reasoning models expect an integer, which signifies the maximum token budget. */ + reasoningEffort?: Humanloop.PromptKernelRequestReasoningEffort; /** The tool specification that the model can choose to call if Tool calling is supported. */ tools?: Humanloop.ToolFunction[]; /** The IDs of the Tools in your organization that the model can choose to call if Tool calling is supported. The default deployed version of that tool is called. */ diff --git a/src/api/types/PromptKernelRequestReasoningEffort.ts b/src/api/types/PromptKernelRequestReasoningEffort.ts new file mode 100644 index 00000000..ce1b6cab --- /dev/null +++ b/src/api/types/PromptKernelRequestReasoningEffort.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../index"; + +/** + * Guidance on how many reasoning tokens it should generate before creating a response to the prompt. OpenAI reasoning models (o1, o3-mini) expect a OpenAIReasoningEffort enum. Anthropic reasoning models expect an integer, which signifies the maximum token budget. + */ +export type PromptKernelRequestReasoningEffort = Humanloop.OpenAiReasoningEffort | number; diff --git a/src/api/types/PromptLogResponse.ts b/src/api/types/PromptLogResponse.ts index 37c22dad..cf938b1a 100644 --- a/src/api/types/PromptLogResponse.ts +++ b/src/api/types/PromptLogResponse.ts @@ -28,7 +28,7 @@ export interface PromptLogResponse { * Controls how the model uses tools. The following options are supported: * - `'none'` means the model will not call any tool and instead generates a message; this is the default when no tools are provided as part of the Prompt. * - `'auto'` means the model can decide to call one or more of the provided tools; this is the default when tools are provided as part of the Prompt. - * - `'required'` means the model can decide to call one or more of the provided tools. + * - `'required'` means the model must call one or more of the provided tools. * - `{'type': 'function', 'function': {name': }}` forces the model to use the named function. */ toolChoice?: Humanloop.PromptLogResponseToolChoice; diff --git a/src/api/types/PromptLogResponseToolChoice.ts b/src/api/types/PromptLogResponseToolChoice.ts index e2ab2dce..bf201146 100644 --- a/src/api/types/PromptLogResponseToolChoice.ts +++ b/src/api/types/PromptLogResponseToolChoice.ts @@ -8,7 +8,7 @@ import * as Humanloop from "../index"; * Controls how the model uses tools. The following options are supported: * - `'none'` means the model will not call any tool and instead generates a message; this is the default when no tools are provided as part of the Prompt. * - `'auto'` means the model can decide to call one or more of the provided tools; this is the default when tools are provided as part of the Prompt. - * - `'required'` means the model can decide to call one or more of the provided tools. + * - `'required'` means the model must call one or more of the provided tools. * - `{'type': 'function', 'function': {name': }}` forces the model to use the named function. */ export type PromptLogResponseToolChoice = "none" | "auto" | "required" | Humanloop.ToolChoice; diff --git a/src/api/types/PromptResponse.ts b/src/api/types/PromptResponse.ts index efd4d9ba..beb732f6 100644 --- a/src/api/types/PromptResponse.ts +++ b/src/api/types/PromptResponse.ts @@ -52,16 +52,18 @@ export interface PromptResponse { seed?: number; /** The format of the response. Only `{"type": "json_object"}` is currently supported for chat. */ responseFormat?: Humanloop.ResponseFormat; - /** Give model guidance on how many reasoning tokens it should generate before creating a response to the prompt. This is only supported for OpenAI reasoning (o1, o3-mini) models. */ - reasoningEffort?: Humanloop.ReasoningEffort; + /** Guidance on how many reasoning tokens it should generate before creating a response to the prompt. OpenAI reasoning models (o1, o3-mini) expect a OpenAIReasoningEffort enum. Anthropic reasoning models expect an integer, which signifies the maximum token budget. */ + reasoningEffort?: Humanloop.PromptResponseReasoningEffort; /** The tool specification that the model can choose to call if Tool calling is supported. */ tools?: Humanloop.ToolFunction[]; /** The tools linked to your prompt that the model can call. */ linkedTools?: Humanloop.LinkedToolResponse[]; /** Additional fields to describe the Prompt. Helpful to separate Prompt versions from each other with details on how they were created or used. */ attributes?: Record; - /** Message describing the changes made. */ - commitMessage?: string; + /** Unique name for the Prompt version. Version names must be unique for a given Prompt. */ + versionName?: string; + /** Description of the version, e.g., the changes made in this version. */ + versionDescription?: string; /** Description of the Prompt. */ description?: string; /** List of tags associated with the file. */ @@ -70,6 +72,8 @@ export interface PromptResponse { readme?: string; /** Name of the Prompt. */ name: string; + /** The JSON schema for the Prompt. */ + schema?: Record; /** Unique identifier for the specific Prompt Version. If no query params provided, the default deployed Prompt Version is returned. */ versionId: string; type?: "prompt"; @@ -79,12 +83,6 @@ export interface PromptResponse { updatedAt: Date; /** The user who created the Prompt. */ createdBy?: Humanloop.UserResponse | undefined; - /** The user who committed the Prompt Version. */ - committedBy?: Humanloop.UserResponse | undefined; - /** The date and time the Prompt Version was committed. */ - committedAt?: Date; - /** The status of the Prompt Version. */ - status: Humanloop.VersionStatus; lastUsedAt: Date; /** The number of logs that have been generated for this Prompt Version */ versionLogsCount: number; diff --git a/src/api/types/PromptResponseReasoningEffort.ts b/src/api/types/PromptResponseReasoningEffort.ts new file mode 100644 index 00000000..baaa9ca1 --- /dev/null +++ b/src/api/types/PromptResponseReasoningEffort.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../index"; + +/** + * Guidance on how many reasoning tokens it should generate before creating a response to the prompt. OpenAI reasoning models (o1, o3-mini) expect a OpenAIReasoningEffort enum. Anthropic reasoning models expect an integer, which signifies the maximum token budget. + */ +export type PromptResponseReasoningEffort = Humanloop.OpenAiReasoningEffort | number; diff --git a/src/api/types/RunVersionResponse.ts b/src/api/types/RunVersionResponse.ts index e9a0257a..a518f82d 100644 --- a/src/api/types/RunVersionResponse.ts +++ b/src/api/types/RunVersionResponse.ts @@ -8,4 +8,5 @@ export type RunVersionResponse = | Humanloop.PromptResponse | Humanloop.ToolResponse | Humanloop.EvaluatorResponse - | Humanloop.FlowResponse; + | Humanloop.FlowResponse + | Humanloop.AgentResponse; diff --git a/src/api/types/StopAgentEnum.ts b/src/api/types/StopAgentEnum.ts new file mode 100644 index 00000000..cf9cb7d4 --- /dev/null +++ b/src/api/types/StopAgentEnum.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * Whether calling the Tool should an Agent. + */ +export type StopAgentEnum = "none" | "stop_agent"; +export const StopAgentEnum = { + None: "none", + StopAgent: "stop_agent", +} as const; diff --git a/src/api/types/ToolCallResponse.ts b/src/api/types/ToolCallResponse.ts new file mode 100644 index 00000000..49cdd630 --- /dev/null +++ b/src/api/types/ToolCallResponse.ts @@ -0,0 +1,63 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Humanloop from "../index"; + +/** + * Response model for a Tool call. + */ +export interface ToolCallResponse { + /** When the logged event started. */ + startTime?: Date; + /** When the logged event ended. */ + endTime?: Date; + /** Tool used to generate the Log. */ + tool: Humanloop.ToolResponse; + /** Generated output from your model for the provided inputs. Can be `None` if logging an error, or if creating a parent Log with the intention to populate it later. */ + output?: string; + /** User defined timestamp for when the log was created. */ + createdAt?: Date; + /** Error message if the log is an error. */ + error?: string; + /** Duration of the logged event in seconds. */ + providerLatency?: number; + /** Captured log and debug statements. */ + stdout?: string; + /** Raw request sent to provider. */ + providerRequest?: Record; + /** Raw response received the provider. */ + providerResponse?: Record; + /** The inputs passed to the prompt template. */ + inputs?: Record; + /** Identifies where the model was called from. */ + source?: string; + /** Any additional metadata to record. */ + metadata?: Record; + /** Status of a Log. Set to `incomplete` if you intend to update and eventually complete the Log and want the File's monitoring Evaluators to wait until you mark it as `complete`. If log_status is not provided, observability will pick up the Log as soon as possible. Updating this from specified to unspecified is undefined behavior. */ + logStatus?: Humanloop.LogStatus; + /** Unique identifier for the Datapoint that this Log is derived from. This can be used by Humanloop to associate Logs to Evaluations. If provided, Humanloop will automatically associate this Log to Evaluations that require a Log for this Datapoint-Version pair. */ + sourceDatapointId?: string; + /** The ID of the parent Log to nest this Log under in a Trace. */ + traceParentId?: string; + /** Array of Batch IDs that this Log is part of. Batches are used to group Logs together for offline Evaluations */ + batches?: string[]; + /** End-user ID related to the Log. */ + user?: string; + /** The name of the Environment the Log is associated to. */ + environment?: string; + /** Whether the request/response payloads will be stored on Humanloop. */ + save?: boolean; + /** This will identify a Log. If you don't provide a Log ID, Humanloop will generate one for you. */ + logId?: string; + /** ID of the log. */ + id: string; + /** List of Evaluator Logs associated with the Log. These contain Evaluator judgments on the Log. */ + evaluatorLogs: Humanloop.EvaluatorLogResponse[]; + /** Identifier for the Flow that the Trace belongs to. */ + traceFlowId?: string; + /** ID of the Trace containing the Tool Call Log. */ + traceId?: string; + /** Logs nested under this Log in the Trace. */ + traceChildren?: Humanloop.LogResponse[]; +} diff --git a/src/api/types/ToolResponse.ts b/src/api/types/ToolResponse.ts index 7a35f855..27ff9dc9 100644 --- a/src/api/types/ToolResponse.ts +++ b/src/api/types/ToolResponse.ts @@ -27,8 +27,10 @@ export interface ToolResponse { attributes?: Record; /** Type of Tool. */ toolType?: Humanloop.FilesToolType; - /** Message describing the changes made. */ - commitMessage?: string; + /** Unique identifier for this Tool version. Each Tool can only have one version with a given name. */ + versionName?: string; + /** Description of the Version. */ + versionDescription?: string; /** Name of the Tool, which is used as a unique identifier. */ name: string; /** Description of the Tool. */ @@ -46,12 +48,6 @@ export interface ToolResponse { updatedAt: Date; /** The user who created the Tool. */ createdBy?: Humanloop.UserResponse | undefined; - /** The user who committed the Tool Version. */ - committedBy?: Humanloop.UserResponse | undefined; - /** The date and time the Tool Version was committed. */ - committedAt?: Date; - /** The status of the Tool Version. */ - status: Humanloop.VersionStatus; lastUsedAt: Date; /** The number of logs that have been generated for this Tool Version */ versionLogsCount: number; diff --git a/src/api/types/UpdateVersionRequest.ts b/src/api/types/UpdateVersionRequest.ts new file mode 100644 index 00000000..8a344181 --- /dev/null +++ b/src/api/types/UpdateVersionRequest.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface UpdateVersionRequest { + /** Name of the version. */ + name?: string; + /** Description of the version. */ + description?: string; +} diff --git a/src/api/types/VersionDeploymentResponseFile.ts b/src/api/types/VersionDeploymentResponseFile.ts index f6178319..dee7f20a 100644 --- a/src/api/types/VersionDeploymentResponseFile.ts +++ b/src/api/types/VersionDeploymentResponseFile.ts @@ -12,4 +12,5 @@ export type VersionDeploymentResponseFile = | Humanloop.ToolResponse | Humanloop.DatasetResponse | Humanloop.EvaluatorResponse - | Humanloop.FlowResponse; + | Humanloop.FlowResponse + | Humanloop.AgentResponse; diff --git a/src/api/types/VersionIdResponseVersion.ts b/src/api/types/VersionIdResponseVersion.ts index 1e9f9710..a5279b59 100644 --- a/src/api/types/VersionIdResponseVersion.ts +++ b/src/api/types/VersionIdResponseVersion.ts @@ -12,4 +12,5 @@ export type VersionIdResponseVersion = | Humanloop.ToolResponse | Humanloop.DatasetResponse | Humanloop.EvaluatorResponse - | Humanloop.FlowResponse; + | Humanloop.FlowResponse + | Humanloop.AgentResponse; diff --git a/src/api/types/index.ts b/src/api/types/index.ts index bd8e7f02..f6c0d48b 100644 --- a/src/api/types/index.ts +++ b/src/api/types/index.ts @@ -1,10 +1,38 @@ +export * from "./AgentCallResponseToolChoice"; +export * from "./AgentCallResponse"; +export * from "./AgentCallStreamResponsePayload"; +export * from "./AgentCallStreamResponse"; +export * from "./AgentContinueResponseToolChoice"; +export * from "./AgentContinueResponse"; +export * from "./AgentContinueStreamResponsePayload"; +export * from "./AgentContinueStreamResponse"; +export * from "./AgentInlineTool"; +export * from "./AgentKernelRequestTemplate"; +export * from "./AgentKernelRequestStop"; +export * from "./AgentKernelRequestReasoningEffort"; +export * from "./AgentKernelRequestToolsItem"; +export * from "./AgentKernelRequest"; +export * from "./AgentLinkedFileRequest"; +export * from "./AgentLinkedFileResponseFile"; +export * from "./AgentLinkedFileResponse"; +export * from "./AgentLogResponseToolChoice"; +export * from "./AgentLogResponse"; +export * from "./AgentLogStreamResponse"; +export * from "./AgentResponseTemplate"; +export * from "./AgentResponseStop"; +export * from "./AgentResponseReasoningEffort"; +export * from "./AgentResponseToolsItem"; +export * from "./AgentResponse"; +export * from "./AnthropicRedactedThinkingContent"; +export * from "./AnthropicThinkingContent"; export * from "./BooleanEvaluatorStatsResponse"; export * from "./ChatMessageContentItem"; export * from "./ChatMessageContent"; +export * from "./ChatMessageThinkingItem"; export * from "./ChatMessage"; export * from "./ChatRole"; export * from "./CodeEvaluatorRequest"; -export * from "./CommitRequest"; +export * from "./CreateAgentLogResponse"; export * from "./CreateDatapointRequestTargetValue"; export * from "./CreateDatapointRequest"; export * from "./CreateEvaluatorLogResponse"; @@ -44,9 +72,11 @@ export * from "./EvaluatorResponseSpec"; export * from "./EvaluatorResponse"; export * from "./EvaluatorReturnTypeEnum"; export * from "./EvaluatorVersionId"; +export * from "./EventType"; export * from "./ExternalEvaluatorRequest"; export * from "./FileEnvironmentResponseFile"; export * from "./FileEnvironmentResponse"; +export * from "./FileEnvironmentVariableRequest"; export * from "./FileId"; export * from "./FilePath"; export * from "./FileRequest"; @@ -64,7 +94,9 @@ export * from "./ImageUrlDetail"; export * from "./ImageUrl"; export * from "./InputResponse"; export * from "./LlmEvaluatorRequest"; +export * from "./LinkedFileRequest"; export * from "./LinkedToolResponse"; +export * from "./ListAgents"; export * from "./ListDatasets"; export * from "./ListEvaluators"; export * from "./ListFlows"; @@ -72,6 +104,7 @@ export * from "./ListPrompts"; export * from "./ListTools"; export * from "./LogResponse"; export * from "./LogStatus"; +export * from "./LogStreamResponse"; export * from "./ModelEndpoints"; export * from "./ModelProviders"; export * from "./MonitoringEvaluatorEnvironmentRequest"; @@ -80,7 +113,9 @@ export * from "./MonitoringEvaluatorState"; export * from "./MonitoringEvaluatorVersionRequest"; export * from "./NumericEvaluatorStatsResponse"; export * from "./ObservabilityStatus"; +export * from "./OpenAiReasoningEffort"; export * from "./OverallStats"; +export * from "./PaginatedDataAgentResponse"; export * from "./PaginatedDatapointResponse"; export * from "./PaginatedDatasetResponse"; export * from "./PaginatedDataEvaluationLogResponse"; @@ -90,11 +125,12 @@ export * from "./PaginatedDataFlowResponse"; export * from "./PaginatedDataLogResponse"; export * from "./PaginatedDataPromptResponse"; export * from "./PaginatedDataToolResponse"; -export * from "./PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseRecordsItem"; -export * from "./PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponse"; +export * from "./PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseAgentResponseRecordsItem"; +export * from "./PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseAgentResponse"; export * from "./PlatformAccessEnum"; export * from "./PopulateTemplateResponseTemplate"; export * from "./PopulateTemplateResponseStop"; +export * from "./PopulateTemplateResponseReasoningEffort"; export * from "./PopulateTemplateResponsePopulatedTemplate"; export * from "./PopulateTemplateResponse"; export * from "./ProjectSortBy"; @@ -104,14 +140,15 @@ export * from "./PromptCallResponse"; export * from "./PromptCallStreamResponse"; export * from "./PromptKernelRequestTemplate"; export * from "./PromptKernelRequestStop"; +export * from "./PromptKernelRequestReasoningEffort"; export * from "./PromptKernelRequest"; export * from "./PromptLogResponseToolChoice"; export * from "./PromptLogResponse"; export * from "./PromptResponseTemplate"; export * from "./PromptResponseStop"; +export * from "./PromptResponseReasoningEffort"; export * from "./PromptResponse"; export * from "./ProviderApiKeys"; -export * from "./ReasoningEffort"; export * from "./ResponseFormatType"; export * from "./ResponseFormat"; export * from "./RunStatsResponseEvaluatorStatsItem"; @@ -119,17 +156,20 @@ export * from "./RunStatsResponse"; export * from "./RunVersionResponse"; export * from "./SelectEvaluatorStatsResponse"; export * from "./SortOrder"; +export * from "./StopAgentEnum"; export * from "./TemplateLanguage"; export * from "./TextChatContent"; export * from "./TextEvaluatorStatsResponse"; export * from "./TimeUnit"; export * from "./ToolCall"; +export * from "./ToolCallResponse"; export * from "./ToolChoice"; export * from "./ToolFunction"; export * from "./ToolKernelRequest"; export * from "./ToolLogResponse"; export * from "./ToolResponse"; export * from "./UpdateDatesetAction"; +export * from "./UpdateVersionRequest"; export * from "./UserResponse"; export * from "./Valence"; export * from "./ValidationErrorLocItem"; diff --git a/src/serialization/resources/agents/client/index.ts b/src/serialization/resources/agents/client/index.ts new file mode 100644 index 00000000..0ab8d679 --- /dev/null +++ b/src/serialization/resources/agents/client/index.ts @@ -0,0 +1,2 @@ +export * as listEnvironments from "./listEnvironments"; +export * from "./requests"; diff --git a/src/serialization/resources/agents/client/listEnvironments.ts b/src/serialization/resources/agents/client/listEnvironments.ts new file mode 100644 index 00000000..2f0b7f77 --- /dev/null +++ b/src/serialization/resources/agents/client/listEnvironments.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as Humanloop from "../../../../api/index"; +import * as core from "../../../../core"; +import { FileEnvironmentResponse } from "../../../types/FileEnvironmentResponse"; + +export const Response: core.serialization.Schema< + serializers.agents.listEnvironments.Response.Raw, + Humanloop.FileEnvironmentResponse[] +> = core.serialization.list(FileEnvironmentResponse); + +export declare namespace Response { + export type Raw = FileEnvironmentResponse.Raw[]; +} diff --git a/src/serialization/resources/agents/client/requests/AgentLogRequest.ts b/src/serialization/resources/agents/client/requests/AgentLogRequest.ts new file mode 100644 index 00000000..84babd7f --- /dev/null +++ b/src/serialization/resources/agents/client/requests/AgentLogRequest.ts @@ -0,0 +1,92 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../index"; +import * as Humanloop from "../../../../../api/index"; +import * as core from "../../../../../core"; +import { ChatMessage } from "../../../../types/ChatMessage"; +import { AgentLogRequestToolChoice } from "../../types/AgentLogRequestToolChoice"; +import { AgentKernelRequest } from "../../../../types/AgentKernelRequest"; +import { LogStatus } from "../../../../types/LogStatus"; + +export const AgentLogRequest: core.serialization.Schema< + serializers.AgentLogRequest.Raw, + Omit +> = core.serialization.object({ + runId: core.serialization.property("run_id", core.serialization.string().optional()), + path: core.serialization.string().optional(), + id: core.serialization.string().optional(), + outputMessage: core.serialization.property("output_message", ChatMessage.optional()), + promptTokens: core.serialization.property("prompt_tokens", core.serialization.number().optional()), + reasoningTokens: core.serialization.property("reasoning_tokens", core.serialization.number().optional()), + outputTokens: core.serialization.property("output_tokens", core.serialization.number().optional()), + promptCost: core.serialization.property("prompt_cost", core.serialization.number().optional()), + outputCost: core.serialization.property("output_cost", core.serialization.number().optional()), + finishReason: core.serialization.property("finish_reason", core.serialization.string().optional()), + messages: core.serialization.list(ChatMessage).optional(), + toolChoice: core.serialization.property("tool_choice", AgentLogRequestToolChoice.optional()), + agent: AgentKernelRequest.optional(), + startTime: core.serialization.property("start_time", core.serialization.date().optional()), + endTime: core.serialization.property("end_time", core.serialization.date().optional()), + output: core.serialization.string().optional(), + createdAt: core.serialization.property("created_at", core.serialization.date().optional()), + error: core.serialization.string().optional(), + providerLatency: core.serialization.property("provider_latency", core.serialization.number().optional()), + stdout: core.serialization.string().optional(), + providerRequest: core.serialization.property( + "provider_request", + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + ), + providerResponse: core.serialization.property( + "provider_response", + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + ), + inputs: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + source: core.serialization.string().optional(), + metadata: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + logStatus: core.serialization.property("log_status", LogStatus.optional()), + sourceDatapointId: core.serialization.property("source_datapoint_id", core.serialization.string().optional()), + traceParentId: core.serialization.property("trace_parent_id", core.serialization.string().optional()), + user: core.serialization.string().optional(), + agentLogRequestEnvironment: core.serialization.property("environment", core.serialization.string().optional()), + save: core.serialization.boolean().optional(), + logId: core.serialization.property("log_id", core.serialization.string().optional()), +}); + +export declare namespace AgentLogRequest { + export interface Raw { + run_id?: string | null; + path?: string | null; + id?: string | null; + output_message?: ChatMessage.Raw | null; + prompt_tokens?: number | null; + reasoning_tokens?: number | null; + output_tokens?: number | null; + prompt_cost?: number | null; + output_cost?: number | null; + finish_reason?: string | null; + messages?: ChatMessage.Raw[] | null; + tool_choice?: AgentLogRequestToolChoice.Raw | null; + agent?: AgentKernelRequest.Raw | null; + start_time?: string | null; + end_time?: string | null; + output?: string | null; + created_at?: string | null; + error?: string | null; + provider_latency?: number | null; + stdout?: string | null; + provider_request?: Record | null; + provider_response?: Record | null; + inputs?: Record | null; + source?: string | null; + metadata?: Record | null; + log_status?: LogStatus.Raw | null; + source_datapoint_id?: string | null; + trace_parent_id?: string | null; + user?: string | null; + environment?: string | null; + save?: boolean | null; + log_id?: string | null; + } +} diff --git a/src/serialization/resources/agents/client/requests/AgentRequest.ts b/src/serialization/resources/agents/client/requests/AgentRequest.ts new file mode 100644 index 00000000..a37e6710 --- /dev/null +++ b/src/serialization/resources/agents/client/requests/AgentRequest.ts @@ -0,0 +1,74 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../index"; +import * as Humanloop from "../../../../../api/index"; +import * as core from "../../../../../core"; +import { ModelEndpoints } from "../../../../types/ModelEndpoints"; +import { AgentRequestTemplate } from "../../types/AgentRequestTemplate"; +import { TemplateLanguage } from "../../../../types/TemplateLanguage"; +import { ModelProviders } from "../../../../types/ModelProviders"; +import { AgentRequestStop } from "../../types/AgentRequestStop"; +import { ResponseFormat } from "../../../../types/ResponseFormat"; +import { AgentRequestReasoningEffort } from "../../types/AgentRequestReasoningEffort"; +import { AgentRequestToolsItem } from "../../types/AgentRequestToolsItem"; + +export const AgentRequest: core.serialization.Schema = + core.serialization.object({ + path: core.serialization.string().optional(), + id: core.serialization.string().optional(), + model: core.serialization.string(), + endpoint: ModelEndpoints.optional(), + template: AgentRequestTemplate.optional(), + templateLanguage: core.serialization.property("template_language", TemplateLanguage.optional()), + provider: ModelProviders.optional(), + maxTokens: core.serialization.property("max_tokens", core.serialization.number().optional()), + temperature: core.serialization.number().optional(), + topP: core.serialization.property("top_p", core.serialization.number().optional()), + stop: AgentRequestStop.optional(), + presencePenalty: core.serialization.property("presence_penalty", core.serialization.number().optional()), + frequencyPenalty: core.serialization.property("frequency_penalty", core.serialization.number().optional()), + other: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + seed: core.serialization.number().optional(), + responseFormat: core.serialization.property("response_format", ResponseFormat.optional()), + reasoningEffort: core.serialization.property("reasoning_effort", AgentRequestReasoningEffort.optional()), + tools: core.serialization.list(AgentRequestToolsItem).optional(), + attributes: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + maxIterations: core.serialization.property("max_iterations", core.serialization.number().optional()), + versionName: core.serialization.property("version_name", core.serialization.string().optional()), + versionDescription: core.serialization.property("version_description", core.serialization.string().optional()), + description: core.serialization.string().optional(), + tags: core.serialization.list(core.serialization.string()).optional(), + readme: core.serialization.string().optional(), + }); + +export declare namespace AgentRequest { + export interface Raw { + path?: string | null; + id?: string | null; + model: string; + endpoint?: ModelEndpoints.Raw | null; + template?: AgentRequestTemplate.Raw | null; + template_language?: TemplateLanguage.Raw | null; + provider?: ModelProviders.Raw | null; + max_tokens?: number | null; + temperature?: number | null; + top_p?: number | null; + stop?: AgentRequestStop.Raw | null; + presence_penalty?: number | null; + frequency_penalty?: number | null; + other?: Record | null; + seed?: number | null; + response_format?: ResponseFormat.Raw | null; + reasoning_effort?: AgentRequestReasoningEffort.Raw | null; + tools?: AgentRequestToolsItem.Raw[] | null; + attributes?: Record | null; + max_iterations?: number | null; + version_name?: string | null; + version_description?: string | null; + description?: string | null; + tags?: string[] | null; + readme?: string | null; + } +} diff --git a/src/serialization/resources/agents/client/requests/AgentsCallRequest.ts b/src/serialization/resources/agents/client/requests/AgentsCallRequest.ts new file mode 100644 index 00000000..fe28a66a --- /dev/null +++ b/src/serialization/resources/agents/client/requests/AgentsCallRequest.ts @@ -0,0 +1,61 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../index"; +import * as Humanloop from "../../../../../api/index"; +import * as core from "../../../../../core"; +import { ChatMessage } from "../../../../types/ChatMessage"; +import { AgentsCallRequestToolChoice } from "../../types/AgentsCallRequestToolChoice"; +import { AgentKernelRequest } from "../../../../types/AgentKernelRequest"; +import { LogStatus } from "../../../../types/LogStatus"; +import { ProviderApiKeys } from "../../../../types/ProviderApiKeys"; + +export const AgentsCallRequest: core.serialization.Schema< + serializers.AgentsCallRequest.Raw, + Omit +> = core.serialization.object({ + path: core.serialization.string().optional(), + id: core.serialization.string().optional(), + messages: core.serialization.list(ChatMessage).optional(), + toolChoice: core.serialization.property("tool_choice", AgentsCallRequestToolChoice.optional()), + agent: AgentKernelRequest.optional(), + inputs: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + source: core.serialization.string().optional(), + metadata: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + startTime: core.serialization.property("start_time", core.serialization.date().optional()), + endTime: core.serialization.property("end_time", core.serialization.date().optional()), + logStatus: core.serialization.property("log_status", LogStatus.optional()), + sourceDatapointId: core.serialization.property("source_datapoint_id", core.serialization.string().optional()), + traceParentId: core.serialization.property("trace_parent_id", core.serialization.string().optional()), + user: core.serialization.string().optional(), + agentsCallRequestEnvironment: core.serialization.property("environment", core.serialization.string().optional()), + save: core.serialization.boolean().optional(), + logId: core.serialization.property("log_id", core.serialization.string().optional()), + providerApiKeys: core.serialization.property("provider_api_keys", ProviderApiKeys.optional()), + returnInputs: core.serialization.property("return_inputs", core.serialization.boolean().optional()), +}); + +export declare namespace AgentsCallRequest { + export interface Raw { + path?: string | null; + id?: string | null; + messages?: ChatMessage.Raw[] | null; + tool_choice?: AgentsCallRequestToolChoice.Raw | null; + agent?: AgentKernelRequest.Raw | null; + inputs?: Record | null; + source?: string | null; + metadata?: Record | null; + start_time?: string | null; + end_time?: string | null; + log_status?: LogStatus.Raw | null; + source_datapoint_id?: string | null; + trace_parent_id?: string | null; + user?: string | null; + environment?: string | null; + save?: boolean | null; + log_id?: string | null; + provider_api_keys?: ProviderApiKeys.Raw | null; + return_inputs?: boolean | null; + } +} diff --git a/src/serialization/resources/agents/client/requests/AgentsCallStreamRequest.ts b/src/serialization/resources/agents/client/requests/AgentsCallStreamRequest.ts new file mode 100644 index 00000000..0f319dd9 --- /dev/null +++ b/src/serialization/resources/agents/client/requests/AgentsCallStreamRequest.ts @@ -0,0 +1,64 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../index"; +import * as Humanloop from "../../../../../api/index"; +import * as core from "../../../../../core"; +import { ChatMessage } from "../../../../types/ChatMessage"; +import { AgentsCallStreamRequestToolChoice } from "../../types/AgentsCallStreamRequestToolChoice"; +import { AgentKernelRequest } from "../../../../types/AgentKernelRequest"; +import { LogStatus } from "../../../../types/LogStatus"; +import { ProviderApiKeys } from "../../../../types/ProviderApiKeys"; + +export const AgentsCallStreamRequest: core.serialization.Schema< + serializers.AgentsCallStreamRequest.Raw, + Omit +> = core.serialization.object({ + path: core.serialization.string().optional(), + id: core.serialization.string().optional(), + messages: core.serialization.list(ChatMessage).optional(), + toolChoice: core.serialization.property("tool_choice", AgentsCallStreamRequestToolChoice.optional()), + agent: AgentKernelRequest.optional(), + inputs: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + source: core.serialization.string().optional(), + metadata: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + startTime: core.serialization.property("start_time", core.serialization.date().optional()), + endTime: core.serialization.property("end_time", core.serialization.date().optional()), + logStatus: core.serialization.property("log_status", LogStatus.optional()), + sourceDatapointId: core.serialization.property("source_datapoint_id", core.serialization.string().optional()), + traceParentId: core.serialization.property("trace_parent_id", core.serialization.string().optional()), + user: core.serialization.string().optional(), + agentsCallStreamRequestEnvironment: core.serialization.property( + "environment", + core.serialization.string().optional(), + ), + save: core.serialization.boolean().optional(), + logId: core.serialization.property("log_id", core.serialization.string().optional()), + providerApiKeys: core.serialization.property("provider_api_keys", ProviderApiKeys.optional()), + returnInputs: core.serialization.property("return_inputs", core.serialization.boolean().optional()), +}); + +export declare namespace AgentsCallStreamRequest { + export interface Raw { + path?: string | null; + id?: string | null; + messages?: ChatMessage.Raw[] | null; + tool_choice?: AgentsCallStreamRequestToolChoice.Raw | null; + agent?: AgentKernelRequest.Raw | null; + inputs?: Record | null; + source?: string | null; + metadata?: Record | null; + start_time?: string | null; + end_time?: string | null; + log_status?: LogStatus.Raw | null; + source_datapoint_id?: string | null; + trace_parent_id?: string | null; + user?: string | null; + environment?: string | null; + save?: boolean | null; + log_id?: string | null; + provider_api_keys?: ProviderApiKeys.Raw | null; + return_inputs?: boolean | null; + } +} diff --git a/src/serialization/resources/agents/client/requests/AgentsContinueRequest.ts b/src/serialization/resources/agents/client/requests/AgentsContinueRequest.ts new file mode 100644 index 00000000..ffa3deb6 --- /dev/null +++ b/src/serialization/resources/agents/client/requests/AgentsContinueRequest.ts @@ -0,0 +1,26 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../index"; +import * as Humanloop from "../../../../../api/index"; +import * as core from "../../../../../core"; +import { ChatMessage } from "../../../../types/ChatMessage"; +import { ProviderApiKeys } from "../../../../types/ProviderApiKeys"; + +export const AgentsContinueRequest: core.serialization.Schema< + serializers.AgentsContinueRequest.Raw, + Humanloop.AgentsContinueRequest +> = core.serialization.object({ + logId: core.serialization.property("log_id", core.serialization.string()), + messages: core.serialization.list(ChatMessage), + providerApiKeys: core.serialization.property("provider_api_keys", ProviderApiKeys.optional()), +}); + +export declare namespace AgentsContinueRequest { + export interface Raw { + log_id: string; + messages: ChatMessage.Raw[]; + provider_api_keys?: ProviderApiKeys.Raw | null; + } +} diff --git a/src/serialization/resources/agents/client/requests/AgentsContinueStreamRequest.ts b/src/serialization/resources/agents/client/requests/AgentsContinueStreamRequest.ts new file mode 100644 index 00000000..71062130 --- /dev/null +++ b/src/serialization/resources/agents/client/requests/AgentsContinueStreamRequest.ts @@ -0,0 +1,26 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../index"; +import * as Humanloop from "../../../../../api/index"; +import * as core from "../../../../../core"; +import { ChatMessage } from "../../../../types/ChatMessage"; +import { ProviderApiKeys } from "../../../../types/ProviderApiKeys"; + +export const AgentsContinueStreamRequest: core.serialization.Schema< + serializers.AgentsContinueStreamRequest.Raw, + Humanloop.AgentsContinueStreamRequest +> = core.serialization.object({ + logId: core.serialization.property("log_id", core.serialization.string()), + messages: core.serialization.list(ChatMessage), + providerApiKeys: core.serialization.property("provider_api_keys", ProviderApiKeys.optional()), +}); + +export declare namespace AgentsContinueStreamRequest { + export interface Raw { + log_id: string; + messages: ChatMessage.Raw[]; + provider_api_keys?: ProviderApiKeys.Raw | null; + } +} diff --git a/src/serialization/resources/agents/client/requests/UpdateAgentLogRequest.ts b/src/serialization/resources/agents/client/requests/UpdateAgentLogRequest.ts new file mode 100644 index 00000000..a6c3864b --- /dev/null +++ b/src/serialization/resources/agents/client/requests/UpdateAgentLogRequest.ts @@ -0,0 +1,32 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../index"; +import * as Humanloop from "../../../../../api/index"; +import * as core from "../../../../../core"; +import { ChatMessage } from "../../../../types/ChatMessage"; +import { LogStatus } from "../../../../types/LogStatus"; + +export const UpdateAgentLogRequest: core.serialization.Schema< + serializers.UpdateAgentLogRequest.Raw, + Humanloop.UpdateAgentLogRequest +> = core.serialization.object({ + messages: core.serialization.list(ChatMessage).optional(), + outputMessage: core.serialization.property("output_message", ChatMessage.optional()), + inputs: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + output: core.serialization.string().optional(), + error: core.serialization.string().optional(), + logStatus: core.serialization.property("log_status", LogStatus.optional()), +}); + +export declare namespace UpdateAgentLogRequest { + export interface Raw { + messages?: ChatMessage.Raw[] | null; + output_message?: ChatMessage.Raw | null; + inputs?: Record | null; + output?: string | null; + error?: string | null; + log_status?: LogStatus.Raw | null; + } +} diff --git a/src/serialization/resources/agents/client/requests/UpdateAgentRequest.ts b/src/serialization/resources/agents/client/requests/UpdateAgentRequest.ts new file mode 100644 index 00000000..5f95529a --- /dev/null +++ b/src/serialization/resources/agents/client/requests/UpdateAgentRequest.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../index"; +import * as Humanloop from "../../../../../api/index"; +import * as core from "../../../../../core"; + +export const UpdateAgentRequest: core.serialization.Schema< + serializers.UpdateAgentRequest.Raw, + Humanloop.UpdateAgentRequest +> = core.serialization.object({ + path: core.serialization.string().optional(), + name: core.serialization.string().optional(), + directoryId: core.serialization.property("directory_id", core.serialization.string().optional()), +}); + +export declare namespace UpdateAgentRequest { + export interface Raw { + path?: string | null; + name?: string | null; + directory_id?: string | null; + } +} diff --git a/src/serialization/resources/agents/client/requests/index.ts b/src/serialization/resources/agents/client/requests/index.ts new file mode 100644 index 00000000..3412103c --- /dev/null +++ b/src/serialization/resources/agents/client/requests/index.ts @@ -0,0 +1,8 @@ +export { AgentLogRequest } from "./AgentLogRequest"; +export { UpdateAgentLogRequest } from "./UpdateAgentLogRequest"; +export { AgentsCallStreamRequest } from "./AgentsCallStreamRequest"; +export { AgentsCallRequest } from "./AgentsCallRequest"; +export { AgentsContinueStreamRequest } from "./AgentsContinueStreamRequest"; +export { AgentsContinueRequest } from "./AgentsContinueRequest"; +export { AgentRequest } from "./AgentRequest"; +export { UpdateAgentRequest } from "./UpdateAgentRequest"; diff --git a/src/serialization/resources/agents/index.ts b/src/serialization/resources/agents/index.ts new file mode 100644 index 00000000..c9240f83 --- /dev/null +++ b/src/serialization/resources/agents/index.ts @@ -0,0 +1,2 @@ +export * from "./types"; +export * from "./client"; diff --git a/src/serialization/resources/agents/types/AgentLogRequestToolChoice.ts b/src/serialization/resources/agents/types/AgentLogRequestToolChoice.ts new file mode 100644 index 00000000..ce6a353a --- /dev/null +++ b/src/serialization/resources/agents/types/AgentLogRequestToolChoice.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as Humanloop from "../../../../api/index"; +import * as core from "../../../../core"; +import { ToolChoice } from "../../../types/ToolChoice"; + +export const AgentLogRequestToolChoice: core.serialization.Schema< + serializers.AgentLogRequestToolChoice.Raw, + Humanloop.AgentLogRequestToolChoice +> = core.serialization.undiscriminatedUnion([ + core.serialization.stringLiteral("none"), + core.serialization.stringLiteral("auto"), + core.serialization.stringLiteral("required"), + ToolChoice, +]); + +export declare namespace AgentLogRequestToolChoice { + export type Raw = "none" | "auto" | "required" | ToolChoice.Raw; +} diff --git a/src/serialization/resources/agents/types/AgentRequestReasoningEffort.ts b/src/serialization/resources/agents/types/AgentRequestReasoningEffort.ts new file mode 100644 index 00000000..835dd02a --- /dev/null +++ b/src/serialization/resources/agents/types/AgentRequestReasoningEffort.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as Humanloop from "../../../../api/index"; +import * as core from "../../../../core"; +import { OpenAiReasoningEffort } from "../../../types/OpenAiReasoningEffort"; + +export const AgentRequestReasoningEffort: core.serialization.Schema< + serializers.AgentRequestReasoningEffort.Raw, + Humanloop.AgentRequestReasoningEffort +> = core.serialization.undiscriminatedUnion([OpenAiReasoningEffort, core.serialization.number()]); + +export declare namespace AgentRequestReasoningEffort { + export type Raw = OpenAiReasoningEffort.Raw | number; +} diff --git a/src/serialization/resources/agents/types/AgentRequestStop.ts b/src/serialization/resources/agents/types/AgentRequestStop.ts new file mode 100644 index 00000000..f04f812e --- /dev/null +++ b/src/serialization/resources/agents/types/AgentRequestStop.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as Humanloop from "../../../../api/index"; +import * as core from "../../../../core"; + +export const AgentRequestStop: core.serialization.Schema = + core.serialization.undiscriminatedUnion([ + core.serialization.string(), + core.serialization.list(core.serialization.string()), + ]); + +export declare namespace AgentRequestStop { + export type Raw = string | string[]; +} diff --git a/src/serialization/resources/agents/types/AgentRequestTemplate.ts b/src/serialization/resources/agents/types/AgentRequestTemplate.ts new file mode 100644 index 00000000..3f98e30c --- /dev/null +++ b/src/serialization/resources/agents/types/AgentRequestTemplate.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as Humanloop from "../../../../api/index"; +import * as core from "../../../../core"; +import { ChatMessage } from "../../../types/ChatMessage"; + +export const AgentRequestTemplate: core.serialization.Schema< + serializers.AgentRequestTemplate.Raw, + Humanloop.AgentRequestTemplate +> = core.serialization.undiscriminatedUnion([core.serialization.string(), core.serialization.list(ChatMessage)]); + +export declare namespace AgentRequestTemplate { + export type Raw = string | ChatMessage.Raw[]; +} diff --git a/src/serialization/resources/agents/types/AgentRequestToolsItem.ts b/src/serialization/resources/agents/types/AgentRequestToolsItem.ts new file mode 100644 index 00000000..12858ab0 --- /dev/null +++ b/src/serialization/resources/agents/types/AgentRequestToolsItem.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as Humanloop from "../../../../api/index"; +import * as core from "../../../../core"; +import { AgentLinkedFileRequest } from "../../../types/AgentLinkedFileRequest"; +import { AgentInlineTool } from "../../../types/AgentInlineTool"; + +export const AgentRequestToolsItem: core.serialization.Schema< + serializers.AgentRequestToolsItem.Raw, + Humanloop.AgentRequestToolsItem +> = core.serialization.undiscriminatedUnion([AgentLinkedFileRequest, AgentInlineTool]); + +export declare namespace AgentRequestToolsItem { + export type Raw = AgentLinkedFileRequest.Raw | AgentInlineTool.Raw; +} diff --git a/src/serialization/resources/agents/types/AgentsCallRequestToolChoice.ts b/src/serialization/resources/agents/types/AgentsCallRequestToolChoice.ts new file mode 100644 index 00000000..e52eb45d --- /dev/null +++ b/src/serialization/resources/agents/types/AgentsCallRequestToolChoice.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as Humanloop from "../../../../api/index"; +import * as core from "../../../../core"; +import { ToolChoice } from "../../../types/ToolChoice"; + +export const AgentsCallRequestToolChoice: core.serialization.Schema< + serializers.AgentsCallRequestToolChoice.Raw, + Humanloop.AgentsCallRequestToolChoice +> = core.serialization.undiscriminatedUnion([ + core.serialization.stringLiteral("none"), + core.serialization.stringLiteral("auto"), + core.serialization.stringLiteral("required"), + ToolChoice, +]); + +export declare namespace AgentsCallRequestToolChoice { + export type Raw = "none" | "auto" | "required" | ToolChoice.Raw; +} diff --git a/src/serialization/resources/agents/types/AgentsCallStreamRequestToolChoice.ts b/src/serialization/resources/agents/types/AgentsCallStreamRequestToolChoice.ts new file mode 100644 index 00000000..2cdcb458 --- /dev/null +++ b/src/serialization/resources/agents/types/AgentsCallStreamRequestToolChoice.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as Humanloop from "../../../../api/index"; +import * as core from "../../../../core"; +import { ToolChoice } from "../../../types/ToolChoice"; + +export const AgentsCallStreamRequestToolChoice: core.serialization.Schema< + serializers.AgentsCallStreamRequestToolChoice.Raw, + Humanloop.AgentsCallStreamRequestToolChoice +> = core.serialization.undiscriminatedUnion([ + core.serialization.stringLiteral("none"), + core.serialization.stringLiteral("auto"), + core.serialization.stringLiteral("required"), + ToolChoice, +]); + +export declare namespace AgentsCallStreamRequestToolChoice { + export type Raw = "none" | "auto" | "required" | ToolChoice.Raw; +} diff --git a/src/serialization/resources/agents/types/index.ts b/src/serialization/resources/agents/types/index.ts new file mode 100644 index 00000000..8a8a004f --- /dev/null +++ b/src/serialization/resources/agents/types/index.ts @@ -0,0 +1,7 @@ +export * from "./AgentLogRequestToolChoice"; +export * from "./AgentsCallStreamRequestToolChoice"; +export * from "./AgentsCallRequestToolChoice"; +export * from "./AgentRequestTemplate"; +export * from "./AgentRequestStop"; +export * from "./AgentRequestReasoningEffort"; +export * from "./AgentRequestToolsItem"; diff --git a/src/serialization/resources/datasets/client/requests/DatasetRequest.ts b/src/serialization/resources/datasets/client/requests/DatasetRequest.ts index 1d9e0ff8..d8d4ad01 100644 --- a/src/serialization/resources/datasets/client/requests/DatasetRequest.ts +++ b/src/serialization/resources/datasets/client/requests/DatasetRequest.ts @@ -17,7 +17,8 @@ export const DatasetRequest: core.serialization.Schema< datapoints: core.serialization.list(CreateDatapointRequest), action: UpdateDatesetAction.optional(), attributes: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), - commitMessage: core.serialization.property("commit_message", core.serialization.string().optional()), + versionName: core.serialization.property("version_name", core.serialization.string().optional()), + versionDescription: core.serialization.property("version_description", core.serialization.string().optional()), }); export declare namespace DatasetRequest { @@ -27,6 +28,7 @@ export declare namespace DatasetRequest { datapoints: CreateDatapointRequest.Raw[]; action?: UpdateDatesetAction.Raw | null; attributes?: Record | null; - commit_message?: string | null; + version_name?: string | null; + version_description?: string | null; } } diff --git a/src/serialization/resources/datasets/index.ts b/src/serialization/resources/datasets/index.ts index 5ec76921..c9240f83 100644 --- a/src/serialization/resources/datasets/index.ts +++ b/src/serialization/resources/datasets/index.ts @@ -1 +1,2 @@ +export * from "./types"; export * from "./client"; diff --git a/src/serialization/resources/datasets/types/ListVersionsDatasetsIdVersionsGetRequestIncludeDatapoints.ts b/src/serialization/resources/datasets/types/ListVersionsDatasetsIdVersionsGetRequestIncludeDatapoints.ts new file mode 100644 index 00000000..0627ed0f --- /dev/null +++ b/src/serialization/resources/datasets/types/ListVersionsDatasetsIdVersionsGetRequestIncludeDatapoints.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as Humanloop from "../../../../api/index"; +import * as core from "../../../../core"; + +export const ListVersionsDatasetsIdVersionsGetRequestIncludeDatapoints: core.serialization.Schema< + serializers.ListVersionsDatasetsIdVersionsGetRequestIncludeDatapoints.Raw, + Humanloop.ListVersionsDatasetsIdVersionsGetRequestIncludeDatapoints +> = core.serialization.enum_(["latest_committed", "latest_saved"]); + +export declare namespace ListVersionsDatasetsIdVersionsGetRequestIncludeDatapoints { + export type Raw = "latest_committed" | "latest_saved"; +} diff --git a/src/serialization/resources/datasets/types/index.ts b/src/serialization/resources/datasets/types/index.ts new file mode 100644 index 00000000..0fb85205 --- /dev/null +++ b/src/serialization/resources/datasets/types/index.ts @@ -0,0 +1 @@ +export * from "./ListVersionsDatasetsIdVersionsGetRequestIncludeDatapoints"; diff --git a/src/serialization/resources/evaluators/client/requests/EvaluatorRequest.ts b/src/serialization/resources/evaluators/client/requests/EvaluatorRequest.ts index 85aacad5..b59ecee7 100644 --- a/src/serialization/resources/evaluators/client/requests/EvaluatorRequest.ts +++ b/src/serialization/resources/evaluators/client/requests/EvaluatorRequest.ts @@ -11,7 +11,8 @@ export const EvaluatorRequest: core.serialization.Schema serializers.EvaluatorResponse), core.serialization.lazyObject(() => serializers.FlowResponse), + core.serialization.lazyObject(() => serializers.AgentResponse), ]); export declare namespace RetrieveByPathFilesRetrieveByPathPostResponse { @@ -24,5 +25,6 @@ export declare namespace RetrieveByPathFilesRetrieveByPathPostResponse { | serializers.ToolResponse.Raw | DatasetResponse.Raw | serializers.EvaluatorResponse.Raw - | serializers.FlowResponse.Raw; + | serializers.FlowResponse.Raw + | serializers.AgentResponse.Raw; } diff --git a/src/serialization/resources/flows/client/requests/FlowRequest.ts b/src/serialization/resources/flows/client/requests/FlowRequest.ts index 59fdb426..257c0de0 100644 --- a/src/serialization/resources/flows/client/requests/FlowRequest.ts +++ b/src/serialization/resources/flows/client/requests/FlowRequest.ts @@ -11,7 +11,8 @@ export const FlowRequest: core.serialization.Schema; - commit_message?: string | null; + version_name?: string | null; + version_description?: string | null; } } diff --git a/src/serialization/resources/index.ts b/src/serialization/resources/index.ts index 2a899983..f8e23c1c 100644 --- a/src/serialization/resources/index.ts +++ b/src/serialization/resources/index.ts @@ -1,13 +1,16 @@ export * as prompts from "./prompts"; export * from "./prompts/types"; +export * as datasets from "./datasets"; +export * from "./datasets/types"; export * as evaluators from "./evaluators"; export * from "./evaluators/types"; +export * as agents from "./agents"; +export * from "./agents/types"; export * as files from "./files"; export * from "./files/types"; export * as evaluations from "./evaluations"; export * from "./evaluations/types"; export * as tools from "./tools"; -export * as datasets from "./datasets"; export * as flows from "./flows"; export * as directories from "./directories"; export * from "./prompts/client/requests"; @@ -15,6 +18,7 @@ export * from "./tools/client/requests"; export * from "./datasets/client/requests"; export * from "./evaluators/client/requests"; export * from "./flows/client/requests"; +export * from "./agents/client/requests"; export * from "./directories/client/requests"; export * from "./files/client/requests"; export * from "./evaluations/client/requests"; diff --git a/src/serialization/resources/prompts/client/index.ts b/src/serialization/resources/prompts/client/index.ts index 5ff4cfc4..4dfcee07 100644 --- a/src/serialization/resources/prompts/client/index.ts +++ b/src/serialization/resources/prompts/client/index.ts @@ -1,3 +1,3 @@ -export * as populateTemplate from "./populateTemplate"; +export * as populate from "./populate"; export * as listEnvironments from "./listEnvironments"; export * from "./requests"; diff --git a/src/serialization/resources/prompts/client/populateTemplate.ts b/src/serialization/resources/prompts/client/populate.ts similarity index 88% rename from src/serialization/resources/prompts/client/populateTemplate.ts rename to src/serialization/resources/prompts/client/populate.ts index 9254390d..9e66e223 100644 --- a/src/serialization/resources/prompts/client/populateTemplate.ts +++ b/src/serialization/resources/prompts/client/populate.ts @@ -6,7 +6,7 @@ import * as serializers from "../../../index"; import * as core from "../../../../core"; export const Request: core.serialization.Schema< - serializers.prompts.populateTemplate.Request.Raw, + serializers.prompts.populate.Request.Raw, Record > = core.serialization.record(core.serialization.string(), core.serialization.unknown()); diff --git a/src/serialization/resources/prompts/client/requests/PromptRequest.ts b/src/serialization/resources/prompts/client/requests/PromptRequest.ts index 7410aa8b..261bfc95 100644 --- a/src/serialization/resources/prompts/client/requests/PromptRequest.ts +++ b/src/serialization/resources/prompts/client/requests/PromptRequest.ts @@ -11,7 +11,7 @@ import { TemplateLanguage } from "../../../../types/TemplateLanguage"; import { ModelProviders } from "../../../../types/ModelProviders"; import { PromptRequestStop } from "../../types/PromptRequestStop"; import { ResponseFormat } from "../../../../types/ResponseFormat"; -import { ReasoningEffort } from "../../../../types/ReasoningEffort"; +import { PromptRequestReasoningEffort } from "../../types/PromptRequestReasoningEffort"; import { ToolFunction } from "../../../../types/ToolFunction"; export const PromptRequest: core.serialization.Schema = @@ -32,14 +32,15 @@ export const PromptRequest: core.serialization.Schema | null; seed?: number | null; response_format?: ResponseFormat.Raw | null; - reasoning_effort?: ReasoningEffort.Raw | null; + reasoning_effort?: PromptRequestReasoningEffort.Raw | null; tools?: ToolFunction.Raw[] | null; linked_tools?: string[] | null; attributes?: Record | null; - commit_message?: string | null; + version_name?: string | null; + version_description?: string | null; description?: string | null; tags?: string[] | null; readme?: string | null; diff --git a/src/serialization/resources/prompts/types/PromptRequestReasoningEffort.ts b/src/serialization/resources/prompts/types/PromptRequestReasoningEffort.ts new file mode 100644 index 00000000..644aea27 --- /dev/null +++ b/src/serialization/resources/prompts/types/PromptRequestReasoningEffort.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as Humanloop from "../../../../api/index"; +import * as core from "../../../../core"; +import { OpenAiReasoningEffort } from "../../../types/OpenAiReasoningEffort"; + +export const PromptRequestReasoningEffort: core.serialization.Schema< + serializers.PromptRequestReasoningEffort.Raw, + Humanloop.PromptRequestReasoningEffort +> = core.serialization.undiscriminatedUnion([OpenAiReasoningEffort, core.serialization.number()]); + +export declare namespace PromptRequestReasoningEffort { + export type Raw = OpenAiReasoningEffort.Raw | number; +} diff --git a/src/serialization/resources/prompts/types/index.ts b/src/serialization/resources/prompts/types/index.ts index a5d3901d..8265b2f3 100644 --- a/src/serialization/resources/prompts/types/index.ts +++ b/src/serialization/resources/prompts/types/index.ts @@ -4,3 +4,4 @@ export * from "./PromptsCallStreamRequestToolChoice"; export * from "./PromptsCallRequestToolChoice"; export * from "./PromptRequestTemplate"; export * from "./PromptRequestStop"; +export * from "./PromptRequestReasoningEffort"; diff --git a/src/serialization/resources/tools/client/addEnvironmentVariable.ts b/src/serialization/resources/tools/client/addEnvironmentVariable.ts new file mode 100644 index 00000000..cb9bccae --- /dev/null +++ b/src/serialization/resources/tools/client/addEnvironmentVariable.ts @@ -0,0 +1,26 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as Humanloop from "../../../../api/index"; +import * as core from "../../../../core"; +import { FileEnvironmentVariableRequest } from "../../../types/FileEnvironmentVariableRequest"; + +export const Request: core.serialization.Schema< + serializers.tools.addEnvironmentVariable.Request.Raw, + Humanloop.FileEnvironmentVariableRequest[] +> = core.serialization.list(FileEnvironmentVariableRequest); + +export declare namespace Request { + export type Raw = FileEnvironmentVariableRequest.Raw[]; +} + +export const Response: core.serialization.Schema< + serializers.tools.addEnvironmentVariable.Response.Raw, + Humanloop.FileEnvironmentVariableRequest[] +> = core.serialization.list(FileEnvironmentVariableRequest); + +export declare namespace Response { + export type Raw = FileEnvironmentVariableRequest.Raw[]; +} diff --git a/src/serialization/resources/tools/client/deleteEnvironmentVariable.ts b/src/serialization/resources/tools/client/deleteEnvironmentVariable.ts new file mode 100644 index 00000000..24c69457 --- /dev/null +++ b/src/serialization/resources/tools/client/deleteEnvironmentVariable.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as Humanloop from "../../../../api/index"; +import * as core from "../../../../core"; +import { FileEnvironmentVariableRequest } from "../../../types/FileEnvironmentVariableRequest"; + +export const Response: core.serialization.Schema< + serializers.tools.deleteEnvironmentVariable.Response.Raw, + Humanloop.FileEnvironmentVariableRequest[] +> = core.serialization.list(FileEnvironmentVariableRequest); + +export declare namespace Response { + export type Raw = FileEnvironmentVariableRequest.Raw[]; +} diff --git a/src/serialization/resources/tools/client/getEnvironmentVariables.ts b/src/serialization/resources/tools/client/getEnvironmentVariables.ts new file mode 100644 index 00000000..c2f96cee --- /dev/null +++ b/src/serialization/resources/tools/client/getEnvironmentVariables.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../index"; +import * as Humanloop from "../../../../api/index"; +import * as core from "../../../../core"; +import { FileEnvironmentVariableRequest } from "../../../types/FileEnvironmentVariableRequest"; + +export const Response: core.serialization.Schema< + serializers.tools.getEnvironmentVariables.Response.Raw, + Humanloop.FileEnvironmentVariableRequest[] +> = core.serialization.list(FileEnvironmentVariableRequest); + +export declare namespace Response { + export type Raw = FileEnvironmentVariableRequest.Raw[]; +} diff --git a/src/serialization/resources/tools/client/index.ts b/src/serialization/resources/tools/client/index.ts index 0ab8d679..ca75a2d8 100644 --- a/src/serialization/resources/tools/client/index.ts +++ b/src/serialization/resources/tools/client/index.ts @@ -1,2 +1,5 @@ export * as listEnvironments from "./listEnvironments"; +export * as getEnvironmentVariables from "./getEnvironmentVariables"; +export * as addEnvironmentVariable from "./addEnvironmentVariable"; +export * as deleteEnvironmentVariable from "./deleteEnvironmentVariable"; export * from "./requests"; diff --git a/src/serialization/resources/tools/client/requests/ToolCallRequest.ts b/src/serialization/resources/tools/client/requests/ToolCallRequest.ts new file mode 100644 index 00000000..1c19f6ae --- /dev/null +++ b/src/serialization/resources/tools/client/requests/ToolCallRequest.ts @@ -0,0 +1,50 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../index"; +import * as Humanloop from "../../../../../api/index"; +import * as core from "../../../../../core"; +import { ToolKernelRequest } from "../../../../types/ToolKernelRequest"; +import { LogStatus } from "../../../../types/LogStatus"; + +export const ToolCallRequest: core.serialization.Schema< + serializers.ToolCallRequest.Raw, + Omit +> = core.serialization.object({ + path: core.serialization.string().optional(), + id: core.serialization.string().optional(), + tool: ToolKernelRequest.optional(), + inputs: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + source: core.serialization.string().optional(), + metadata: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + startTime: core.serialization.property("start_time", core.serialization.date().optional()), + endTime: core.serialization.property("end_time", core.serialization.date().optional()), + logStatus: core.serialization.property("log_status", LogStatus.optional()), + sourceDatapointId: core.serialization.property("source_datapoint_id", core.serialization.string().optional()), + traceParentId: core.serialization.property("trace_parent_id", core.serialization.string().optional()), + user: core.serialization.string().optional(), + toolCallRequestEnvironment: core.serialization.property("environment", core.serialization.string().optional()), + save: core.serialization.boolean().optional(), + logId: core.serialization.property("log_id", core.serialization.string().optional()), +}); + +export declare namespace ToolCallRequest { + export interface Raw { + path?: string | null; + id?: string | null; + tool?: ToolKernelRequest.Raw | null; + inputs?: Record | null; + source?: string | null; + metadata?: Record | null; + start_time?: string | null; + end_time?: string | null; + log_status?: LogStatus.Raw | null; + source_datapoint_id?: string | null; + trace_parent_id?: string | null; + user?: string | null; + environment?: string | null; + save?: boolean | null; + log_id?: string | null; + } +} diff --git a/src/serialization/resources/tools/client/requests/ToolLogRequest.ts b/src/serialization/resources/tools/client/requests/ToolLogRequest.ts index 688ec79d..65f07074 100644 --- a/src/serialization/resources/tools/client/requests/ToolLogRequest.ts +++ b/src/serialization/resources/tools/client/requests/ToolLogRequest.ts @@ -5,8 +5,8 @@ import * as serializers from "../../../../index"; import * as Humanloop from "../../../../../api/index"; import * as core from "../../../../../core"; -import { LogStatus } from "../../../../types/LogStatus"; import { ToolKernelRequest } from "../../../../types/ToolKernelRequest"; +import { LogStatus } from "../../../../types/LogStatus"; export const ToolLogRequest: core.serialization.Schema< serializers.ToolLogRequest.Raw, @@ -14,6 +14,7 @@ export const ToolLogRequest: core.serialization.Schema< > = core.serialization.object({ path: core.serialization.string().optional(), id: core.serialization.string().optional(), + tool: ToolKernelRequest.optional(), startTime: core.serialization.property("start_time", core.serialization.date().optional()), endTime: core.serialization.property("end_time", core.serialization.date().optional()), output: core.serialization.string().optional(), @@ -39,13 +40,13 @@ export const ToolLogRequest: core.serialization.Schema< toolLogRequestEnvironment: core.serialization.property("environment", core.serialization.string().optional()), save: core.serialization.boolean().optional(), logId: core.serialization.property("log_id", core.serialization.string().optional()), - tool: ToolKernelRequest.optional(), }); export declare namespace ToolLogRequest { export interface Raw { path?: string | null; id?: string | null; + tool?: ToolKernelRequest.Raw | null; start_time?: string | null; end_time?: string | null; output?: string | null; @@ -65,6 +66,5 @@ export declare namespace ToolLogRequest { environment?: string | null; save?: boolean | null; log_id?: string | null; - tool?: ToolKernelRequest.Raw | null; } } diff --git a/src/serialization/resources/tools/client/requests/ToolRequest.ts b/src/serialization/resources/tools/client/requests/ToolRequest.ts index f37087b8..67e177eb 100644 --- a/src/serialization/resources/tools/client/requests/ToolRequest.ts +++ b/src/serialization/resources/tools/client/requests/ToolRequest.ts @@ -20,7 +20,8 @@ export const ToolRequest: core.serialization.Schema | null; attributes?: Record | null; tool_type?: FilesToolType.Raw | null; - commit_message?: string | null; + version_name?: string | null; + version_description?: string | null; } } diff --git a/src/serialization/resources/tools/client/requests/index.ts b/src/serialization/resources/tools/client/requests/index.ts index 3bab2624..542f22e3 100644 --- a/src/serialization/resources/tools/client/requests/index.ts +++ b/src/serialization/resources/tools/client/requests/index.ts @@ -1,3 +1,4 @@ +export { ToolCallRequest } from "./ToolCallRequest"; export { ToolLogRequest } from "./ToolLogRequest"; export { ToolLogUpdateRequest } from "./ToolLogUpdateRequest"; export { ToolRequest } from "./ToolRequest"; diff --git a/src/serialization/types/AgentCallResponse.ts b/src/serialization/types/AgentCallResponse.ts new file mode 100644 index 00000000..ec082488 --- /dev/null +++ b/src/serialization/types/AgentCallResponse.ts @@ -0,0 +1,58 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Humanloop from "../../api/index"; +import * as core from "../../core"; +import { ChatMessage } from "./ChatMessage"; +import { AgentCallResponseToolChoice } from "./AgentCallResponseToolChoice"; +import { LogStatus } from "./LogStatus"; +import { PromptCallLogResponse } from "./PromptCallLogResponse"; + +export const AgentCallResponse: core.serialization.ObjectSchema< + serializers.AgentCallResponse.Raw, + Humanloop.AgentCallResponse +> = core.serialization.object({ + startTime: core.serialization.property("start_time", core.serialization.date().optional()), + endTime: core.serialization.property("end_time", core.serialization.date().optional()), + messages: core.serialization.list(ChatMessage).optional(), + toolChoice: core.serialization.property("tool_choice", AgentCallResponseToolChoice.optional()), + prompt: core.serialization.lazyObject(() => serializers.PromptResponse), + inputs: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + source: core.serialization.string().optional(), + metadata: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + logStatus: core.serialization.property("log_status", LogStatus.optional()), + sourceDatapointId: core.serialization.property("source_datapoint_id", core.serialization.string().optional()), + traceParentId: core.serialization.property("trace_parent_id", core.serialization.string().optional()), + user: core.serialization.string().optional(), + environment: core.serialization.string().optional(), + save: core.serialization.boolean().optional(), + logId: core.serialization.property("log_id", core.serialization.string().optional()), + id: core.serialization.string(), + traceId: core.serialization.property("trace_id", core.serialization.string().optional()), + logs: core.serialization.list(PromptCallLogResponse), +}); + +export declare namespace AgentCallResponse { + export interface Raw { + start_time?: string | null; + end_time?: string | null; + messages?: ChatMessage.Raw[] | null; + tool_choice?: AgentCallResponseToolChoice.Raw | null; + prompt: serializers.PromptResponse.Raw; + inputs?: Record | null; + source?: string | null; + metadata?: Record | null; + log_status?: LogStatus.Raw | null; + source_datapoint_id?: string | null; + trace_parent_id?: string | null; + user?: string | null; + environment?: string | null; + save?: boolean | null; + log_id?: string | null; + id: string; + trace_id?: string | null; + logs: PromptCallLogResponse.Raw[]; + } +} diff --git a/src/serialization/types/AgentCallResponseToolChoice.ts b/src/serialization/types/AgentCallResponseToolChoice.ts new file mode 100644 index 00000000..45d00fcb --- /dev/null +++ b/src/serialization/types/AgentCallResponseToolChoice.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Humanloop from "../../api/index"; +import * as core from "../../core"; +import { ToolChoice } from "./ToolChoice"; + +export const AgentCallResponseToolChoice: core.serialization.Schema< + serializers.AgentCallResponseToolChoice.Raw, + Humanloop.AgentCallResponseToolChoice +> = core.serialization.undiscriminatedUnion([ + core.serialization.stringLiteral("none"), + core.serialization.stringLiteral("auto"), + core.serialization.stringLiteral("required"), + ToolChoice, +]); + +export declare namespace AgentCallResponseToolChoice { + export type Raw = "none" | "auto" | "required" | ToolChoice.Raw; +} diff --git a/src/serialization/types/AgentCallStreamResponse.ts b/src/serialization/types/AgentCallStreamResponse.ts new file mode 100644 index 00000000..c2f786a4 --- /dev/null +++ b/src/serialization/types/AgentCallStreamResponse.ts @@ -0,0 +1,28 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Humanloop from "../../api/index"; +import * as core from "../../core"; +import { AgentCallStreamResponsePayload } from "./AgentCallStreamResponsePayload"; +import { EventType } from "./EventType"; + +export const AgentCallStreamResponse: core.serialization.ObjectSchema< + serializers.AgentCallStreamResponse.Raw, + Humanloop.AgentCallStreamResponse +> = core.serialization.object({ + logId: core.serialization.property("log_id", core.serialization.string()), + message: core.serialization.string(), + payload: AgentCallStreamResponsePayload.optional(), + type: EventType, +}); + +export declare namespace AgentCallStreamResponse { + export interface Raw { + log_id: string; + message: string; + payload?: AgentCallStreamResponsePayload.Raw | null; + type: EventType.Raw; + } +} diff --git a/src/serialization/types/AgentCallStreamResponsePayload.ts b/src/serialization/types/AgentCallStreamResponsePayload.ts new file mode 100644 index 00000000..7ed435ff --- /dev/null +++ b/src/serialization/types/AgentCallStreamResponsePayload.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Humanloop from "../../api/index"; +import * as core from "../../core"; +import { LogStreamResponse } from "./LogStreamResponse"; +import { ToolCall } from "./ToolCall"; + +export const AgentCallStreamResponsePayload: core.serialization.Schema< + serializers.AgentCallStreamResponsePayload.Raw, + Humanloop.AgentCallStreamResponsePayload +> = core.serialization.undiscriminatedUnion([ + LogStreamResponse, + core.serialization.lazy(() => serializers.LogResponse), + ToolCall, +]); + +export declare namespace AgentCallStreamResponsePayload { + export type Raw = LogStreamResponse.Raw | serializers.LogResponse.Raw | ToolCall.Raw; +} diff --git a/src/serialization/types/AgentContinueResponse.ts b/src/serialization/types/AgentContinueResponse.ts new file mode 100644 index 00000000..97708106 --- /dev/null +++ b/src/serialization/types/AgentContinueResponse.ts @@ -0,0 +1,58 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Humanloop from "../../api/index"; +import * as core from "../../core"; +import { ChatMessage } from "./ChatMessage"; +import { AgentContinueResponseToolChoice } from "./AgentContinueResponseToolChoice"; +import { LogStatus } from "./LogStatus"; +import { PromptCallLogResponse } from "./PromptCallLogResponse"; + +export const AgentContinueResponse: core.serialization.ObjectSchema< + serializers.AgentContinueResponse.Raw, + Humanloop.AgentContinueResponse +> = core.serialization.object({ + startTime: core.serialization.property("start_time", core.serialization.date().optional()), + endTime: core.serialization.property("end_time", core.serialization.date().optional()), + messages: core.serialization.list(ChatMessage).optional(), + toolChoice: core.serialization.property("tool_choice", AgentContinueResponseToolChoice.optional()), + prompt: core.serialization.lazyObject(() => serializers.PromptResponse), + inputs: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + source: core.serialization.string().optional(), + metadata: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + logStatus: core.serialization.property("log_status", LogStatus.optional()), + sourceDatapointId: core.serialization.property("source_datapoint_id", core.serialization.string().optional()), + traceParentId: core.serialization.property("trace_parent_id", core.serialization.string().optional()), + user: core.serialization.string().optional(), + environment: core.serialization.string().optional(), + save: core.serialization.boolean().optional(), + logId: core.serialization.property("log_id", core.serialization.string().optional()), + id: core.serialization.string(), + traceId: core.serialization.property("trace_id", core.serialization.string().optional()), + logs: core.serialization.list(PromptCallLogResponse), +}); + +export declare namespace AgentContinueResponse { + export interface Raw { + start_time?: string | null; + end_time?: string | null; + messages?: ChatMessage.Raw[] | null; + tool_choice?: AgentContinueResponseToolChoice.Raw | null; + prompt: serializers.PromptResponse.Raw; + inputs?: Record | null; + source?: string | null; + metadata?: Record | null; + log_status?: LogStatus.Raw | null; + source_datapoint_id?: string | null; + trace_parent_id?: string | null; + user?: string | null; + environment?: string | null; + save?: boolean | null; + log_id?: string | null; + id: string; + trace_id?: string | null; + logs: PromptCallLogResponse.Raw[]; + } +} diff --git a/src/serialization/types/AgentContinueResponseToolChoice.ts b/src/serialization/types/AgentContinueResponseToolChoice.ts new file mode 100644 index 00000000..79eece18 --- /dev/null +++ b/src/serialization/types/AgentContinueResponseToolChoice.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Humanloop from "../../api/index"; +import * as core from "../../core"; +import { ToolChoice } from "./ToolChoice"; + +export const AgentContinueResponseToolChoice: core.serialization.Schema< + serializers.AgentContinueResponseToolChoice.Raw, + Humanloop.AgentContinueResponseToolChoice +> = core.serialization.undiscriminatedUnion([ + core.serialization.stringLiteral("none"), + core.serialization.stringLiteral("auto"), + core.serialization.stringLiteral("required"), + ToolChoice, +]); + +export declare namespace AgentContinueResponseToolChoice { + export type Raw = "none" | "auto" | "required" | ToolChoice.Raw; +} diff --git a/src/serialization/types/AgentContinueStreamResponse.ts b/src/serialization/types/AgentContinueStreamResponse.ts new file mode 100644 index 00000000..d458c474 --- /dev/null +++ b/src/serialization/types/AgentContinueStreamResponse.ts @@ -0,0 +1,28 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Humanloop from "../../api/index"; +import * as core from "../../core"; +import { AgentContinueStreamResponsePayload } from "./AgentContinueStreamResponsePayload"; +import { EventType } from "./EventType"; + +export const AgentContinueStreamResponse: core.serialization.ObjectSchema< + serializers.AgentContinueStreamResponse.Raw, + Humanloop.AgentContinueStreamResponse +> = core.serialization.object({ + logId: core.serialization.property("log_id", core.serialization.string()), + message: core.serialization.string(), + payload: AgentContinueStreamResponsePayload.optional(), + type: EventType, +}); + +export declare namespace AgentContinueStreamResponse { + export interface Raw { + log_id: string; + message: string; + payload?: AgentContinueStreamResponsePayload.Raw | null; + type: EventType.Raw; + } +} diff --git a/src/serialization/types/AgentContinueStreamResponsePayload.ts b/src/serialization/types/AgentContinueStreamResponsePayload.ts new file mode 100644 index 00000000..a43ff575 --- /dev/null +++ b/src/serialization/types/AgentContinueStreamResponsePayload.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Humanloop from "../../api/index"; +import * as core from "../../core"; +import { LogStreamResponse } from "./LogStreamResponse"; +import { ToolCall } from "./ToolCall"; + +export const AgentContinueStreamResponsePayload: core.serialization.Schema< + serializers.AgentContinueStreamResponsePayload.Raw, + Humanloop.AgentContinueStreamResponsePayload +> = core.serialization.undiscriminatedUnion([ + LogStreamResponse, + core.serialization.lazy(() => serializers.LogResponse), + ToolCall, +]); + +export declare namespace AgentContinueStreamResponsePayload { + export type Raw = LogStreamResponse.Raw | serializers.LogResponse.Raw | ToolCall.Raw; +} diff --git a/src/serialization/types/AgentInlineTool.ts b/src/serialization/types/AgentInlineTool.ts new file mode 100644 index 00000000..33ebccfc --- /dev/null +++ b/src/serialization/types/AgentInlineTool.ts @@ -0,0 +1,26 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Humanloop from "../../api/index"; +import * as core from "../../core"; +import { ToolFunction } from "./ToolFunction"; +import { StopAgentEnum } from "./StopAgentEnum"; + +export const AgentInlineTool: core.serialization.ObjectSchema< + serializers.AgentInlineTool.Raw, + Humanloop.AgentInlineTool +> = core.serialization.object({ + type: core.serialization.stringLiteral("inline"), + jsonSchema: core.serialization.property("json_schema", ToolFunction), + stopAgent: core.serialization.property("stop_agent", StopAgentEnum), +}); + +export declare namespace AgentInlineTool { + export interface Raw { + type: "inline"; + json_schema: ToolFunction.Raw; + stop_agent: StopAgentEnum.Raw; + } +} diff --git a/src/serialization/types/AgentKernelRequest.ts b/src/serialization/types/AgentKernelRequest.ts new file mode 100644 index 00000000..f1005570 --- /dev/null +++ b/src/serialization/types/AgentKernelRequest.ts @@ -0,0 +1,62 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Humanloop from "../../api/index"; +import * as core from "../../core"; +import { ModelEndpoints } from "./ModelEndpoints"; +import { AgentKernelRequestTemplate } from "./AgentKernelRequestTemplate"; +import { TemplateLanguage } from "./TemplateLanguage"; +import { ModelProviders } from "./ModelProviders"; +import { AgentKernelRequestStop } from "./AgentKernelRequestStop"; +import { ResponseFormat } from "./ResponseFormat"; +import { AgentKernelRequestReasoningEffort } from "./AgentKernelRequestReasoningEffort"; +import { AgentKernelRequestToolsItem } from "./AgentKernelRequestToolsItem"; + +export const AgentKernelRequest: core.serialization.ObjectSchema< + serializers.AgentKernelRequest.Raw, + Humanloop.AgentKernelRequest +> = core.serialization.object({ + model: core.serialization.string(), + endpoint: ModelEndpoints.optional(), + template: AgentKernelRequestTemplate.optional(), + templateLanguage: core.serialization.property("template_language", TemplateLanguage.optional()), + provider: ModelProviders.optional(), + maxTokens: core.serialization.property("max_tokens", core.serialization.number().optional()), + temperature: core.serialization.number().optional(), + topP: core.serialization.property("top_p", core.serialization.number().optional()), + stop: AgentKernelRequestStop.optional(), + presencePenalty: core.serialization.property("presence_penalty", core.serialization.number().optional()), + frequencyPenalty: core.serialization.property("frequency_penalty", core.serialization.number().optional()), + other: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + seed: core.serialization.number().optional(), + responseFormat: core.serialization.property("response_format", ResponseFormat.optional()), + reasoningEffort: core.serialization.property("reasoning_effort", AgentKernelRequestReasoningEffort.optional()), + tools: core.serialization.list(AgentKernelRequestToolsItem).optional(), + attributes: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + maxIterations: core.serialization.property("max_iterations", core.serialization.number().optional()), +}); + +export declare namespace AgentKernelRequest { + export interface Raw { + model: string; + endpoint?: ModelEndpoints.Raw | null; + template?: AgentKernelRequestTemplate.Raw | null; + template_language?: TemplateLanguage.Raw | null; + provider?: ModelProviders.Raw | null; + max_tokens?: number | null; + temperature?: number | null; + top_p?: number | null; + stop?: AgentKernelRequestStop.Raw | null; + presence_penalty?: number | null; + frequency_penalty?: number | null; + other?: Record | null; + seed?: number | null; + response_format?: ResponseFormat.Raw | null; + reasoning_effort?: AgentKernelRequestReasoningEffort.Raw | null; + tools?: AgentKernelRequestToolsItem.Raw[] | null; + attributes?: Record | null; + max_iterations?: number | null; + } +} diff --git a/src/serialization/types/AgentKernelRequestReasoningEffort.ts b/src/serialization/types/AgentKernelRequestReasoningEffort.ts new file mode 100644 index 00000000..25dd48a0 --- /dev/null +++ b/src/serialization/types/AgentKernelRequestReasoningEffort.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Humanloop from "../../api/index"; +import * as core from "../../core"; +import { OpenAiReasoningEffort } from "./OpenAiReasoningEffort"; + +export const AgentKernelRequestReasoningEffort: core.serialization.Schema< + serializers.AgentKernelRequestReasoningEffort.Raw, + Humanloop.AgentKernelRequestReasoningEffort +> = core.serialization.undiscriminatedUnion([OpenAiReasoningEffort, core.serialization.number()]); + +export declare namespace AgentKernelRequestReasoningEffort { + export type Raw = OpenAiReasoningEffort.Raw | number; +} diff --git a/src/serialization/types/AgentKernelRequestStop.ts b/src/serialization/types/AgentKernelRequestStop.ts new file mode 100644 index 00000000..1b7d0cdc --- /dev/null +++ b/src/serialization/types/AgentKernelRequestStop.ts @@ -0,0 +1,19 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Humanloop from "../../api/index"; +import * as core from "../../core"; + +export const AgentKernelRequestStop: core.serialization.Schema< + serializers.AgentKernelRequestStop.Raw, + Humanloop.AgentKernelRequestStop +> = core.serialization.undiscriminatedUnion([ + core.serialization.string(), + core.serialization.list(core.serialization.string()), +]); + +export declare namespace AgentKernelRequestStop { + export type Raw = string | string[]; +} diff --git a/src/serialization/types/AgentKernelRequestTemplate.ts b/src/serialization/types/AgentKernelRequestTemplate.ts new file mode 100644 index 00000000..b3b07762 --- /dev/null +++ b/src/serialization/types/AgentKernelRequestTemplate.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Humanloop from "../../api/index"; +import * as core from "../../core"; +import { ChatMessage } from "./ChatMessage"; + +export const AgentKernelRequestTemplate: core.serialization.Schema< + serializers.AgentKernelRequestTemplate.Raw, + Humanloop.AgentKernelRequestTemplate +> = core.serialization.undiscriminatedUnion([core.serialization.string(), core.serialization.list(ChatMessage)]); + +export declare namespace AgentKernelRequestTemplate { + export type Raw = string | ChatMessage.Raw[]; +} diff --git a/src/serialization/types/AgentKernelRequestToolsItem.ts b/src/serialization/types/AgentKernelRequestToolsItem.ts new file mode 100644 index 00000000..7aaeb264 --- /dev/null +++ b/src/serialization/types/AgentKernelRequestToolsItem.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Humanloop from "../../api/index"; +import * as core from "../../core"; +import { AgentLinkedFileRequest } from "./AgentLinkedFileRequest"; +import { AgentInlineTool } from "./AgentInlineTool"; + +export const AgentKernelRequestToolsItem: core.serialization.Schema< + serializers.AgentKernelRequestToolsItem.Raw, + Humanloop.AgentKernelRequestToolsItem +> = core.serialization.undiscriminatedUnion([AgentLinkedFileRequest, AgentInlineTool]); + +export declare namespace AgentKernelRequestToolsItem { + export type Raw = AgentLinkedFileRequest.Raw | AgentInlineTool.Raw; +} diff --git a/src/serialization/types/AgentLinkedFileRequest.ts b/src/serialization/types/AgentLinkedFileRequest.ts new file mode 100644 index 00000000..33ec1bfe --- /dev/null +++ b/src/serialization/types/AgentLinkedFileRequest.ts @@ -0,0 +1,26 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Humanloop from "../../api/index"; +import * as core from "../../core"; +import { LinkedFileRequest } from "./LinkedFileRequest"; +import { StopAgentEnum } from "./StopAgentEnum"; + +export const AgentLinkedFileRequest: core.serialization.ObjectSchema< + serializers.AgentLinkedFileRequest.Raw, + Humanloop.AgentLinkedFileRequest +> = core.serialization.object({ + type: core.serialization.stringLiteral("file"), + link: LinkedFileRequest, + stopAgent: core.serialization.property("stop_agent", StopAgentEnum), +}); + +export declare namespace AgentLinkedFileRequest { + export interface Raw { + type: "file"; + link: LinkedFileRequest.Raw; + stop_agent: StopAgentEnum.Raw; + } +} diff --git a/src/serialization/types/AgentLinkedFileResponse.ts b/src/serialization/types/AgentLinkedFileResponse.ts new file mode 100644 index 00000000..f0a81a85 --- /dev/null +++ b/src/serialization/types/AgentLinkedFileResponse.ts @@ -0,0 +1,28 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Humanloop from "../../api/index"; +import * as core from "../../core"; +import { LinkedFileRequest } from "./LinkedFileRequest"; +import { StopAgentEnum } from "./StopAgentEnum"; + +export const AgentLinkedFileResponse: core.serialization.ObjectSchema< + serializers.AgentLinkedFileResponse.Raw, + Humanloop.AgentLinkedFileResponse +> = core.serialization.object({ + type: core.serialization.stringLiteral("file"), + link: LinkedFileRequest, + stopAgent: core.serialization.property("stop_agent", StopAgentEnum), + file: core.serialization.lazy(() => serializers.AgentLinkedFileResponseFile).optional(), +}); + +export declare namespace AgentLinkedFileResponse { + export interface Raw { + type: "file"; + link: LinkedFileRequest.Raw; + stop_agent: StopAgentEnum.Raw; + file?: serializers.AgentLinkedFileResponseFile.Raw | null; + } +} diff --git a/src/serialization/types/AgentLinkedFileResponseFile.ts b/src/serialization/types/AgentLinkedFileResponseFile.ts new file mode 100644 index 00000000..9c337bdc --- /dev/null +++ b/src/serialization/types/AgentLinkedFileResponseFile.ts @@ -0,0 +1,30 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Humanloop from "../../api/index"; +import * as core from "../../core"; +import { DatasetResponse } from "./DatasetResponse"; + +export const AgentLinkedFileResponseFile: core.serialization.Schema< + serializers.AgentLinkedFileResponseFile.Raw, + Humanloop.AgentLinkedFileResponseFile +> = core.serialization.undiscriminatedUnion([ + core.serialization.lazyObject(() => serializers.PromptResponse), + core.serialization.lazyObject(() => serializers.ToolResponse), + DatasetResponse, + core.serialization.lazyObject(() => serializers.EvaluatorResponse), + core.serialization.lazyObject(() => serializers.FlowResponse), + core.serialization.lazyObject(() => serializers.AgentResponse), +]); + +export declare namespace AgentLinkedFileResponseFile { + export type Raw = + | serializers.PromptResponse.Raw + | serializers.ToolResponse.Raw + | DatasetResponse.Raw + | serializers.EvaluatorResponse.Raw + | serializers.FlowResponse.Raw + | serializers.AgentResponse.Raw; +} diff --git a/src/serialization/types/AgentLogResponse.ts b/src/serialization/types/AgentLogResponse.ts new file mode 100644 index 00000000..6146f45d --- /dev/null +++ b/src/serialization/types/AgentLogResponse.ts @@ -0,0 +1,103 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Humanloop from "../../api/index"; +import * as core from "../../core"; +import { ChatMessage } from "./ChatMessage"; +import { AgentLogResponseToolChoice } from "./AgentLogResponseToolChoice"; +import { LogStatus } from "./LogStatus"; + +export const AgentLogResponse: core.serialization.ObjectSchema< + serializers.AgentLogResponse.Raw, + Humanloop.AgentLogResponse +> = core.serialization.object({ + outputMessage: core.serialization.property("output_message", ChatMessage.optional()), + promptTokens: core.serialization.property("prompt_tokens", core.serialization.number().optional()), + reasoningTokens: core.serialization.property("reasoning_tokens", core.serialization.number().optional()), + outputTokens: core.serialization.property("output_tokens", core.serialization.number().optional()), + promptCost: core.serialization.property("prompt_cost", core.serialization.number().optional()), + outputCost: core.serialization.property("output_cost", core.serialization.number().optional()), + finishReason: core.serialization.property("finish_reason", core.serialization.string().optional()), + messages: core.serialization.list(ChatMessage).optional(), + toolChoice: core.serialization.property("tool_choice", AgentLogResponseToolChoice.optional()), + agent: core.serialization.lazyObject(() => serializers.AgentResponse), + startTime: core.serialization.property("start_time", core.serialization.date().optional()), + endTime: core.serialization.property("end_time", core.serialization.date().optional()), + output: core.serialization.string().optional(), + createdAt: core.serialization.property("created_at", core.serialization.date().optional()), + error: core.serialization.string().optional(), + providerLatency: core.serialization.property("provider_latency", core.serialization.number().optional()), + stdout: core.serialization.string().optional(), + providerRequest: core.serialization.property( + "provider_request", + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + ), + providerResponse: core.serialization.property( + "provider_response", + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + ), + inputs: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + source: core.serialization.string().optional(), + metadata: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + logStatus: core.serialization.property("log_status", LogStatus.optional()), + sourceDatapointId: core.serialization.property("source_datapoint_id", core.serialization.string().optional()), + traceParentId: core.serialization.property("trace_parent_id", core.serialization.string().optional()), + batches: core.serialization.list(core.serialization.string()).optional(), + user: core.serialization.string().optional(), + environment: core.serialization.string().optional(), + save: core.serialization.boolean().optional(), + logId: core.serialization.property("log_id", core.serialization.string().optional()), + id: core.serialization.string(), + evaluatorLogs: core.serialization.property( + "evaluator_logs", + core.serialization.list(core.serialization.lazyObject(() => serializers.EvaluatorLogResponse)), + ), + traceFlowId: core.serialization.property("trace_flow_id", core.serialization.string().optional()), + traceId: core.serialization.property("trace_id", core.serialization.string().optional()), + traceChildren: core.serialization.property( + "trace_children", + core.serialization.list(core.serialization.lazy(() => serializers.LogResponse)).optional(), + ), +}); + +export declare namespace AgentLogResponse { + export interface Raw { + output_message?: ChatMessage.Raw | null; + prompt_tokens?: number | null; + reasoning_tokens?: number | null; + output_tokens?: number | null; + prompt_cost?: number | null; + output_cost?: number | null; + finish_reason?: string | null; + messages?: ChatMessage.Raw[] | null; + tool_choice?: AgentLogResponseToolChoice.Raw | null; + agent: serializers.AgentResponse.Raw; + start_time?: string | null; + end_time?: string | null; + output?: string | null; + created_at?: string | null; + error?: string | null; + provider_latency?: number | null; + stdout?: string | null; + provider_request?: Record | null; + provider_response?: Record | null; + inputs?: Record | null; + source?: string | null; + metadata?: Record | null; + log_status?: LogStatus.Raw | null; + source_datapoint_id?: string | null; + trace_parent_id?: string | null; + batches?: string[] | null; + user?: string | null; + environment?: string | null; + save?: boolean | null; + log_id?: string | null; + id: string; + evaluator_logs: serializers.EvaluatorLogResponse.Raw[]; + trace_flow_id?: string | null; + trace_id?: string | null; + trace_children?: serializers.LogResponse.Raw[] | null; + } +} diff --git a/src/serialization/types/AgentLogResponseToolChoice.ts b/src/serialization/types/AgentLogResponseToolChoice.ts new file mode 100644 index 00000000..d5938949 --- /dev/null +++ b/src/serialization/types/AgentLogResponseToolChoice.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Humanloop from "../../api/index"; +import * as core from "../../core"; +import { ToolChoice } from "./ToolChoice"; + +export const AgentLogResponseToolChoice: core.serialization.Schema< + serializers.AgentLogResponseToolChoice.Raw, + Humanloop.AgentLogResponseToolChoice +> = core.serialization.undiscriminatedUnion([ + core.serialization.stringLiteral("none"), + core.serialization.stringLiteral("auto"), + core.serialization.stringLiteral("required"), + ToolChoice, +]); + +export declare namespace AgentLogResponseToolChoice { + export type Raw = "none" | "auto" | "required" | ToolChoice.Raw; +} diff --git a/src/serialization/types/AgentLogStreamResponse.ts b/src/serialization/types/AgentLogStreamResponse.ts new file mode 100644 index 00000000..0ca2621e --- /dev/null +++ b/src/serialization/types/AgentLogStreamResponse.ts @@ -0,0 +1,49 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Humanloop from "../../api/index"; +import * as core from "../../core"; +import { ChatMessage } from "./ChatMessage"; + +export const AgentLogStreamResponse: core.serialization.ObjectSchema< + serializers.AgentLogStreamResponse.Raw, + Humanloop.AgentLogStreamResponse +> = core.serialization.object({ + output: core.serialization.string().optional(), + createdAt: core.serialization.property("created_at", core.serialization.date().optional()), + error: core.serialization.string().optional(), + providerLatency: core.serialization.property("provider_latency", core.serialization.number().optional()), + stdout: core.serialization.string().optional(), + outputMessage: core.serialization.property("output_message", ChatMessage.optional()), + promptTokens: core.serialization.property("prompt_tokens", core.serialization.number().optional()), + reasoningTokens: core.serialization.property("reasoning_tokens", core.serialization.number().optional()), + outputTokens: core.serialization.property("output_tokens", core.serialization.number().optional()), + promptCost: core.serialization.property("prompt_cost", core.serialization.number().optional()), + outputCost: core.serialization.property("output_cost", core.serialization.number().optional()), + finishReason: core.serialization.property("finish_reason", core.serialization.string().optional()), + id: core.serialization.string(), + agentId: core.serialization.property("agent_id", core.serialization.string()), + versionId: core.serialization.property("version_id", core.serialization.string()), +}); + +export declare namespace AgentLogStreamResponse { + export interface Raw { + output?: string | null; + created_at?: string | null; + error?: string | null; + provider_latency?: number | null; + stdout?: string | null; + output_message?: ChatMessage.Raw | null; + prompt_tokens?: number | null; + reasoning_tokens?: number | null; + output_tokens?: number | null; + prompt_cost?: number | null; + output_cost?: number | null; + finish_reason?: string | null; + id: string; + agent_id: string; + version_id: string; + } +} diff --git a/src/serialization/types/AgentResponse.ts b/src/serialization/types/AgentResponse.ts new file mode 100644 index 00000000..f9b96ccf --- /dev/null +++ b/src/serialization/types/AgentResponse.ts @@ -0,0 +1,119 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Humanloop from "../../api/index"; +import * as core from "../../core"; +import { ModelEndpoints } from "./ModelEndpoints"; +import { AgentResponseTemplate } from "./AgentResponseTemplate"; +import { TemplateLanguage } from "./TemplateLanguage"; +import { ModelProviders } from "./ModelProviders"; +import { AgentResponseStop } from "./AgentResponseStop"; +import { ResponseFormat } from "./ResponseFormat"; +import { AgentResponseReasoningEffort } from "./AgentResponseReasoningEffort"; +import { EnvironmentResponse } from "./EnvironmentResponse"; +import { UserResponse } from "./UserResponse"; +import { VersionStatus } from "./VersionStatus"; +import { InputResponse } from "./InputResponse"; +import { EvaluatorAggregate } from "./EvaluatorAggregate"; + +export const AgentResponse: core.serialization.ObjectSchema = + core.serialization.object({ + path: core.serialization.string(), + id: core.serialization.string(), + directoryId: core.serialization.property("directory_id", core.serialization.string().optional()), + model: core.serialization.string(), + endpoint: ModelEndpoints.optional(), + template: AgentResponseTemplate.optional(), + templateLanguage: core.serialization.property("template_language", TemplateLanguage.optional()), + provider: ModelProviders.optional(), + maxTokens: core.serialization.property("max_tokens", core.serialization.number().optional()), + temperature: core.serialization.number().optional(), + topP: core.serialization.property("top_p", core.serialization.number().optional()), + stop: AgentResponseStop.optional(), + presencePenalty: core.serialization.property("presence_penalty", core.serialization.number().optional()), + frequencyPenalty: core.serialization.property("frequency_penalty", core.serialization.number().optional()), + other: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + seed: core.serialization.number().optional(), + responseFormat: core.serialization.property("response_format", ResponseFormat.optional()), + reasoningEffort: core.serialization.property("reasoning_effort", AgentResponseReasoningEffort.optional()), + tools: core.serialization.list(core.serialization.lazy(() => serializers.AgentResponseToolsItem)), + attributes: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + maxIterations: core.serialization.property("max_iterations", core.serialization.number().optional()), + versionName: core.serialization.property("version_name", core.serialization.string().optional()), + versionDescription: core.serialization.property("version_description", core.serialization.string().optional()), + description: core.serialization.string().optional(), + tags: core.serialization.list(core.serialization.string()).optional(), + readme: core.serialization.string().optional(), + name: core.serialization.string(), + schema: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + versionId: core.serialization.property("version_id", core.serialization.string()), + type: core.serialization.stringLiteral("agent").optional(), + environments: core.serialization.list(EnvironmentResponse).optional(), + createdAt: core.serialization.property("created_at", core.serialization.date()), + updatedAt: core.serialization.property("updated_at", core.serialization.date()), + createdBy: core.serialization.property("created_by", UserResponse.optional()), + committedBy: core.serialization.property("committed_by", UserResponse.optional()), + committedAt: core.serialization.property("committed_at", core.serialization.date().optional()), + status: VersionStatus, + lastUsedAt: core.serialization.property("last_used_at", core.serialization.date()), + versionLogsCount: core.serialization.property("version_logs_count", core.serialization.number()), + totalLogsCount: core.serialization.property("total_logs_count", core.serialization.number()), + inputs: core.serialization.list(InputResponse), + evaluators: core.serialization + .list(core.serialization.lazyObject(() => serializers.MonitoringEvaluatorResponse)) + .optional(), + evaluatorAggregates: core.serialization.property( + "evaluator_aggregates", + core.serialization.list(EvaluatorAggregate).optional(), + ), + }); + +export declare namespace AgentResponse { + export interface Raw { + path: string; + id: string; + directory_id?: string | null; + model: string; + endpoint?: ModelEndpoints.Raw | null; + template?: AgentResponseTemplate.Raw | null; + template_language?: TemplateLanguage.Raw | null; + provider?: ModelProviders.Raw | null; + max_tokens?: number | null; + temperature?: number | null; + top_p?: number | null; + stop?: AgentResponseStop.Raw | null; + presence_penalty?: number | null; + frequency_penalty?: number | null; + other?: Record | null; + seed?: number | null; + response_format?: ResponseFormat.Raw | null; + reasoning_effort?: AgentResponseReasoningEffort.Raw | null; + tools: serializers.AgentResponseToolsItem.Raw[]; + attributes?: Record | null; + max_iterations?: number | null; + version_name?: string | null; + version_description?: string | null; + description?: string | null; + tags?: string[] | null; + readme?: string | null; + name: string; + schema?: Record | null; + version_id: string; + type?: "agent" | null; + environments?: EnvironmentResponse.Raw[] | null; + created_at: string; + updated_at: string; + created_by?: (UserResponse.Raw | undefined) | null; + committed_by?: (UserResponse.Raw | undefined) | null; + committed_at?: string | null; + status: VersionStatus.Raw; + last_used_at: string; + version_logs_count: number; + total_logs_count: number; + inputs: InputResponse.Raw[]; + evaluators?: serializers.MonitoringEvaluatorResponse.Raw[] | null; + evaluator_aggregates?: EvaluatorAggregate.Raw[] | null; + } +} diff --git a/src/serialization/types/AgentResponseReasoningEffort.ts b/src/serialization/types/AgentResponseReasoningEffort.ts new file mode 100644 index 00000000..5a01ff8b --- /dev/null +++ b/src/serialization/types/AgentResponseReasoningEffort.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Humanloop from "../../api/index"; +import * as core from "../../core"; +import { OpenAiReasoningEffort } from "./OpenAiReasoningEffort"; + +export const AgentResponseReasoningEffort: core.serialization.Schema< + serializers.AgentResponseReasoningEffort.Raw, + Humanloop.AgentResponseReasoningEffort +> = core.serialization.undiscriminatedUnion([OpenAiReasoningEffort, core.serialization.number()]); + +export declare namespace AgentResponseReasoningEffort { + export type Raw = OpenAiReasoningEffort.Raw | number; +} diff --git a/src/serialization/types/AgentResponseStop.ts b/src/serialization/types/AgentResponseStop.ts new file mode 100644 index 00000000..43ae0f86 --- /dev/null +++ b/src/serialization/types/AgentResponseStop.ts @@ -0,0 +1,19 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Humanloop from "../../api/index"; +import * as core from "../../core"; + +export const AgentResponseStop: core.serialization.Schema< + serializers.AgentResponseStop.Raw, + Humanloop.AgentResponseStop +> = core.serialization.undiscriminatedUnion([ + core.serialization.string(), + core.serialization.list(core.serialization.string()), +]); + +export declare namespace AgentResponseStop { + export type Raw = string | string[]; +} diff --git a/src/serialization/types/AgentResponseTemplate.ts b/src/serialization/types/AgentResponseTemplate.ts new file mode 100644 index 00000000..b553711d --- /dev/null +++ b/src/serialization/types/AgentResponseTemplate.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Humanloop from "../../api/index"; +import * as core from "../../core"; +import { ChatMessage } from "./ChatMessage"; + +export const AgentResponseTemplate: core.serialization.Schema< + serializers.AgentResponseTemplate.Raw, + Humanloop.AgentResponseTemplate +> = core.serialization.undiscriminatedUnion([core.serialization.string(), core.serialization.list(ChatMessage)]); + +export declare namespace AgentResponseTemplate { + export type Raw = string | ChatMessage.Raw[]; +} diff --git a/src/serialization/types/AgentResponseToolsItem.ts b/src/serialization/types/AgentResponseToolsItem.ts new file mode 100644 index 00000000..92fbf291 --- /dev/null +++ b/src/serialization/types/AgentResponseToolsItem.ts @@ -0,0 +1,20 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Humanloop from "../../api/index"; +import * as core from "../../core"; +import { AgentInlineTool } from "./AgentInlineTool"; + +export const AgentResponseToolsItem: core.serialization.Schema< + serializers.AgentResponseToolsItem.Raw, + Humanloop.AgentResponseToolsItem +> = core.serialization.undiscriminatedUnion([ + core.serialization.lazyObject(() => serializers.AgentLinkedFileResponse), + AgentInlineTool, +]); + +export declare namespace AgentResponseToolsItem { + export type Raw = serializers.AgentLinkedFileResponse.Raw | AgentInlineTool.Raw; +} diff --git a/src/serialization/types/AnthropicRedactedThinkingContent.ts b/src/serialization/types/AnthropicRedactedThinkingContent.ts new file mode 100644 index 00000000..92aa3331 --- /dev/null +++ b/src/serialization/types/AnthropicRedactedThinkingContent.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Humanloop from "../../api/index"; +import * as core from "../../core"; + +export const AnthropicRedactedThinkingContent: core.serialization.ObjectSchema< + serializers.AnthropicRedactedThinkingContent.Raw, + Humanloop.AnthropicRedactedThinkingContent +> = core.serialization.object({ + type: core.serialization.stringLiteral("redacted_thinking"), + data: core.serialization.string(), +}); + +export declare namespace AnthropicRedactedThinkingContent { + export interface Raw { + type: "redacted_thinking"; + data: string; + } +} diff --git a/src/serialization/types/AnthropicThinkingContent.ts b/src/serialization/types/AnthropicThinkingContent.ts new file mode 100644 index 00000000..e0aa3c51 --- /dev/null +++ b/src/serialization/types/AnthropicThinkingContent.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Humanloop from "../../api/index"; +import * as core from "../../core"; + +export const AnthropicThinkingContent: core.serialization.ObjectSchema< + serializers.AnthropicThinkingContent.Raw, + Humanloop.AnthropicThinkingContent +> = core.serialization.object({ + type: core.serialization.stringLiteral("thinking"), + thinking: core.serialization.string(), + signature: core.serialization.string(), +}); + +export declare namespace AnthropicThinkingContent { + export interface Raw { + type: "thinking"; + thinking: string; + signature: string; + } +} diff --git a/src/serialization/types/ChatMessage.ts b/src/serialization/types/ChatMessage.ts index 29ea1a62..c7097645 100644 --- a/src/serialization/types/ChatMessage.ts +++ b/src/serialization/types/ChatMessage.ts @@ -8,6 +8,7 @@ import * as core from "../../core"; import { ChatMessageContent } from "./ChatMessageContent"; import { ChatRole } from "./ChatRole"; import { ToolCall } from "./ToolCall"; +import { ChatMessageThinkingItem } from "./ChatMessageThinkingItem"; export const ChatMessage: core.serialization.ObjectSchema = core.serialization.object({ @@ -16,6 +17,7 @@ export const ChatMessage: core.serialization.ObjectSchema = core.serialization.undiscriminatedUnion([AnthropicThinkingContent, AnthropicRedactedThinkingContent]); + +export declare namespace ChatMessageThinkingItem { + export type Raw = AnthropicThinkingContent.Raw | AnthropicRedactedThinkingContent.Raw; +} diff --git a/src/serialization/types/CommitRequest.ts b/src/serialization/types/CommitRequest.ts deleted file mode 100644 index 177f8ba0..00000000 --- a/src/serialization/types/CommitRequest.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as serializers from "../index"; -import * as Humanloop from "../../api/index"; -import * as core from "../../core"; - -export const CommitRequest: core.serialization.ObjectSchema = - core.serialization.object({ - commitMessage: core.serialization.property("commit_message", core.serialization.string()), - }); - -export declare namespace CommitRequest { - export interface Raw { - commit_message: string; - } -} diff --git a/src/serialization/types/CreateAgentLogResponse.ts b/src/serialization/types/CreateAgentLogResponse.ts new file mode 100644 index 00000000..36721051 --- /dev/null +++ b/src/serialization/types/CreateAgentLogResponse.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Humanloop from "../../api/index"; +import * as core from "../../core"; +import { LogStatus } from "./LogStatus"; + +export const CreateAgentLogResponse: core.serialization.ObjectSchema< + serializers.CreateAgentLogResponse.Raw, + Humanloop.CreateAgentLogResponse +> = core.serialization.object({ + id: core.serialization.string(), + agentId: core.serialization.property("agent_id", core.serialization.string()), + versionId: core.serialization.property("version_id", core.serialization.string()), + logStatus: core.serialization.property("log_status", LogStatus.optional()), +}); + +export declare namespace CreateAgentLogResponse { + export interface Raw { + id: string; + agent_id: string; + version_id: string; + log_status?: LogStatus.Raw | null; + } +} diff --git a/src/serialization/types/DatasetResponse.ts b/src/serialization/types/DatasetResponse.ts index 39822754..83b2bc77 100644 --- a/src/serialization/types/DatasetResponse.ts +++ b/src/serialization/types/DatasetResponse.ts @@ -7,7 +7,6 @@ import * as Humanloop from "../../api/index"; import * as core from "../../core"; import { EnvironmentResponse } from "./EnvironmentResponse"; import { UserResponse } from "./UserResponse"; -import { VersionStatus } from "./VersionStatus"; import { DatapointResponse } from "./DatapointResponse"; export const DatasetResponse: core.serialization.ObjectSchema< @@ -19,6 +18,7 @@ export const DatasetResponse: core.serialization.ObjectSchema< directoryId: core.serialization.property("directory_id", core.serialization.string().optional()), name: core.serialization.string(), description: core.serialization.string().optional(), + schema: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), readme: core.serialization.string().optional(), tags: core.serialization.list(core.serialization.string()).optional(), versionId: core.serialization.property("version_id", core.serialization.string()), @@ -27,11 +27,9 @@ export const DatasetResponse: core.serialization.ObjectSchema< createdAt: core.serialization.property("created_at", core.serialization.date()), updatedAt: core.serialization.property("updated_at", core.serialization.date()), createdBy: core.serialization.property("created_by", UserResponse.optional()), - committedBy: core.serialization.property("committed_by", UserResponse.optional()), - committedAt: core.serialization.property("committed_at", core.serialization.date().optional()), - status: VersionStatus, lastUsedAt: core.serialization.property("last_used_at", core.serialization.date()), - commitMessage: core.serialization.property("commit_message", core.serialization.string().optional()), + versionName: core.serialization.property("version_name", core.serialization.string().optional()), + versionDescription: core.serialization.property("version_description", core.serialization.string().optional()), datapointsCount: core.serialization.property("datapoints_count", core.serialization.number()), datapoints: core.serialization.list(DatapointResponse).optional(), attributes: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), @@ -44,6 +42,7 @@ export declare namespace DatasetResponse { directory_id?: string | null; name: string; description?: string | null; + schema?: Record | null; readme?: string | null; tags?: string[] | null; version_id: string; @@ -52,11 +51,9 @@ export declare namespace DatasetResponse { created_at: string; updated_at: string; created_by?: (UserResponse.Raw | undefined) | null; - committed_by?: (UserResponse.Raw | undefined) | null; - committed_at?: string | null; - status: VersionStatus.Raw; last_used_at: string; - commit_message?: string | null; + version_name?: string | null; + version_description?: string | null; datapoints_count: number; datapoints?: DatapointResponse.Raw[] | null; attributes?: Record | null; diff --git a/src/serialization/types/DirectoryWithParentsAndChildrenResponseFilesItem.ts b/src/serialization/types/DirectoryWithParentsAndChildrenResponseFilesItem.ts index a8765b7a..af558948 100644 --- a/src/serialization/types/DirectoryWithParentsAndChildrenResponseFilesItem.ts +++ b/src/serialization/types/DirectoryWithParentsAndChildrenResponseFilesItem.ts @@ -16,6 +16,7 @@ export const DirectoryWithParentsAndChildrenResponseFilesItem: core.serializatio core.serialization.lazyObject(() => serializers.EvaluatorResponse), DatasetResponse, core.serialization.lazyObject(() => serializers.FlowResponse), + core.serialization.lazyObject(() => serializers.AgentResponse), ]); export declare namespace DirectoryWithParentsAndChildrenResponseFilesItem { @@ -24,5 +25,6 @@ export declare namespace DirectoryWithParentsAndChildrenResponseFilesItem { | serializers.ToolResponse.Raw | serializers.EvaluatorResponse.Raw | DatasetResponse.Raw - | serializers.FlowResponse.Raw; + | serializers.FlowResponse.Raw + | serializers.AgentResponse.Raw; } diff --git a/src/serialization/types/EvaluatorResponse.ts b/src/serialization/types/EvaluatorResponse.ts index 756f8b5e..fec7be8d 100644 --- a/src/serialization/types/EvaluatorResponse.ts +++ b/src/serialization/types/EvaluatorResponse.ts @@ -8,7 +8,6 @@ import * as core from "../../core"; import { EvaluatorResponseSpec } from "./EvaluatorResponseSpec"; import { EnvironmentResponse } from "./EnvironmentResponse"; import { UserResponse } from "./UserResponse"; -import { VersionStatus } from "./VersionStatus"; import { InputResponse } from "./InputResponse"; import { EvaluatorAggregate } from "./EvaluatorAggregate"; @@ -19,10 +18,12 @@ export const EvaluatorResponse: core.serialization.ObjectSchema< path: core.serialization.string(), id: core.serialization.string(), directoryId: core.serialization.property("directory_id", core.serialization.string().optional()), - commitMessage: core.serialization.property("commit_message", core.serialization.string().optional()), + versionName: core.serialization.property("version_name", core.serialization.string().optional()), + versionDescription: core.serialization.property("version_description", core.serialization.string().optional()), spec: EvaluatorResponseSpec, name: core.serialization.string(), description: core.serialization.string().optional(), + schema: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), readme: core.serialization.string().optional(), tags: core.serialization.list(core.serialization.string()).optional(), versionId: core.serialization.property("version_id", core.serialization.string()), @@ -31,9 +32,6 @@ export const EvaluatorResponse: core.serialization.ObjectSchema< createdAt: core.serialization.property("created_at", core.serialization.date()), updatedAt: core.serialization.property("updated_at", core.serialization.date()), createdBy: core.serialization.property("created_by", UserResponse.optional()), - committedBy: core.serialization.property("committed_by", UserResponse.optional()), - committedAt: core.serialization.property("committed_at", core.serialization.date().optional()), - status: VersionStatus, lastUsedAt: core.serialization.property("last_used_at", core.serialization.date()), versionLogsCount: core.serialization.property("version_logs_count", core.serialization.number()), totalLogsCount: core.serialization.property("total_logs_count", core.serialization.number()), @@ -53,10 +51,12 @@ export declare namespace EvaluatorResponse { path: string; id: string; directory_id?: string | null; - commit_message?: string | null; + version_name?: string | null; + version_description?: string | null; spec: EvaluatorResponseSpec.Raw; name: string; description?: string | null; + schema?: Record | null; readme?: string | null; tags?: string[] | null; version_id: string; @@ -65,9 +65,6 @@ export declare namespace EvaluatorResponse { created_at: string; updated_at: string; created_by?: (UserResponse.Raw | undefined) | null; - committed_by?: (UserResponse.Raw | undefined) | null; - committed_at?: string | null; - status: VersionStatus.Raw; last_used_at: string; version_logs_count: number; total_logs_count: number; diff --git a/src/serialization/types/EventType.ts b/src/serialization/types/EventType.ts new file mode 100644 index 00000000..b7d38e57 --- /dev/null +++ b/src/serialization/types/EventType.ts @@ -0,0 +1,39 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Humanloop from "../../api/index"; +import * as core from "../../core"; + +export const EventType: core.serialization.Schema = + core.serialization.enum_([ + "agent_turn_start", + "agent_turn_suspend", + "agent_turn_continue", + "agent_turn_end", + "agent_start", + "agent_update", + "agent_end", + "tool_start", + "tool_update", + "tool_end", + "error", + "agent_generation_error", + ]); + +export declare namespace EventType { + export type Raw = + | "agent_turn_start" + | "agent_turn_suspend" + | "agent_turn_continue" + | "agent_turn_end" + | "agent_start" + | "agent_update" + | "agent_end" + | "tool_start" + | "tool_update" + | "tool_end" + | "error" + | "agent_generation_error"; +} diff --git a/src/serialization/types/FileEnvironmentResponseFile.ts b/src/serialization/types/FileEnvironmentResponseFile.ts index 3d7f2228..805ce324 100644 --- a/src/serialization/types/FileEnvironmentResponseFile.ts +++ b/src/serialization/types/FileEnvironmentResponseFile.ts @@ -16,6 +16,7 @@ export const FileEnvironmentResponseFile: core.serialization.Schema< DatasetResponse, core.serialization.lazyObject(() => serializers.EvaluatorResponse), core.serialization.lazyObject(() => serializers.FlowResponse), + core.serialization.lazyObject(() => serializers.AgentResponse), ]); export declare namespace FileEnvironmentResponseFile { @@ -24,5 +25,6 @@ export declare namespace FileEnvironmentResponseFile { | serializers.ToolResponse.Raw | DatasetResponse.Raw | serializers.EvaluatorResponse.Raw - | serializers.FlowResponse.Raw; + | serializers.FlowResponse.Raw + | serializers.AgentResponse.Raw; } diff --git a/src/serialization/types/FileEnvironmentVariableRequest.ts b/src/serialization/types/FileEnvironmentVariableRequest.ts new file mode 100644 index 00000000..4c3f3e47 --- /dev/null +++ b/src/serialization/types/FileEnvironmentVariableRequest.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Humanloop from "../../api/index"; +import * as core from "../../core"; + +export const FileEnvironmentVariableRequest: core.serialization.ObjectSchema< + serializers.FileEnvironmentVariableRequest.Raw, + Humanloop.FileEnvironmentVariableRequest +> = core.serialization.object({ + name: core.serialization.string(), + value: core.serialization.string(), +}); + +export declare namespace FileEnvironmentVariableRequest { + export interface Raw { + name: string; + value: string; + } +} diff --git a/src/serialization/types/FileType.ts b/src/serialization/types/FileType.ts index b26c954d..c426d30e 100644 --- a/src/serialization/types/FileType.ts +++ b/src/serialization/types/FileType.ts @@ -7,8 +7,8 @@ import * as Humanloop from "../../api/index"; import * as core from "../../core"; export const FileType: core.serialization.Schema = - core.serialization.enum_(["prompt", "tool", "dataset", "evaluator", "flow"]); + core.serialization.enum_(["prompt", "tool", "dataset", "evaluator", "flow", "agent"]); export declare namespace FileType { - export type Raw = "prompt" | "tool" | "dataset" | "evaluator" | "flow"; + export type Raw = "prompt" | "tool" | "dataset" | "evaluator" | "flow" | "agent"; } diff --git a/src/serialization/types/FilesToolType.ts b/src/serialization/types/FilesToolType.ts index 81dd79bb..3e3c684d 100644 --- a/src/serialization/types/FilesToolType.ts +++ b/src/serialization/types/FilesToolType.ts @@ -7,8 +7,8 @@ import * as Humanloop from "../../api/index"; import * as core from "../../core"; export const FilesToolType: core.serialization.Schema = - core.serialization.enum_(["pinecone_search", "google", "mock", "snippet", "json_schema", "get_api_call"]); + core.serialization.enum_(["pinecone_search", "google", "mock", "snippet", "json_schema", "get_api_call", "python"]); export declare namespace FilesToolType { - export type Raw = "pinecone_search" | "google" | "mock" | "snippet" | "json_schema" | "get_api_call"; + export type Raw = "pinecone_search" | "google" | "mock" | "snippet" | "json_schema" | "get_api_call" | "python"; } diff --git a/src/serialization/types/FlowResponse.ts b/src/serialization/types/FlowResponse.ts index 42fe5558..67bfda5a 100644 --- a/src/serialization/types/FlowResponse.ts +++ b/src/serialization/types/FlowResponse.ts @@ -7,7 +7,6 @@ import * as Humanloop from "../../api/index"; import * as core from "../../core"; import { EnvironmentResponse } from "./EnvironmentResponse"; import { UserResponse } from "./UserResponse"; -import { VersionStatus } from "./VersionStatus"; import { EvaluatorAggregate } from "./EvaluatorAggregate"; export const FlowResponse: core.serialization.ObjectSchema = @@ -16,9 +15,11 @@ export const FlowResponse: core.serialization.ObjectSchema; - commit_message?: string | null; + version_name?: string | null; + version_description?: string | null; name: string; description?: string | null; + schema?: Record | null; readme?: string | null; tags?: string[] | null; version_id: string; @@ -58,9 +58,6 @@ export declare namespace FlowResponse { created_at: string; updated_at: string; created_by?: (UserResponse.Raw | undefined) | null; - committed_by?: (UserResponse.Raw | undefined) | null; - committed_at?: string | null; - status: VersionStatus.Raw; last_used_at: string; version_logs_count: number; evaluator_aggregates?: EvaluatorAggregate.Raw[] | null; diff --git a/src/serialization/types/LinkedFileRequest.ts b/src/serialization/types/LinkedFileRequest.ts new file mode 100644 index 00000000..335b8404 --- /dev/null +++ b/src/serialization/types/LinkedFileRequest.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Humanloop from "../../api/index"; +import * as core from "../../core"; + +export const LinkedFileRequest: core.serialization.ObjectSchema< + serializers.LinkedFileRequest.Raw, + Humanloop.LinkedFileRequest +> = core.serialization.object({ + fileId: core.serialization.property("file_id", core.serialization.string()), + environmentId: core.serialization.property("environment_id", core.serialization.string().optional()), + versionId: core.serialization.property("version_id", core.serialization.string().optional()), +}); + +export declare namespace LinkedFileRequest { + export interface Raw { + file_id: string; + environment_id?: string | null; + version_id?: string | null; + } +} diff --git a/src/serialization/types/ListAgents.ts b/src/serialization/types/ListAgents.ts new file mode 100644 index 00000000..2fe544a1 --- /dev/null +++ b/src/serialization/types/ListAgents.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Humanloop from "../../api/index"; +import * as core from "../../core"; + +export const ListAgents: core.serialization.ObjectSchema = + core.serialization.object({ + records: core.serialization.list(core.serialization.lazyObject(() => serializers.AgentResponse)), + }); + +export declare namespace ListAgents { + export interface Raw { + records: serializers.AgentResponse.Raw[]; + } +} diff --git a/src/serialization/types/LogResponse.ts b/src/serialization/types/LogResponse.ts index 7d62b536..3d43469a 100644 --- a/src/serialization/types/LogResponse.ts +++ b/src/serialization/types/LogResponse.ts @@ -12,6 +12,7 @@ export const LogResponse: core.serialization.Schema serializers.ToolLogResponse), core.serialization.lazyObject(() => serializers.EvaluatorLogResponse), core.serialization.lazyObject(() => serializers.FlowLogResponse), + core.serialization.lazyObject(() => serializers.AgentLogResponse), ]); export declare namespace LogResponse { @@ -19,5 +20,6 @@ export declare namespace LogResponse { | serializers.PromptLogResponse.Raw | serializers.ToolLogResponse.Raw | serializers.EvaluatorLogResponse.Raw - | serializers.FlowLogResponse.Raw; + | serializers.FlowLogResponse.Raw + | serializers.AgentLogResponse.Raw; } diff --git a/src/serialization/types/LogStreamResponse.ts b/src/serialization/types/LogStreamResponse.ts new file mode 100644 index 00000000..dc6696da --- /dev/null +++ b/src/serialization/types/LogStreamResponse.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Humanloop from "../../api/index"; +import * as core from "../../core"; +import { PromptCallStreamResponse } from "./PromptCallStreamResponse"; +import { AgentLogStreamResponse } from "./AgentLogStreamResponse"; + +export const LogStreamResponse: core.serialization.Schema< + serializers.LogStreamResponse.Raw, + Humanloop.LogStreamResponse +> = core.serialization.undiscriminatedUnion([PromptCallStreamResponse, AgentLogStreamResponse]); + +export declare namespace LogStreamResponse { + export type Raw = PromptCallStreamResponse.Raw | AgentLogStreamResponse.Raw; +} diff --git a/src/serialization/types/ModelProviders.ts b/src/serialization/types/ModelProviders.ts index 7d9258cf..c35a7e3b 100644 --- a/src/serialization/types/ModelProviders.ts +++ b/src/serialization/types/ModelProviders.ts @@ -8,28 +8,28 @@ import * as core from "../../core"; export const ModelProviders: core.serialization.Schema = core.serialization.enum_([ - "openai", - "openai_azure", - "mock", "anthropic", "bedrock", "cohere", - "replicate", + "deepseek", "google", "groq", - "deepseek", + "mock", + "openai", + "openai_azure", + "replicate", ]); export declare namespace ModelProviders { export type Raw = - | "openai" - | "openai_azure" - | "mock" | "anthropic" | "bedrock" | "cohere" - | "replicate" + | "deepseek" | "google" | "groq" - | "deepseek"; + | "mock" + | "openai" + | "openai_azure" + | "replicate"; } diff --git a/src/serialization/types/ReasoningEffort.ts b/src/serialization/types/OpenAiReasoningEffort.ts similarity index 50% rename from src/serialization/types/ReasoningEffort.ts rename to src/serialization/types/OpenAiReasoningEffort.ts index 17b327f4..64f74c71 100644 --- a/src/serialization/types/ReasoningEffort.ts +++ b/src/serialization/types/OpenAiReasoningEffort.ts @@ -6,9 +6,11 @@ import * as serializers from "../index"; import * as Humanloop from "../../api/index"; import * as core from "../../core"; -export const ReasoningEffort: core.serialization.Schema = - core.serialization.enum_(["high", "medium", "low"]); +export const OpenAiReasoningEffort: core.serialization.Schema< + serializers.OpenAiReasoningEffort.Raw, + Humanloop.OpenAiReasoningEffort +> = core.serialization.enum_(["high", "medium", "low"]); -export declare namespace ReasoningEffort { +export declare namespace OpenAiReasoningEffort { export type Raw = "high" | "medium" | "low"; } diff --git a/src/serialization/types/PaginatedDataAgentResponse.ts b/src/serialization/types/PaginatedDataAgentResponse.ts new file mode 100644 index 00000000..d6fe084c --- /dev/null +++ b/src/serialization/types/PaginatedDataAgentResponse.ts @@ -0,0 +1,26 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Humanloop from "../../api/index"; +import * as core from "../../core"; + +export const PaginatedDataAgentResponse: core.serialization.ObjectSchema< + serializers.PaginatedDataAgentResponse.Raw, + Humanloop.PaginatedDataAgentResponse +> = core.serialization.object({ + records: core.serialization.list(core.serialization.lazyObject(() => serializers.AgentResponse)), + page: core.serialization.number(), + size: core.serialization.number(), + total: core.serialization.number(), +}); + +export declare namespace PaginatedDataAgentResponse { + export interface Raw { + records: serializers.AgentResponse.Raw[]; + page: number; + size: number; + total: number; + } +} diff --git a/src/serialization/types/PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponse.ts b/src/serialization/types/PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseAgentResponse.ts similarity index 62% rename from src/serialization/types/PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponse.ts rename to src/serialization/types/PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseAgentResponse.ts index 1a62fe64..baab6b5c 100644 --- a/src/serialization/types/PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponse.ts +++ b/src/serialization/types/PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseAgentResponse.ts @@ -5,23 +5,23 @@ import * as serializers from "../index"; import * as Humanloop from "../../api/index"; import * as core from "../../core"; -import { PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseRecordsItem } from "./PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseRecordsItem"; +import { PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseAgentResponseRecordsItem } from "./PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseAgentResponseRecordsItem"; -export const PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponse: core.serialization.ObjectSchema< - serializers.PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponse.Raw, - Humanloop.PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponse +export const PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseAgentResponse: core.serialization.ObjectSchema< + serializers.PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseAgentResponse.Raw, + Humanloop.PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseAgentResponse > = core.serialization.object({ records: core.serialization.list( - PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseRecordsItem, + PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseAgentResponseRecordsItem, ), page: core.serialization.number(), size: core.serialization.number(), total: core.serialization.number(), }); -export declare namespace PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponse { +export declare namespace PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseAgentResponse { export interface Raw { - records: PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseRecordsItem.Raw[]; + records: PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseAgentResponseRecordsItem.Raw[]; page: number; size: number; total: number; diff --git a/src/serialization/types/PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseRecordsItem.ts b/src/serialization/types/PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseAgentResponseRecordsItem.ts similarity index 69% rename from src/serialization/types/PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseRecordsItem.ts rename to src/serialization/types/PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseAgentResponseRecordsItem.ts index 6013cb4b..c4c3188a 100644 --- a/src/serialization/types/PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseRecordsItem.ts +++ b/src/serialization/types/PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseAgentResponseRecordsItem.ts @@ -7,22 +7,24 @@ import * as Humanloop from "../../api/index"; import * as core from "../../core"; import { DatasetResponse } from "./DatasetResponse"; -export const PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseRecordsItem: core.serialization.Schema< - serializers.PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseRecordsItem.Raw, - Humanloop.PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseRecordsItem +export const PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseAgentResponseRecordsItem: core.serialization.Schema< + serializers.PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseAgentResponseRecordsItem.Raw, + Humanloop.PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseAgentResponseRecordsItem > = core.serialization.undiscriminatedUnion([ core.serialization.lazyObject(() => serializers.PromptResponse), core.serialization.lazyObject(() => serializers.ToolResponse), DatasetResponse, core.serialization.lazyObject(() => serializers.EvaluatorResponse), core.serialization.lazyObject(() => serializers.FlowResponse), + core.serialization.lazyObject(() => serializers.AgentResponse), ]); -export declare namespace PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseRecordsItem { +export declare namespace PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseAgentResponseRecordsItem { export type Raw = | serializers.PromptResponse.Raw | serializers.ToolResponse.Raw | DatasetResponse.Raw | serializers.EvaluatorResponse.Raw - | serializers.FlowResponse.Raw; + | serializers.FlowResponse.Raw + | serializers.AgentResponse.Raw; } diff --git a/src/serialization/types/PopulateTemplateResponse.ts b/src/serialization/types/PopulateTemplateResponse.ts index 513f3c14..89574558 100644 --- a/src/serialization/types/PopulateTemplateResponse.ts +++ b/src/serialization/types/PopulateTemplateResponse.ts @@ -11,12 +11,11 @@ import { TemplateLanguage } from "./TemplateLanguage"; import { ModelProviders } from "./ModelProviders"; import { PopulateTemplateResponseStop } from "./PopulateTemplateResponseStop"; import { ResponseFormat } from "./ResponseFormat"; -import { ReasoningEffort } from "./ReasoningEffort"; +import { PopulateTemplateResponseReasoningEffort } from "./PopulateTemplateResponseReasoningEffort"; import { ToolFunction } from "./ToolFunction"; import { LinkedToolResponse } from "./LinkedToolResponse"; import { EnvironmentResponse } from "./EnvironmentResponse"; import { UserResponse } from "./UserResponse"; -import { VersionStatus } from "./VersionStatus"; import { InputResponse } from "./InputResponse"; import { EvaluatorAggregate } from "./EvaluatorAggregate"; import { PopulateTemplateResponsePopulatedTemplate } from "./PopulateTemplateResponsePopulatedTemplate"; @@ -42,24 +41,26 @@ export const PopulateTemplateResponse: core.serialization.ObjectSchema< other: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), seed: core.serialization.number().optional(), responseFormat: core.serialization.property("response_format", ResponseFormat.optional()), - reasoningEffort: core.serialization.property("reasoning_effort", ReasoningEffort.optional()), + reasoningEffort: core.serialization.property( + "reasoning_effort", + PopulateTemplateResponseReasoningEffort.optional(), + ), tools: core.serialization.list(ToolFunction).optional(), linkedTools: core.serialization.property("linked_tools", core.serialization.list(LinkedToolResponse).optional()), attributes: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), - commitMessage: core.serialization.property("commit_message", core.serialization.string().optional()), + versionName: core.serialization.property("version_name", core.serialization.string().optional()), + versionDescription: core.serialization.property("version_description", core.serialization.string().optional()), description: core.serialization.string().optional(), tags: core.serialization.list(core.serialization.string()).optional(), readme: core.serialization.string().optional(), name: core.serialization.string(), + schema: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), versionId: core.serialization.property("version_id", core.serialization.string()), type: core.serialization.stringLiteral("prompt").optional(), environments: core.serialization.list(EnvironmentResponse).optional(), createdAt: core.serialization.property("created_at", core.serialization.date()), updatedAt: core.serialization.property("updated_at", core.serialization.date()), createdBy: core.serialization.property("created_by", UserResponse.optional()), - committedBy: core.serialization.property("committed_by", UserResponse.optional()), - committedAt: core.serialization.property("committed_at", core.serialization.date().optional()), - status: VersionStatus, lastUsedAt: core.serialization.property("last_used_at", core.serialization.date()), versionLogsCount: core.serialization.property("version_logs_count", core.serialization.number()), totalLogsCount: core.serialization.property("total_logs_count", core.serialization.number()), @@ -96,24 +97,23 @@ export declare namespace PopulateTemplateResponse { other?: Record | null; seed?: number | null; response_format?: ResponseFormat.Raw | null; - reasoning_effort?: ReasoningEffort.Raw | null; + reasoning_effort?: PopulateTemplateResponseReasoningEffort.Raw | null; tools?: ToolFunction.Raw[] | null; linked_tools?: LinkedToolResponse.Raw[] | null; attributes?: Record | null; - commit_message?: string | null; + version_name?: string | null; + version_description?: string | null; description?: string | null; tags?: string[] | null; readme?: string | null; name: string; + schema?: Record | null; version_id: string; type?: "prompt" | null; environments?: EnvironmentResponse.Raw[] | null; created_at: string; updated_at: string; created_by?: (UserResponse.Raw | undefined) | null; - committed_by?: (UserResponse.Raw | undefined) | null; - committed_at?: string | null; - status: VersionStatus.Raw; last_used_at: string; version_logs_count: number; total_logs_count: number; diff --git a/src/serialization/types/PopulateTemplateResponseReasoningEffort.ts b/src/serialization/types/PopulateTemplateResponseReasoningEffort.ts new file mode 100644 index 00000000..d462eda7 --- /dev/null +++ b/src/serialization/types/PopulateTemplateResponseReasoningEffort.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Humanloop from "../../api/index"; +import * as core from "../../core"; +import { OpenAiReasoningEffort } from "./OpenAiReasoningEffort"; + +export const PopulateTemplateResponseReasoningEffort: core.serialization.Schema< + serializers.PopulateTemplateResponseReasoningEffort.Raw, + Humanloop.PopulateTemplateResponseReasoningEffort +> = core.serialization.undiscriminatedUnion([OpenAiReasoningEffort, core.serialization.number()]); + +export declare namespace PopulateTemplateResponseReasoningEffort { + export type Raw = OpenAiReasoningEffort.Raw | number; +} diff --git a/src/serialization/types/PromptKernelRequest.ts b/src/serialization/types/PromptKernelRequest.ts index 9b69212c..39805926 100644 --- a/src/serialization/types/PromptKernelRequest.ts +++ b/src/serialization/types/PromptKernelRequest.ts @@ -11,7 +11,7 @@ import { TemplateLanguage } from "./TemplateLanguage"; import { ModelProviders } from "./ModelProviders"; import { PromptKernelRequestStop } from "./PromptKernelRequestStop"; import { ResponseFormat } from "./ResponseFormat"; -import { ReasoningEffort } from "./ReasoningEffort"; +import { PromptKernelRequestReasoningEffort } from "./PromptKernelRequestReasoningEffort"; import { ToolFunction } from "./ToolFunction"; export const PromptKernelRequest: core.serialization.ObjectSchema< @@ -32,7 +32,7 @@ export const PromptKernelRequest: core.serialization.ObjectSchema< other: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), seed: core.serialization.number().optional(), responseFormat: core.serialization.property("response_format", ResponseFormat.optional()), - reasoningEffort: core.serialization.property("reasoning_effort", ReasoningEffort.optional()), + reasoningEffort: core.serialization.property("reasoning_effort", PromptKernelRequestReasoningEffort.optional()), tools: core.serialization.list(ToolFunction).optional(), linkedTools: core.serialization.property( "linked_tools", @@ -57,7 +57,7 @@ export declare namespace PromptKernelRequest { other?: Record | null; seed?: number | null; response_format?: ResponseFormat.Raw | null; - reasoning_effort?: ReasoningEffort.Raw | null; + reasoning_effort?: PromptKernelRequestReasoningEffort.Raw | null; tools?: ToolFunction.Raw[] | null; linked_tools?: string[] | null; attributes?: Record | null; diff --git a/src/serialization/types/PromptKernelRequestReasoningEffort.ts b/src/serialization/types/PromptKernelRequestReasoningEffort.ts new file mode 100644 index 00000000..89806f2e --- /dev/null +++ b/src/serialization/types/PromptKernelRequestReasoningEffort.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Humanloop from "../../api/index"; +import * as core from "../../core"; +import { OpenAiReasoningEffort } from "./OpenAiReasoningEffort"; + +export const PromptKernelRequestReasoningEffort: core.serialization.Schema< + serializers.PromptKernelRequestReasoningEffort.Raw, + Humanloop.PromptKernelRequestReasoningEffort +> = core.serialization.undiscriminatedUnion([OpenAiReasoningEffort, core.serialization.number()]); + +export declare namespace PromptKernelRequestReasoningEffort { + export type Raw = OpenAiReasoningEffort.Raw | number; +} diff --git a/src/serialization/types/PromptResponse.ts b/src/serialization/types/PromptResponse.ts index 0cf6c879..04764187 100644 --- a/src/serialization/types/PromptResponse.ts +++ b/src/serialization/types/PromptResponse.ts @@ -11,12 +11,11 @@ import { TemplateLanguage } from "./TemplateLanguage"; import { ModelProviders } from "./ModelProviders"; import { PromptResponseStop } from "./PromptResponseStop"; import { ResponseFormat } from "./ResponseFormat"; -import { ReasoningEffort } from "./ReasoningEffort"; +import { PromptResponseReasoningEffort } from "./PromptResponseReasoningEffort"; import { ToolFunction } from "./ToolFunction"; import { LinkedToolResponse } from "./LinkedToolResponse"; import { EnvironmentResponse } from "./EnvironmentResponse"; import { UserResponse } from "./UserResponse"; -import { VersionStatus } from "./VersionStatus"; import { InputResponse } from "./InputResponse"; import { EvaluatorAggregate } from "./EvaluatorAggregate"; @@ -39,27 +38,26 @@ export const PromptResponse: core.serialization.ObjectSchema | null; seed?: number | null; response_format?: ResponseFormat.Raw | null; - reasoning_effort?: ReasoningEffort.Raw | null; + reasoning_effort?: PromptResponseReasoningEffort.Raw | null; tools?: ToolFunction.Raw[] | null; linked_tools?: LinkedToolResponse.Raw[] | null; attributes?: Record | null; - commit_message?: string | null; + version_name?: string | null; + version_description?: string | null; description?: string | null; tags?: string[] | null; readme?: string | null; name: string; + schema?: Record | null; version_id: string; type?: "prompt" | null; environments?: EnvironmentResponse.Raw[] | null; created_at: string; updated_at: string; created_by?: (UserResponse.Raw | undefined) | null; - committed_by?: (UserResponse.Raw | undefined) | null; - committed_at?: string | null; - status: VersionStatus.Raw; last_used_at: string; version_logs_count: number; total_logs_count: number; diff --git a/src/serialization/types/PromptResponseReasoningEffort.ts b/src/serialization/types/PromptResponseReasoningEffort.ts new file mode 100644 index 00000000..7c602915 --- /dev/null +++ b/src/serialization/types/PromptResponseReasoningEffort.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Humanloop from "../../api/index"; +import * as core from "../../core"; +import { OpenAiReasoningEffort } from "./OpenAiReasoningEffort"; + +export const PromptResponseReasoningEffort: core.serialization.Schema< + serializers.PromptResponseReasoningEffort.Raw, + Humanloop.PromptResponseReasoningEffort +> = core.serialization.undiscriminatedUnion([OpenAiReasoningEffort, core.serialization.number()]); + +export declare namespace PromptResponseReasoningEffort { + export type Raw = OpenAiReasoningEffort.Raw | number; +} diff --git a/src/serialization/types/RunVersionResponse.ts b/src/serialization/types/RunVersionResponse.ts index 68b48141..b5010bae 100644 --- a/src/serialization/types/RunVersionResponse.ts +++ b/src/serialization/types/RunVersionResponse.ts @@ -14,6 +14,7 @@ export const RunVersionResponse: core.serialization.Schema< core.serialization.lazyObject(() => serializers.ToolResponse), core.serialization.lazyObject(() => serializers.EvaluatorResponse), core.serialization.lazyObject(() => serializers.FlowResponse), + core.serialization.lazyObject(() => serializers.AgentResponse), ]); export declare namespace RunVersionResponse { @@ -21,5 +22,6 @@ export declare namespace RunVersionResponse { | serializers.PromptResponse.Raw | serializers.ToolResponse.Raw | serializers.EvaluatorResponse.Raw - | serializers.FlowResponse.Raw; + | serializers.FlowResponse.Raw + | serializers.AgentResponse.Raw; } diff --git a/src/serialization/types/StopAgentEnum.ts b/src/serialization/types/StopAgentEnum.ts new file mode 100644 index 00000000..3a34d7ff --- /dev/null +++ b/src/serialization/types/StopAgentEnum.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Humanloop from "../../api/index"; +import * as core from "../../core"; + +export const StopAgentEnum: core.serialization.Schema = + core.serialization.enum_(["none", "stop_agent"]); + +export declare namespace StopAgentEnum { + export type Raw = "none" | "stop_agent"; +} diff --git a/src/serialization/types/ToolCallResponse.ts b/src/serialization/types/ToolCallResponse.ts new file mode 100644 index 00000000..ff6eaa55 --- /dev/null +++ b/src/serialization/types/ToolCallResponse.ts @@ -0,0 +1,83 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Humanloop from "../../api/index"; +import * as core from "../../core"; +import { LogStatus } from "./LogStatus"; + +export const ToolCallResponse: core.serialization.ObjectSchema< + serializers.ToolCallResponse.Raw, + Humanloop.ToolCallResponse +> = core.serialization.object({ + startTime: core.serialization.property("start_time", core.serialization.date().optional()), + endTime: core.serialization.property("end_time", core.serialization.date().optional()), + tool: core.serialization.lazyObject(() => serializers.ToolResponse), + output: core.serialization.string().optional(), + createdAt: core.serialization.property("created_at", core.serialization.date().optional()), + error: core.serialization.string().optional(), + providerLatency: core.serialization.property("provider_latency", core.serialization.number().optional()), + stdout: core.serialization.string().optional(), + providerRequest: core.serialization.property( + "provider_request", + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + ), + providerResponse: core.serialization.property( + "provider_response", + core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + ), + inputs: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + source: core.serialization.string().optional(), + metadata: core.serialization.record(core.serialization.string(), core.serialization.unknown()).optional(), + logStatus: core.serialization.property("log_status", LogStatus.optional()), + sourceDatapointId: core.serialization.property("source_datapoint_id", core.serialization.string().optional()), + traceParentId: core.serialization.property("trace_parent_id", core.serialization.string().optional()), + batches: core.serialization.list(core.serialization.string()).optional(), + user: core.serialization.string().optional(), + environment: core.serialization.string().optional(), + save: core.serialization.boolean().optional(), + logId: core.serialization.property("log_id", core.serialization.string().optional()), + id: core.serialization.string(), + evaluatorLogs: core.serialization.property( + "evaluator_logs", + core.serialization.list(core.serialization.lazyObject(() => serializers.EvaluatorLogResponse)), + ), + traceFlowId: core.serialization.property("trace_flow_id", core.serialization.string().optional()), + traceId: core.serialization.property("trace_id", core.serialization.string().optional()), + traceChildren: core.serialization.property( + "trace_children", + core.serialization.list(core.serialization.lazy(() => serializers.LogResponse)).optional(), + ), +}); + +export declare namespace ToolCallResponse { + export interface Raw { + start_time?: string | null; + end_time?: string | null; + tool: serializers.ToolResponse.Raw; + output?: string | null; + created_at?: string | null; + error?: string | null; + provider_latency?: number | null; + stdout?: string | null; + provider_request?: Record | null; + provider_response?: Record | null; + inputs?: Record | null; + source?: string | null; + metadata?: Record | null; + log_status?: LogStatus.Raw | null; + source_datapoint_id?: string | null; + trace_parent_id?: string | null; + batches?: string[] | null; + user?: string | null; + environment?: string | null; + save?: boolean | null; + log_id?: string | null; + id: string; + evaluator_logs: serializers.EvaluatorLogResponse.Raw[]; + trace_flow_id?: string | null; + trace_id?: string | null; + trace_children?: serializers.LogResponse.Raw[] | null; + } +} diff --git a/src/serialization/types/ToolResponse.ts b/src/serialization/types/ToolResponse.ts index f173afe1..19dbc875 100644 --- a/src/serialization/types/ToolResponse.ts +++ b/src/serialization/types/ToolResponse.ts @@ -9,7 +9,6 @@ import { ToolFunction } from "./ToolFunction"; import { FilesToolType } from "./FilesToolType"; import { EnvironmentResponse } from "./EnvironmentResponse"; import { UserResponse } from "./UserResponse"; -import { VersionStatus } from "./VersionStatus"; import { InputResponse } from "./InputResponse"; import { EvaluatorAggregate } from "./EvaluatorAggregate"; @@ -26,7 +25,8 @@ export const ToolResponse: core.serialization.ObjectSchema | null; attributes?: Record | null; tool_type?: FilesToolType.Raw | null; - commit_message?: string | null; + version_name?: string | null; + version_description?: string | null; name: string; description?: string | null; readme?: string | null; @@ -75,9 +73,6 @@ export declare namespace ToolResponse { created_at: string; updated_at: string; created_by?: (UserResponse.Raw | undefined) | null; - committed_by?: (UserResponse.Raw | undefined) | null; - committed_at?: string | null; - status: VersionStatus.Raw; last_used_at: string; version_logs_count: number; total_logs_count: number; diff --git a/src/serialization/types/UpdateVersionRequest.ts b/src/serialization/types/UpdateVersionRequest.ts new file mode 100644 index 00000000..59f426ea --- /dev/null +++ b/src/serialization/types/UpdateVersionRequest.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../index"; +import * as Humanloop from "../../api/index"; +import * as core from "../../core"; + +export const UpdateVersionRequest: core.serialization.ObjectSchema< + serializers.UpdateVersionRequest.Raw, + Humanloop.UpdateVersionRequest +> = core.serialization.object({ + name: core.serialization.string().optional(), + description: core.serialization.string().optional(), +}); + +export declare namespace UpdateVersionRequest { + export interface Raw { + name?: string | null; + description?: string | null; + } +} diff --git a/src/serialization/types/VersionDeploymentResponseFile.ts b/src/serialization/types/VersionDeploymentResponseFile.ts index 3ca1d69b..4e77d802 100644 --- a/src/serialization/types/VersionDeploymentResponseFile.ts +++ b/src/serialization/types/VersionDeploymentResponseFile.ts @@ -16,6 +16,7 @@ export const VersionDeploymentResponseFile: core.serialization.Schema< DatasetResponse, core.serialization.lazyObject(() => serializers.EvaluatorResponse), core.serialization.lazyObject(() => serializers.FlowResponse), + core.serialization.lazyObject(() => serializers.AgentResponse), ]); export declare namespace VersionDeploymentResponseFile { @@ -24,5 +25,6 @@ export declare namespace VersionDeploymentResponseFile { | serializers.ToolResponse.Raw | DatasetResponse.Raw | serializers.EvaluatorResponse.Raw - | serializers.FlowResponse.Raw; + | serializers.FlowResponse.Raw + | serializers.AgentResponse.Raw; } diff --git a/src/serialization/types/VersionIdResponseVersion.ts b/src/serialization/types/VersionIdResponseVersion.ts index 45b95dda..8c4e93ed 100644 --- a/src/serialization/types/VersionIdResponseVersion.ts +++ b/src/serialization/types/VersionIdResponseVersion.ts @@ -16,6 +16,7 @@ export const VersionIdResponseVersion: core.serialization.Schema< DatasetResponse, core.serialization.lazyObject(() => serializers.EvaluatorResponse), core.serialization.lazyObject(() => serializers.FlowResponse), + core.serialization.lazyObject(() => serializers.AgentResponse), ]); export declare namespace VersionIdResponseVersion { @@ -24,5 +25,6 @@ export declare namespace VersionIdResponseVersion { | serializers.ToolResponse.Raw | DatasetResponse.Raw | serializers.EvaluatorResponse.Raw - | serializers.FlowResponse.Raw; + | serializers.FlowResponse.Raw + | serializers.AgentResponse.Raw; } diff --git a/src/serialization/types/index.ts b/src/serialization/types/index.ts index bd8e7f02..f6c0d48b 100644 --- a/src/serialization/types/index.ts +++ b/src/serialization/types/index.ts @@ -1,10 +1,38 @@ +export * from "./AgentCallResponseToolChoice"; +export * from "./AgentCallResponse"; +export * from "./AgentCallStreamResponsePayload"; +export * from "./AgentCallStreamResponse"; +export * from "./AgentContinueResponseToolChoice"; +export * from "./AgentContinueResponse"; +export * from "./AgentContinueStreamResponsePayload"; +export * from "./AgentContinueStreamResponse"; +export * from "./AgentInlineTool"; +export * from "./AgentKernelRequestTemplate"; +export * from "./AgentKernelRequestStop"; +export * from "./AgentKernelRequestReasoningEffort"; +export * from "./AgentKernelRequestToolsItem"; +export * from "./AgentKernelRequest"; +export * from "./AgentLinkedFileRequest"; +export * from "./AgentLinkedFileResponseFile"; +export * from "./AgentLinkedFileResponse"; +export * from "./AgentLogResponseToolChoice"; +export * from "./AgentLogResponse"; +export * from "./AgentLogStreamResponse"; +export * from "./AgentResponseTemplate"; +export * from "./AgentResponseStop"; +export * from "./AgentResponseReasoningEffort"; +export * from "./AgentResponseToolsItem"; +export * from "./AgentResponse"; +export * from "./AnthropicRedactedThinkingContent"; +export * from "./AnthropicThinkingContent"; export * from "./BooleanEvaluatorStatsResponse"; export * from "./ChatMessageContentItem"; export * from "./ChatMessageContent"; +export * from "./ChatMessageThinkingItem"; export * from "./ChatMessage"; export * from "./ChatRole"; export * from "./CodeEvaluatorRequest"; -export * from "./CommitRequest"; +export * from "./CreateAgentLogResponse"; export * from "./CreateDatapointRequestTargetValue"; export * from "./CreateDatapointRequest"; export * from "./CreateEvaluatorLogResponse"; @@ -44,9 +72,11 @@ export * from "./EvaluatorResponseSpec"; export * from "./EvaluatorResponse"; export * from "./EvaluatorReturnTypeEnum"; export * from "./EvaluatorVersionId"; +export * from "./EventType"; export * from "./ExternalEvaluatorRequest"; export * from "./FileEnvironmentResponseFile"; export * from "./FileEnvironmentResponse"; +export * from "./FileEnvironmentVariableRequest"; export * from "./FileId"; export * from "./FilePath"; export * from "./FileRequest"; @@ -64,7 +94,9 @@ export * from "./ImageUrlDetail"; export * from "./ImageUrl"; export * from "./InputResponse"; export * from "./LlmEvaluatorRequest"; +export * from "./LinkedFileRequest"; export * from "./LinkedToolResponse"; +export * from "./ListAgents"; export * from "./ListDatasets"; export * from "./ListEvaluators"; export * from "./ListFlows"; @@ -72,6 +104,7 @@ export * from "./ListPrompts"; export * from "./ListTools"; export * from "./LogResponse"; export * from "./LogStatus"; +export * from "./LogStreamResponse"; export * from "./ModelEndpoints"; export * from "./ModelProviders"; export * from "./MonitoringEvaluatorEnvironmentRequest"; @@ -80,7 +113,9 @@ export * from "./MonitoringEvaluatorState"; export * from "./MonitoringEvaluatorVersionRequest"; export * from "./NumericEvaluatorStatsResponse"; export * from "./ObservabilityStatus"; +export * from "./OpenAiReasoningEffort"; export * from "./OverallStats"; +export * from "./PaginatedDataAgentResponse"; export * from "./PaginatedDatapointResponse"; export * from "./PaginatedDatasetResponse"; export * from "./PaginatedDataEvaluationLogResponse"; @@ -90,11 +125,12 @@ export * from "./PaginatedDataFlowResponse"; export * from "./PaginatedDataLogResponse"; export * from "./PaginatedDataPromptResponse"; export * from "./PaginatedDataToolResponse"; -export * from "./PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseRecordsItem"; -export * from "./PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponse"; +export * from "./PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseAgentResponseRecordsItem"; +export * from "./PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponseAgentResponse"; export * from "./PlatformAccessEnum"; export * from "./PopulateTemplateResponseTemplate"; export * from "./PopulateTemplateResponseStop"; +export * from "./PopulateTemplateResponseReasoningEffort"; export * from "./PopulateTemplateResponsePopulatedTemplate"; export * from "./PopulateTemplateResponse"; export * from "./ProjectSortBy"; @@ -104,14 +140,15 @@ export * from "./PromptCallResponse"; export * from "./PromptCallStreamResponse"; export * from "./PromptKernelRequestTemplate"; export * from "./PromptKernelRequestStop"; +export * from "./PromptKernelRequestReasoningEffort"; export * from "./PromptKernelRequest"; export * from "./PromptLogResponseToolChoice"; export * from "./PromptLogResponse"; export * from "./PromptResponseTemplate"; export * from "./PromptResponseStop"; +export * from "./PromptResponseReasoningEffort"; export * from "./PromptResponse"; export * from "./ProviderApiKeys"; -export * from "./ReasoningEffort"; export * from "./ResponseFormatType"; export * from "./ResponseFormat"; export * from "./RunStatsResponseEvaluatorStatsItem"; @@ -119,17 +156,20 @@ export * from "./RunStatsResponse"; export * from "./RunVersionResponse"; export * from "./SelectEvaluatorStatsResponse"; export * from "./SortOrder"; +export * from "./StopAgentEnum"; export * from "./TemplateLanguage"; export * from "./TextChatContent"; export * from "./TextEvaluatorStatsResponse"; export * from "./TimeUnit"; export * from "./ToolCall"; +export * from "./ToolCallResponse"; export * from "./ToolChoice"; export * from "./ToolFunction"; export * from "./ToolKernelRequest"; export * from "./ToolLogResponse"; export * from "./ToolResponse"; export * from "./UpdateDatesetAction"; +export * from "./UpdateVersionRequest"; export * from "./UserResponse"; export * from "./Valence"; export * from "./ValidationErrorLocItem"; diff --git a/src/version.ts b/src/version.ts index e7c688c9..fa30d486 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const SDK_VERSION = "0.8.18"; +export const SDK_VERSION = "0.8.20"; diff --git a/yarn.lock b/yarn.lock index f793f89d..ac9c30b1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -79,379 +79,381 @@ "@smithy/util-utf8" "^2.0.0" tslib "^2.6.2" -"@aws-sdk/client-cognito-identity@3.768.0": - version "3.768.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-cognito-identity/-/client-cognito-identity-3.768.0.tgz#4bba03bb29c68312895770b3ac36bc039f038ba3" - integrity sha512-h/WOvKhuXVIhNKjDcsF6oY2oJuBusspnmEaX20h+GUzIrNMlf6qkJrWziT58KzzESyzeYZcGNWjcOfbVRpH6NA== +"@aws-sdk/client-cognito-identity@3.787.0": + version "3.787.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/client-cognito-identity/-/client-cognito-identity-3.787.0.tgz#15e631b425fb32865e0479b9e47138125b7dcd43" + integrity sha512-7v6nywZ5wcQxX7qdZ5M1ld15QdkzLU6fAKiEqbvJKu4dM8cFW6As+DbS990Mg46pp1xM/yvme+51xZDTfTfJZA== dependencies: "@aws-crypto/sha256-browser" "5.2.0" "@aws-crypto/sha256-js" "5.2.0" - "@aws-sdk/core" "3.758.0" - "@aws-sdk/credential-provider-node" "3.758.0" - "@aws-sdk/middleware-host-header" "3.734.0" - "@aws-sdk/middleware-logger" "3.734.0" - "@aws-sdk/middleware-recursion-detection" "3.734.0" - "@aws-sdk/middleware-user-agent" "3.758.0" - "@aws-sdk/region-config-resolver" "3.734.0" - "@aws-sdk/types" "3.734.0" - "@aws-sdk/util-endpoints" "3.743.0" - "@aws-sdk/util-user-agent-browser" "3.734.0" - "@aws-sdk/util-user-agent-node" "3.758.0" - "@smithy/config-resolver" "^4.0.1" - "@smithy/core" "^3.1.5" - "@smithy/fetch-http-handler" "^5.0.1" - "@smithy/hash-node" "^4.0.1" - "@smithy/invalid-dependency" "^4.0.1" - "@smithy/middleware-content-length" "^4.0.1" - "@smithy/middleware-endpoint" "^4.0.6" - "@smithy/middleware-retry" "^4.0.7" - "@smithy/middleware-serde" "^4.0.2" - "@smithy/middleware-stack" "^4.0.1" - "@smithy/node-config-provider" "^4.0.1" - "@smithy/node-http-handler" "^4.0.3" - "@smithy/protocol-http" "^5.0.1" - "@smithy/smithy-client" "^4.1.6" - "@smithy/types" "^4.1.0" - "@smithy/url-parser" "^4.0.1" + "@aws-sdk/core" "3.775.0" + "@aws-sdk/credential-provider-node" "3.787.0" + "@aws-sdk/middleware-host-header" "3.775.0" + "@aws-sdk/middleware-logger" "3.775.0" + "@aws-sdk/middleware-recursion-detection" "3.775.0" + "@aws-sdk/middleware-user-agent" "3.787.0" + "@aws-sdk/region-config-resolver" "3.775.0" + "@aws-sdk/types" "3.775.0" + "@aws-sdk/util-endpoints" "3.787.0" + "@aws-sdk/util-user-agent-browser" "3.775.0" + "@aws-sdk/util-user-agent-node" "3.787.0" + "@smithy/config-resolver" "^4.1.0" + "@smithy/core" "^3.2.0" + "@smithy/fetch-http-handler" "^5.0.2" + "@smithy/hash-node" "^4.0.2" + "@smithy/invalid-dependency" "^4.0.2" + "@smithy/middleware-content-length" "^4.0.2" + "@smithy/middleware-endpoint" "^4.1.0" + "@smithy/middleware-retry" "^4.1.0" + "@smithy/middleware-serde" "^4.0.3" + "@smithy/middleware-stack" "^4.0.2" + "@smithy/node-config-provider" "^4.0.2" + "@smithy/node-http-handler" "^4.0.4" + "@smithy/protocol-http" "^5.1.0" + "@smithy/smithy-client" "^4.2.0" + "@smithy/types" "^4.2.0" + "@smithy/url-parser" "^4.0.2" "@smithy/util-base64" "^4.0.0" "@smithy/util-body-length-browser" "^4.0.0" "@smithy/util-body-length-node" "^4.0.0" - "@smithy/util-defaults-mode-browser" "^4.0.7" - "@smithy/util-defaults-mode-node" "^4.0.7" - "@smithy/util-endpoints" "^3.0.1" - "@smithy/util-middleware" "^4.0.1" - "@smithy/util-retry" "^4.0.1" + "@smithy/util-defaults-mode-browser" "^4.0.8" + "@smithy/util-defaults-mode-node" "^4.0.8" + "@smithy/util-endpoints" "^3.0.2" + "@smithy/util-middleware" "^4.0.2" + "@smithy/util-retry" "^4.0.2" "@smithy/util-utf8" "^4.0.0" tslib "^2.6.2" "@aws-sdk/client-sagemaker@^3.583.0": - version "3.760.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-sagemaker/-/client-sagemaker-3.760.0.tgz#6169a4ace2be25963023b5e8becfa6741020d037" - integrity sha512-j8eUcrPcC6NrcJeMOy+AFnFJJXtJSy5P7+4JXsWcJKjXgdxQjDva1OQpgxweyMS4rDSDfIme3+gVxJKsjXuL7A== + version "3.787.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/client-sagemaker/-/client-sagemaker-3.787.0.tgz#9b43558b00977fc68e1a3885211feee1702bdfb5" + integrity sha512-uHmF6MiMus+OjFfVnkYs46CkExjUp6kZGB/gFjwiq5IU+DGnkIlmfbOlRuIlLflqPuADPcbiTiNi4IjluHGqVA== dependencies: "@aws-crypto/sha256-browser" "5.2.0" "@aws-crypto/sha256-js" "5.2.0" - "@aws-sdk/core" "3.758.0" - "@aws-sdk/credential-provider-node" "3.758.0" - "@aws-sdk/middleware-host-header" "3.734.0" - "@aws-sdk/middleware-logger" "3.734.0" - "@aws-sdk/middleware-recursion-detection" "3.734.0" - "@aws-sdk/middleware-user-agent" "3.758.0" - "@aws-sdk/region-config-resolver" "3.734.0" - "@aws-sdk/types" "3.734.0" - "@aws-sdk/util-endpoints" "3.743.0" - "@aws-sdk/util-user-agent-browser" "3.734.0" - "@aws-sdk/util-user-agent-node" "3.758.0" - "@smithy/config-resolver" "^4.0.1" - "@smithy/core" "^3.1.5" - "@smithy/fetch-http-handler" "^5.0.1" - "@smithy/hash-node" "^4.0.1" - "@smithy/invalid-dependency" "^4.0.1" - "@smithy/middleware-content-length" "^4.0.1" - "@smithy/middleware-endpoint" "^4.0.6" - "@smithy/middleware-retry" "^4.0.7" - "@smithy/middleware-serde" "^4.0.2" - "@smithy/middleware-stack" "^4.0.1" - "@smithy/node-config-provider" "^4.0.1" - "@smithy/node-http-handler" "^4.0.3" - "@smithy/protocol-http" "^5.0.1" - "@smithy/smithy-client" "^4.1.6" - "@smithy/types" "^4.1.0" - "@smithy/url-parser" "^4.0.1" + "@aws-sdk/core" "3.775.0" + "@aws-sdk/credential-provider-node" "3.787.0" + "@aws-sdk/middleware-host-header" "3.775.0" + "@aws-sdk/middleware-logger" "3.775.0" + "@aws-sdk/middleware-recursion-detection" "3.775.0" + "@aws-sdk/middleware-user-agent" "3.787.0" + "@aws-sdk/region-config-resolver" "3.775.0" + "@aws-sdk/types" "3.775.0" + "@aws-sdk/util-endpoints" "3.787.0" + "@aws-sdk/util-user-agent-browser" "3.775.0" + "@aws-sdk/util-user-agent-node" "3.787.0" + "@smithy/config-resolver" "^4.1.0" + "@smithy/core" "^3.2.0" + "@smithy/fetch-http-handler" "^5.0.2" + "@smithy/hash-node" "^4.0.2" + "@smithy/invalid-dependency" "^4.0.2" + "@smithy/middleware-content-length" "^4.0.2" + "@smithy/middleware-endpoint" "^4.1.0" + "@smithy/middleware-retry" "^4.1.0" + "@smithy/middleware-serde" "^4.0.3" + "@smithy/middleware-stack" "^4.0.2" + "@smithy/node-config-provider" "^4.0.2" + "@smithy/node-http-handler" "^4.0.4" + "@smithy/protocol-http" "^5.1.0" + "@smithy/smithy-client" "^4.2.0" + "@smithy/types" "^4.2.0" + "@smithy/url-parser" "^4.0.2" "@smithy/util-base64" "^4.0.0" "@smithy/util-body-length-browser" "^4.0.0" "@smithy/util-body-length-node" "^4.0.0" - "@smithy/util-defaults-mode-browser" "^4.0.7" - "@smithy/util-defaults-mode-node" "^4.0.7" - "@smithy/util-endpoints" "^3.0.1" - "@smithy/util-middleware" "^4.0.1" - "@smithy/util-retry" "^4.0.1" + "@smithy/util-defaults-mode-browser" "^4.0.8" + "@smithy/util-defaults-mode-node" "^4.0.8" + "@smithy/util-endpoints" "^3.0.2" + "@smithy/util-middleware" "^4.0.2" + "@smithy/util-retry" "^4.0.2" "@smithy/util-utf8" "^4.0.0" - "@smithy/util-waiter" "^4.0.2" + "@smithy/util-waiter" "^4.0.3" "@types/uuid" "^9.0.1" tslib "^2.6.2" uuid "^9.0.1" -"@aws-sdk/client-sso@3.758.0": - version "3.758.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/client-sso/-/client-sso-3.758.0.tgz#59a249abdfa52125fbe98b1d59c11e4f08ca6527" - integrity sha512-BoGO6IIWrLyLxQG6txJw6RT2urmbtlwfggapNCrNPyYjlXpzTSJhBYjndg7TpDATFd0SXL0zm8y/tXsUXNkdYQ== +"@aws-sdk/client-sso@3.787.0": + version "3.787.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/client-sso/-/client-sso-3.787.0.tgz#39f1182296b586cb957b449b5f0dabd8f378cf1a" + integrity sha512-L8R+Mh258G0DC73ktpSVrG4TT9i2vmDLecARTDR/4q5sRivdDQSL5bUp3LKcK80Bx+FRw3UETIlX6mYMLL9PJQ== dependencies: "@aws-crypto/sha256-browser" "5.2.0" "@aws-crypto/sha256-js" "5.2.0" - "@aws-sdk/core" "3.758.0" - "@aws-sdk/middleware-host-header" "3.734.0" - "@aws-sdk/middleware-logger" "3.734.0" - "@aws-sdk/middleware-recursion-detection" "3.734.0" - "@aws-sdk/middleware-user-agent" "3.758.0" - "@aws-sdk/region-config-resolver" "3.734.0" - "@aws-sdk/types" "3.734.0" - "@aws-sdk/util-endpoints" "3.743.0" - "@aws-sdk/util-user-agent-browser" "3.734.0" - "@aws-sdk/util-user-agent-node" "3.758.0" - "@smithy/config-resolver" "^4.0.1" - "@smithy/core" "^3.1.5" - "@smithy/fetch-http-handler" "^5.0.1" - "@smithy/hash-node" "^4.0.1" - "@smithy/invalid-dependency" "^4.0.1" - "@smithy/middleware-content-length" "^4.0.1" - "@smithy/middleware-endpoint" "^4.0.6" - "@smithy/middleware-retry" "^4.0.7" - "@smithy/middleware-serde" "^4.0.2" - "@smithy/middleware-stack" "^4.0.1" - "@smithy/node-config-provider" "^4.0.1" - "@smithy/node-http-handler" "^4.0.3" - "@smithy/protocol-http" "^5.0.1" - "@smithy/smithy-client" "^4.1.6" - "@smithy/types" "^4.1.0" - "@smithy/url-parser" "^4.0.1" + "@aws-sdk/core" "3.775.0" + "@aws-sdk/middleware-host-header" "3.775.0" + "@aws-sdk/middleware-logger" "3.775.0" + "@aws-sdk/middleware-recursion-detection" "3.775.0" + "@aws-sdk/middleware-user-agent" "3.787.0" + "@aws-sdk/region-config-resolver" "3.775.0" + "@aws-sdk/types" "3.775.0" + "@aws-sdk/util-endpoints" "3.787.0" + "@aws-sdk/util-user-agent-browser" "3.775.0" + "@aws-sdk/util-user-agent-node" "3.787.0" + "@smithy/config-resolver" "^4.1.0" + "@smithy/core" "^3.2.0" + "@smithy/fetch-http-handler" "^5.0.2" + "@smithy/hash-node" "^4.0.2" + "@smithy/invalid-dependency" "^4.0.2" + "@smithy/middleware-content-length" "^4.0.2" + "@smithy/middleware-endpoint" "^4.1.0" + "@smithy/middleware-retry" "^4.1.0" + "@smithy/middleware-serde" "^4.0.3" + "@smithy/middleware-stack" "^4.0.2" + "@smithy/node-config-provider" "^4.0.2" + "@smithy/node-http-handler" "^4.0.4" + "@smithy/protocol-http" "^5.1.0" + "@smithy/smithy-client" "^4.2.0" + "@smithy/types" "^4.2.0" + "@smithy/url-parser" "^4.0.2" "@smithy/util-base64" "^4.0.0" "@smithy/util-body-length-browser" "^4.0.0" "@smithy/util-body-length-node" "^4.0.0" - "@smithy/util-defaults-mode-browser" "^4.0.7" - "@smithy/util-defaults-mode-node" "^4.0.7" - "@smithy/util-endpoints" "^3.0.1" - "@smithy/util-middleware" "^4.0.1" - "@smithy/util-retry" "^4.0.1" + "@smithy/util-defaults-mode-browser" "^4.0.8" + "@smithy/util-defaults-mode-node" "^4.0.8" + "@smithy/util-endpoints" "^3.0.2" + "@smithy/util-middleware" "^4.0.2" + "@smithy/util-retry" "^4.0.2" "@smithy/util-utf8" "^4.0.0" tslib "^2.6.2" -"@aws-sdk/core@3.758.0": - version "3.758.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/core/-/core-3.758.0.tgz#d13a4bb95de0460d5269cd5a40503c85b344b0b4" - integrity sha512-0RswbdR9jt/XKemaLNuxi2gGr4xGlHyGxkTdhSQzCyUe9A9OPCoLl3rIESRguQEech+oJnbHk/wuiwHqTuP9sg== - dependencies: - "@aws-sdk/types" "3.734.0" - "@smithy/core" "^3.1.5" - "@smithy/node-config-provider" "^4.0.1" - "@smithy/property-provider" "^4.0.1" - "@smithy/protocol-http" "^5.0.1" - "@smithy/signature-v4" "^5.0.1" - "@smithy/smithy-client" "^4.1.6" - "@smithy/types" "^4.1.0" - "@smithy/util-middleware" "^4.0.1" +"@aws-sdk/core@3.775.0": + version "3.775.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/core/-/core-3.775.0.tgz#5d22ba78f07c07b48fb4d5b18172b9a896c0cbd0" + integrity sha512-8vpW4WihVfz0DX+7WnnLGm3GuQER++b0IwQG35JlQMlgqnc44M//KbJPsIHA0aJUJVwJAEShgfr5dUbY8WUzaA== + dependencies: + "@aws-sdk/types" "3.775.0" + "@smithy/core" "^3.2.0" + "@smithy/node-config-provider" "^4.0.2" + "@smithy/property-provider" "^4.0.2" + "@smithy/protocol-http" "^5.1.0" + "@smithy/signature-v4" "^5.0.2" + "@smithy/smithy-client" "^4.2.0" + "@smithy/types" "^4.2.0" + "@smithy/util-middleware" "^4.0.2" fast-xml-parser "4.4.1" tslib "^2.6.2" -"@aws-sdk/credential-provider-cognito-identity@3.768.0": - version "3.768.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-cognito-identity/-/credential-provider-cognito-identity-3.768.0.tgz#457f5618c9fbe7494f187a7f0e11a4bdd97e22b3" - integrity sha512-nNBN+lb2N8Odi0abHln60HqA4z0+UsBw8j7XU+ElEi5E2qOBCJSkLIFDIcYfn+j88FP2oLiQlOPe7H8pav5ayQ== +"@aws-sdk/credential-provider-cognito-identity@3.787.0": + version "3.787.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-cognito-identity/-/credential-provider-cognito-identity-3.787.0.tgz#3c19fe9eb001d2b20adb793776a9fedc68684d39" + integrity sha512-nF5XjgvZHFuyttOeTjMgfEsg6slZPQ6uI34yzq12Kq4icFgcD4bQsijnQClMN7A0u5qR8Ad8kume4b7+I2++Ig== dependencies: - "@aws-sdk/client-cognito-identity" "3.768.0" - "@aws-sdk/types" "3.734.0" - "@smithy/property-provider" "^4.0.1" - "@smithy/types" "^4.1.0" + "@aws-sdk/client-cognito-identity" "3.787.0" + "@aws-sdk/types" "3.775.0" + "@smithy/property-provider" "^4.0.2" + "@smithy/types" "^4.2.0" tslib "^2.6.2" -"@aws-sdk/credential-provider-env@3.758.0": - version "3.758.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-env/-/credential-provider-env-3.758.0.tgz#6193d1607eedd0929640ff64013f7787f29ff6a1" - integrity sha512-N27eFoRrO6MeUNumtNHDW9WOiwfd59LPXPqDrIa3kWL/s+fOKFHb9xIcF++bAwtcZnAxKkgpDCUP+INNZskE+w== +"@aws-sdk/credential-provider-env@3.775.0": + version "3.775.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-env/-/credential-provider-env-3.775.0.tgz#b8c81818f4c62d89b5f04dc410ab9b48e954f22c" + integrity sha512-6ESVxwCbGm7WZ17kY1fjmxQud43vzJFoLd4bmlR+idQSWdqlzGDYdcfzpjDKTcivdtNrVYmFvcH1JBUwCRAZhw== dependencies: - "@aws-sdk/core" "3.758.0" - "@aws-sdk/types" "3.734.0" - "@smithy/property-provider" "^4.0.1" - "@smithy/types" "^4.1.0" + "@aws-sdk/core" "3.775.0" + "@aws-sdk/types" "3.775.0" + "@smithy/property-provider" "^4.0.2" + "@smithy/types" "^4.2.0" tslib "^2.6.2" -"@aws-sdk/credential-provider-http@3.758.0": - version "3.758.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-http/-/credential-provider-http-3.758.0.tgz#f7b28d642f2ac933e81a7add08ce582b398c1635" - integrity sha512-Xt9/U8qUCiw1hihztWkNeIR+arg6P+yda10OuCHX6kFVx3auTlU7+hCqs3UxqniGU4dguHuftf3mRpi5/GJ33Q== - dependencies: - "@aws-sdk/core" "3.758.0" - "@aws-sdk/types" "3.734.0" - "@smithy/fetch-http-handler" "^5.0.1" - "@smithy/node-http-handler" "^4.0.3" - "@smithy/property-provider" "^4.0.1" - "@smithy/protocol-http" "^5.0.1" - "@smithy/smithy-client" "^4.1.6" - "@smithy/types" "^4.1.0" - "@smithy/util-stream" "^4.1.2" +"@aws-sdk/credential-provider-http@3.775.0": + version "3.775.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-http/-/credential-provider-http-3.775.0.tgz#0fbc7f4e6cada37fc9b647de0d7c12a42a44bcc6" + integrity sha512-PjDQeDH/J1S0yWV32wCj2k5liRo0ssXMseCBEkCsD3SqsU8o5cU82b0hMX4sAib/RkglCSZqGO0xMiN0/7ndww== + dependencies: + "@aws-sdk/core" "3.775.0" + "@aws-sdk/types" "3.775.0" + "@smithy/fetch-http-handler" "^5.0.2" + "@smithy/node-http-handler" "^4.0.4" + "@smithy/property-provider" "^4.0.2" + "@smithy/protocol-http" "^5.1.0" + "@smithy/smithy-client" "^4.2.0" + "@smithy/types" "^4.2.0" + "@smithy/util-stream" "^4.2.0" tslib "^2.6.2" -"@aws-sdk/credential-provider-ini@3.758.0": - version "3.758.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.758.0.tgz#66457e71d8f5013e18111b25629c2367ed8ef116" - integrity sha512-cymSKMcP5d+OsgetoIZ5QCe1wnp2Q/tq+uIxVdh9MbfdBBEnl9Ecq6dH6VlYS89sp4QKuxHxkWXVnbXU3Q19Aw== - dependencies: - "@aws-sdk/core" "3.758.0" - "@aws-sdk/credential-provider-env" "3.758.0" - "@aws-sdk/credential-provider-http" "3.758.0" - "@aws-sdk/credential-provider-process" "3.758.0" - "@aws-sdk/credential-provider-sso" "3.758.0" - "@aws-sdk/credential-provider-web-identity" "3.758.0" - "@aws-sdk/nested-clients" "3.758.0" - "@aws-sdk/types" "3.734.0" - "@smithy/credential-provider-imds" "^4.0.1" - "@smithy/property-provider" "^4.0.1" - "@smithy/shared-ini-file-loader" "^4.0.1" - "@smithy/types" "^4.1.0" +"@aws-sdk/credential-provider-ini@3.787.0": + version "3.787.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.787.0.tgz#906ece004141462ae695504b6c07d1200688fd6c" + integrity sha512-hc2taRoDlXn2uuNuHWDJljVWYrp3r9JF1a/8XmOAZhVUNY+ImeeStylHXhXXKEA4JOjW+5PdJj0f1UDkVCHJiQ== + dependencies: + "@aws-sdk/core" "3.775.0" + "@aws-sdk/credential-provider-env" "3.775.0" + "@aws-sdk/credential-provider-http" "3.775.0" + "@aws-sdk/credential-provider-process" "3.775.0" + "@aws-sdk/credential-provider-sso" "3.787.0" + "@aws-sdk/credential-provider-web-identity" "3.787.0" + "@aws-sdk/nested-clients" "3.787.0" + "@aws-sdk/types" "3.775.0" + "@smithy/credential-provider-imds" "^4.0.2" + "@smithy/property-provider" "^4.0.2" + "@smithy/shared-ini-file-loader" "^4.0.2" + "@smithy/types" "^4.2.0" tslib "^2.6.2" -"@aws-sdk/credential-provider-node@3.758.0": - version "3.758.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-node/-/credential-provider-node-3.758.0.tgz#b0a5d18e5d7f1b091fd891e2e8088578c0246cef" - integrity sha512-+DaMv63wiq7pJrhIQzZYMn4hSarKiizDoJRvyR7WGhnn0oQ/getX9Z0VNCV3i7lIFoLNTb7WMmQ9k7+z/uD5EQ== - dependencies: - "@aws-sdk/credential-provider-env" "3.758.0" - "@aws-sdk/credential-provider-http" "3.758.0" - "@aws-sdk/credential-provider-ini" "3.758.0" - "@aws-sdk/credential-provider-process" "3.758.0" - "@aws-sdk/credential-provider-sso" "3.758.0" - "@aws-sdk/credential-provider-web-identity" "3.758.0" - "@aws-sdk/types" "3.734.0" - "@smithy/credential-provider-imds" "^4.0.1" - "@smithy/property-provider" "^4.0.1" - "@smithy/shared-ini-file-loader" "^4.0.1" - "@smithy/types" "^4.1.0" +"@aws-sdk/credential-provider-node@3.787.0": + version "3.787.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-node/-/credential-provider-node-3.787.0.tgz#3e5cdafb0fecca25b7430f848cbca85000b25c33" + integrity sha512-JioVi44B1vDMaK2CdzqimwvJD3uzvzbQhaEWXsGMBcMcNHajXAXf08EF50JG3ZhLrhhUsT1ObXpbTaPINOhh+g== + dependencies: + "@aws-sdk/credential-provider-env" "3.775.0" + "@aws-sdk/credential-provider-http" "3.775.0" + "@aws-sdk/credential-provider-ini" "3.787.0" + "@aws-sdk/credential-provider-process" "3.775.0" + "@aws-sdk/credential-provider-sso" "3.787.0" + "@aws-sdk/credential-provider-web-identity" "3.787.0" + "@aws-sdk/types" "3.775.0" + "@smithy/credential-provider-imds" "^4.0.2" + "@smithy/property-provider" "^4.0.2" + "@smithy/shared-ini-file-loader" "^4.0.2" + "@smithy/types" "^4.2.0" tslib "^2.6.2" -"@aws-sdk/credential-provider-process@3.758.0": - version "3.758.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-process/-/credential-provider-process-3.758.0.tgz#563bfae58049afd9968ca60f61672753834ff506" - integrity sha512-AzcY74QTPqcbXWVgjpPZ3HOmxQZYPROIBz2YINF0OQk0MhezDWV/O7Xec+K1+MPGQO3qS6EDrUUlnPLjsqieHA== +"@aws-sdk/credential-provider-process@3.775.0": + version "3.775.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-process/-/credential-provider-process-3.775.0.tgz#7ab90383f12461c5d20546e933924e654660542b" + integrity sha512-A6k68H9rQp+2+7P7SGO90Csw6nrUEm0Qfjpn9Etc4EboZhhCLs9b66umUsTsSBHus4FDIe5JQxfCUyt1wgNogg== dependencies: - "@aws-sdk/core" "3.758.0" - "@aws-sdk/types" "3.734.0" - "@smithy/property-provider" "^4.0.1" - "@smithy/shared-ini-file-loader" "^4.0.1" - "@smithy/types" "^4.1.0" + "@aws-sdk/core" "3.775.0" + "@aws-sdk/types" "3.775.0" + "@smithy/property-provider" "^4.0.2" + "@smithy/shared-ini-file-loader" "^4.0.2" + "@smithy/types" "^4.2.0" tslib "^2.6.2" -"@aws-sdk/credential-provider-sso@3.758.0": - version "3.758.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.758.0.tgz#5098c196a2dd38ba467aca052fc5193476b8a404" - integrity sha512-x0FYJqcOLUCv8GLLFDYMXRAQKGjoM+L0BG4BiHYZRDf24yQWFCAZsCQAYKo6XZYh2qznbsW6f//qpyJ5b0QVKQ== - dependencies: - "@aws-sdk/client-sso" "3.758.0" - "@aws-sdk/core" "3.758.0" - "@aws-sdk/token-providers" "3.758.0" - "@aws-sdk/types" "3.734.0" - "@smithy/property-provider" "^4.0.1" - "@smithy/shared-ini-file-loader" "^4.0.1" - "@smithy/types" "^4.1.0" +"@aws-sdk/credential-provider-sso@3.787.0": + version "3.787.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.787.0.tgz#77ab6c01e4497d7ff2e6c7f081f3d8695744884b" + integrity sha512-fHc08bsvwm4+dEMEQKnQ7c1irEQmmxbgS+Fq41y09pPvPh31nAhoMcjBSTWAaPHvvsRbTYvmP4Mf12ZGr8/nfg== + dependencies: + "@aws-sdk/client-sso" "3.787.0" + "@aws-sdk/core" "3.775.0" + "@aws-sdk/token-providers" "3.787.0" + "@aws-sdk/types" "3.775.0" + "@smithy/property-provider" "^4.0.2" + "@smithy/shared-ini-file-loader" "^4.0.2" + "@smithy/types" "^4.2.0" tslib "^2.6.2" -"@aws-sdk/credential-provider-web-identity@3.758.0": - version "3.758.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.758.0.tgz#ea88729ee0e5de0bf5f31929d60dfd148934b6a5" - integrity sha512-XGguXhBqiCXMXRxcfCAVPlMbm3VyJTou79r/3mxWddHWF0XbhaQiBIbUz6vobVTD25YQRbWSmSch7VA8kI5Lrw== +"@aws-sdk/credential-provider-web-identity@3.787.0": + version "3.787.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.787.0.tgz#d492d1f4a90b70f3a71a65f11b8d3ef79fb2759e" + integrity sha512-SobmCwNbk6TfEsF283mZPQEI5vV2j6eY5tOCj8Er4Lzraxu9fBPADV+Bib2A8F6jlB1lMPJzOuDCbEasSt/RIw== dependencies: - "@aws-sdk/core" "3.758.0" - "@aws-sdk/nested-clients" "3.758.0" - "@aws-sdk/types" "3.734.0" - "@smithy/property-provider" "^4.0.1" - "@smithy/types" "^4.1.0" + "@aws-sdk/core" "3.775.0" + "@aws-sdk/nested-clients" "3.787.0" + "@aws-sdk/types" "3.775.0" + "@smithy/property-provider" "^4.0.2" + "@smithy/types" "^4.2.0" tslib "^2.6.2" "@aws-sdk/credential-providers@^3.583.0": - version "3.768.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/credential-providers/-/credential-providers-3.768.0.tgz#273481712ccdcdb5c178275931f902f1b04b6700" - integrity sha512-uEAtcdHArZxq7dbpgI4ofDclefNYnYWrT9bJn2Q6rf7VlQnoD37ptzVLQBLomXnRaBiQB/sRV2MJaugFqwOEQA== - dependencies: - "@aws-sdk/client-cognito-identity" "3.768.0" - "@aws-sdk/core" "3.758.0" - "@aws-sdk/credential-provider-cognito-identity" "3.768.0" - "@aws-sdk/credential-provider-env" "3.758.0" - "@aws-sdk/credential-provider-http" "3.758.0" - "@aws-sdk/credential-provider-ini" "3.758.0" - "@aws-sdk/credential-provider-node" "3.758.0" - "@aws-sdk/credential-provider-process" "3.758.0" - "@aws-sdk/credential-provider-sso" "3.758.0" - "@aws-sdk/credential-provider-web-identity" "3.758.0" - "@aws-sdk/nested-clients" "3.758.0" - "@aws-sdk/types" "3.734.0" - "@smithy/core" "^3.1.5" - "@smithy/credential-provider-imds" "^4.0.1" - "@smithy/property-provider" "^4.0.1" - "@smithy/types" "^4.1.0" + version "3.787.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/credential-providers/-/credential-providers-3.787.0.tgz#3ec6d1e17b7f468393f738317350ca572ebf79b0" + integrity sha512-kR3RtI7drOc9pho13vWbUC2Bvrx9A0G4iizBDGmTs08NOdg4w3c1I4kdLG9tyPiIMeVnH+wYrsli5CM7xIfqiA== + dependencies: + "@aws-sdk/client-cognito-identity" "3.787.0" + "@aws-sdk/core" "3.775.0" + "@aws-sdk/credential-provider-cognito-identity" "3.787.0" + "@aws-sdk/credential-provider-env" "3.775.0" + "@aws-sdk/credential-provider-http" "3.775.0" + "@aws-sdk/credential-provider-ini" "3.787.0" + "@aws-sdk/credential-provider-node" "3.787.0" + "@aws-sdk/credential-provider-process" "3.775.0" + "@aws-sdk/credential-provider-sso" "3.787.0" + "@aws-sdk/credential-provider-web-identity" "3.787.0" + "@aws-sdk/nested-clients" "3.787.0" + "@aws-sdk/types" "3.775.0" + "@smithy/config-resolver" "^4.1.0" + "@smithy/core" "^3.2.0" + "@smithy/credential-provider-imds" "^4.0.2" + "@smithy/node-config-provider" "^4.0.2" + "@smithy/property-provider" "^4.0.2" + "@smithy/types" "^4.2.0" tslib "^2.6.2" -"@aws-sdk/middleware-host-header@3.734.0": - version "3.734.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-host-header/-/middleware-host-header-3.734.0.tgz#a9a02c055352f5c435cc925a4e1e79b7ba41b1b5" - integrity sha512-LW7RRgSOHHBzWZnigNsDIzu3AiwtjeI2X66v+Wn1P1u+eXssy1+up4ZY/h+t2sU4LU36UvEf+jrZti9c6vRnFw== +"@aws-sdk/middleware-host-header@3.775.0": + version "3.775.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-host-header/-/middleware-host-header-3.775.0.tgz#1bf8160b8f4f96ba30c19f9baa030a6c9bd5f94d" + integrity sha512-tkSegM0Z6WMXpLB8oPys/d+umYIocvO298mGvcMCncpRl77L9XkvSLJIFzaHes+o7djAgIduYw8wKIMStFss2w== dependencies: - "@aws-sdk/types" "3.734.0" - "@smithy/protocol-http" "^5.0.1" - "@smithy/types" "^4.1.0" + "@aws-sdk/types" "3.775.0" + "@smithy/protocol-http" "^5.1.0" + "@smithy/types" "^4.2.0" tslib "^2.6.2" -"@aws-sdk/middleware-logger@3.734.0": - version "3.734.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-logger/-/middleware-logger-3.734.0.tgz#d31e141ae7a78667e372953a3b86905bc6124664" - integrity sha512-mUMFITpJUW3LcKvFok176eI5zXAUomVtahb9IQBwLzkqFYOrMJvWAvoV4yuxrJ8TlQBG8gyEnkb9SnhZvjg67w== +"@aws-sdk/middleware-logger@3.775.0": + version "3.775.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-logger/-/middleware-logger-3.775.0.tgz#df1909d441cd4bade8d6c7d24c41532808db0e81" + integrity sha512-FaxO1xom4MAoUJsldmR92nT1G6uZxTdNYOFYtdHfd6N2wcNaTuxgjIvqzg5y7QIH9kn58XX/dzf1iTjgqUStZw== dependencies: - "@aws-sdk/types" "3.734.0" - "@smithy/types" "^4.1.0" + "@aws-sdk/types" "3.775.0" + "@smithy/types" "^4.2.0" tslib "^2.6.2" -"@aws-sdk/middleware-recursion-detection@3.734.0": - version "3.734.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.734.0.tgz#4fa1deb9887455afbb39130f7d9bc89ccee17168" - integrity sha512-CUat2d9ITsFc2XsmeiRQO96iWpxSKYFjxvj27Hc7vo87YUHRnfMfnc8jw1EpxEwMcvBD7LsRa6vDNky6AjcrFA== +"@aws-sdk/middleware-recursion-detection@3.775.0": + version "3.775.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.775.0.tgz#36a40f467754d7c86424d12ef45c05e96ce3475b" + integrity sha512-GLCzC8D0A0YDG5u3F5U03Vb9j5tcOEFhr8oc6PDk0k0vm5VwtZOE6LvK7hcCSoAB4HXyOUM0sQuXrbaAh9OwXA== dependencies: - "@aws-sdk/types" "3.734.0" - "@smithy/protocol-http" "^5.0.1" - "@smithy/types" "^4.1.0" + "@aws-sdk/types" "3.775.0" + "@smithy/protocol-http" "^5.1.0" + "@smithy/types" "^4.2.0" tslib "^2.6.2" -"@aws-sdk/middleware-user-agent@3.758.0": - version "3.758.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.758.0.tgz#f3c9d2025aa55fd400acb1d699c1fbd6b4f68f34" - integrity sha512-iNyehQXtQlj69JCgfaOssgZD4HeYGOwxcaKeG6F+40cwBjTAi0+Ph1yfDwqk2qiBPIRWJ/9l2LodZbxiBqgrwg== - dependencies: - "@aws-sdk/core" "3.758.0" - "@aws-sdk/types" "3.734.0" - "@aws-sdk/util-endpoints" "3.743.0" - "@smithy/core" "^3.1.5" - "@smithy/protocol-http" "^5.0.1" - "@smithy/types" "^4.1.0" +"@aws-sdk/middleware-user-agent@3.787.0": + version "3.787.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.787.0.tgz#3d657c0ba1aec72bca079f4691ba20f25569fcfc" + integrity sha512-Lnfj8SmPLYtrDFthNIaNj66zZsBCam+E4XiUDr55DIHTGstH6qZ/q6vg0GfbukxwSmUcGMwSR4Qbn8rb8yd77g== + dependencies: + "@aws-sdk/core" "3.775.0" + "@aws-sdk/types" "3.775.0" + "@aws-sdk/util-endpoints" "3.787.0" + "@smithy/core" "^3.2.0" + "@smithy/protocol-http" "^5.1.0" + "@smithy/types" "^4.2.0" tslib "^2.6.2" -"@aws-sdk/nested-clients@3.758.0": - version "3.758.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/nested-clients/-/nested-clients-3.758.0.tgz#571c853602d38f5e8faa10178347e711e4f0e444" - integrity sha512-YZ5s7PSvyF3Mt2h1EQulCG93uybprNGbBkPmVuy/HMMfbFTt4iL3SbKjxqvOZelm86epFfj7pvK7FliI2WOEcg== +"@aws-sdk/nested-clients@3.787.0": + version "3.787.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/nested-clients/-/nested-clients-3.787.0.tgz#e8a5a6e7d0b599a7f9f15b900d3223ad080b0a81" + integrity sha512-xk03q1xpKNHgbuo+trEf1dFrI239kuMmjKKsqLEsHlAZbuFq4yRGMlHBrVMnKYOPBhVFDS/VineM991XI52fKg== dependencies: "@aws-crypto/sha256-browser" "5.2.0" "@aws-crypto/sha256-js" "5.2.0" - "@aws-sdk/core" "3.758.0" - "@aws-sdk/middleware-host-header" "3.734.0" - "@aws-sdk/middleware-logger" "3.734.0" - "@aws-sdk/middleware-recursion-detection" "3.734.0" - "@aws-sdk/middleware-user-agent" "3.758.0" - "@aws-sdk/region-config-resolver" "3.734.0" - "@aws-sdk/types" "3.734.0" - "@aws-sdk/util-endpoints" "3.743.0" - "@aws-sdk/util-user-agent-browser" "3.734.0" - "@aws-sdk/util-user-agent-node" "3.758.0" - "@smithy/config-resolver" "^4.0.1" - "@smithy/core" "^3.1.5" - "@smithy/fetch-http-handler" "^5.0.1" - "@smithy/hash-node" "^4.0.1" - "@smithy/invalid-dependency" "^4.0.1" - "@smithy/middleware-content-length" "^4.0.1" - "@smithy/middleware-endpoint" "^4.0.6" - "@smithy/middleware-retry" "^4.0.7" - "@smithy/middleware-serde" "^4.0.2" - "@smithy/middleware-stack" "^4.0.1" - "@smithy/node-config-provider" "^4.0.1" - "@smithy/node-http-handler" "^4.0.3" - "@smithy/protocol-http" "^5.0.1" - "@smithy/smithy-client" "^4.1.6" - "@smithy/types" "^4.1.0" - "@smithy/url-parser" "^4.0.1" + "@aws-sdk/core" "3.775.0" + "@aws-sdk/middleware-host-header" "3.775.0" + "@aws-sdk/middleware-logger" "3.775.0" + "@aws-sdk/middleware-recursion-detection" "3.775.0" + "@aws-sdk/middleware-user-agent" "3.787.0" + "@aws-sdk/region-config-resolver" "3.775.0" + "@aws-sdk/types" "3.775.0" + "@aws-sdk/util-endpoints" "3.787.0" + "@aws-sdk/util-user-agent-browser" "3.775.0" + "@aws-sdk/util-user-agent-node" "3.787.0" + "@smithy/config-resolver" "^4.1.0" + "@smithy/core" "^3.2.0" + "@smithy/fetch-http-handler" "^5.0.2" + "@smithy/hash-node" "^4.0.2" + "@smithy/invalid-dependency" "^4.0.2" + "@smithy/middleware-content-length" "^4.0.2" + "@smithy/middleware-endpoint" "^4.1.0" + "@smithy/middleware-retry" "^4.1.0" + "@smithy/middleware-serde" "^4.0.3" + "@smithy/middleware-stack" "^4.0.2" + "@smithy/node-config-provider" "^4.0.2" + "@smithy/node-http-handler" "^4.0.4" + "@smithy/protocol-http" "^5.1.0" + "@smithy/smithy-client" "^4.2.0" + "@smithy/types" "^4.2.0" + "@smithy/url-parser" "^4.0.2" "@smithy/util-base64" "^4.0.0" "@smithy/util-body-length-browser" "^4.0.0" "@smithy/util-body-length-node" "^4.0.0" - "@smithy/util-defaults-mode-browser" "^4.0.7" - "@smithy/util-defaults-mode-node" "^4.0.7" - "@smithy/util-endpoints" "^3.0.1" - "@smithy/util-middleware" "^4.0.1" - "@smithy/util-retry" "^4.0.1" + "@smithy/util-defaults-mode-browser" "^4.0.8" + "@smithy/util-defaults-mode-node" "^4.0.8" + "@smithy/util-endpoints" "^3.0.2" + "@smithy/util-middleware" "^4.0.2" + "@smithy/util-retry" "^4.0.2" "@smithy/util-utf8" "^4.0.0" tslib "^2.6.2" @@ -463,16 +465,16 @@ "@smithy/protocol-http" "^1.1.0" tslib "^2.5.0" -"@aws-sdk/region-config-resolver@3.734.0": - version "3.734.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/region-config-resolver/-/region-config-resolver-3.734.0.tgz#45ffbc56a3e94cc5c9e0cd596b0fda60f100f70b" - integrity sha512-Lvj1kPRC5IuJBr9DyJ9T9/plkh+EfKLy+12s/mykOy1JaKHDpvj+XGy2YO6YgYVOb8JFtaqloid+5COtje4JTQ== +"@aws-sdk/region-config-resolver@3.775.0": + version "3.775.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/region-config-resolver/-/region-config-resolver-3.775.0.tgz#592b52498e68501fe46480be3dfb185e949d1eab" + integrity sha512-40iH3LJjrQS3LKUJAl7Wj0bln7RFPEvUYKFxtP8a+oKFDO0F65F52xZxIJbPn6sHkxWDAnZlGgdjZXM3p2g5wQ== dependencies: - "@aws-sdk/types" "3.734.0" - "@smithy/node-config-provider" "^4.0.1" - "@smithy/types" "^4.1.0" + "@aws-sdk/types" "3.775.0" + "@smithy/node-config-provider" "^4.0.2" + "@smithy/types" "^4.2.0" "@smithy/util-config-provider" "^4.0.0" - "@smithy/util-middleware" "^4.0.1" + "@smithy/util-middleware" "^4.0.2" tslib "^2.6.2" "@aws-sdk/signature-v4@^3.374.0": @@ -483,34 +485,34 @@ "@smithy/signature-v4" "^1.0.1" tslib "^2.5.0" -"@aws-sdk/token-providers@3.758.0": - version "3.758.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/token-providers/-/token-providers-3.758.0.tgz#fcab3885ba2b222ff8bb7817448d3c786dc2ddf9" - integrity sha512-ckptN1tNrIfQUaGWm/ayW1ddG+imbKN7HHhjFdS4VfItsP0QQOB0+Ov+tpgb4MoNR4JaUghMIVStjIeHN2ks1w== +"@aws-sdk/token-providers@3.787.0": + version "3.787.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/token-providers/-/token-providers-3.787.0.tgz#18c761fb21ee25c8c3a35703876f0c733b4ae743" + integrity sha512-d7/NIqxq308Zg0RPMNrmn0QvzniL4Hx8Qdwzr6YZWLYAbUSvZYS2ppLR3BFWSkV6SsTJUx8BuDaj3P8vttkrog== dependencies: - "@aws-sdk/nested-clients" "3.758.0" - "@aws-sdk/types" "3.734.0" - "@smithy/property-provider" "^4.0.1" - "@smithy/shared-ini-file-loader" "^4.0.1" - "@smithy/types" "^4.1.0" + "@aws-sdk/nested-clients" "3.787.0" + "@aws-sdk/types" "3.775.0" + "@smithy/property-provider" "^4.0.2" + "@smithy/shared-ini-file-loader" "^4.0.2" + "@smithy/types" "^4.2.0" tslib "^2.6.2" -"@aws-sdk/types@3.734.0", "@aws-sdk/types@^3.222.0": - version "3.734.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/types/-/types-3.734.0.tgz#af5e620b0e761918282aa1c8e53cac6091d169a2" - integrity sha512-o11tSPTT70nAkGV1fN9wm/hAIiLPyWX6SuGf+9JyTp7S/rC2cFWhR26MvA69nplcjNaXVzB0f+QFrLXXjOqCrg== +"@aws-sdk/types@3.775.0", "@aws-sdk/types@^3.222.0": + version "3.775.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/types/-/types-3.775.0.tgz#09863a9e68c080947db7c3d226d1c56b8f0f5150" + integrity sha512-ZoGKwa4C9fC9Av6bdfqcW6Ix5ot05F/S4VxWR2nHuMv7hzfmAjTOcUiWT7UR4hM/U0whf84VhDtXN/DWAk52KA== dependencies: - "@smithy/types" "^4.1.0" + "@smithy/types" "^4.2.0" tslib "^2.6.2" -"@aws-sdk/util-endpoints@3.743.0": - version "3.743.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-endpoints/-/util-endpoints-3.743.0.tgz#fba654e0c5f1c8ba2b3e175dfee8e3ba4df2394a" - integrity sha512-sN1l559zrixeh5x+pttrnd0A3+r34r0tmPkJ/eaaMaAzXqsmKU/xYre9K3FNnsSS1J1k4PEfk/nHDTVUgFYjnw== +"@aws-sdk/util-endpoints@3.787.0": + version "3.787.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-endpoints/-/util-endpoints-3.787.0.tgz#1398f0bd87f19e615ae920c73e16d9d5e5cb76d1" + integrity sha512-fd3zkiOkwnbdbN0Xp9TsP5SWrmv0SpT70YEdbb8wAj2DWQwiCmFszaSs+YCvhoCdmlR3Wl9Spu0pGpSAGKeYvQ== dependencies: - "@aws-sdk/types" "3.734.0" - "@smithy/types" "^4.1.0" - "@smithy/util-endpoints" "^3.0.1" + "@aws-sdk/types" "3.775.0" + "@smithy/types" "^4.2.0" + "@smithy/util-endpoints" "^3.0.2" tslib "^2.6.2" "@aws-sdk/util-locate-window@^3.0.0": @@ -520,25 +522,25 @@ dependencies: tslib "^2.6.2" -"@aws-sdk/util-user-agent-browser@3.734.0": - version "3.734.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.734.0.tgz#bbf3348b14bd7783f60346e1ce86978999450fe7" - integrity sha512-xQTCus6Q9LwUuALW+S76OL0jcWtMOVu14q+GoLnWPUM7QeUw963oQcLhF7oq0CtaLLKyl4GOUfcwc773Zmwwng== +"@aws-sdk/util-user-agent-browser@3.775.0": + version "3.775.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.775.0.tgz#b69a1a5548ccc6db1acb3ec115967593ece927a1" + integrity sha512-txw2wkiJmZKVdDbscK7VBK+u+TJnRtlUjRTLei+elZg2ADhpQxfVAQl436FUeIv6AhB/oRHW6/K/EAGXUSWi0A== dependencies: - "@aws-sdk/types" "3.734.0" - "@smithy/types" "^4.1.0" + "@aws-sdk/types" "3.775.0" + "@smithy/types" "^4.2.0" bowser "^2.11.0" tslib "^2.6.2" -"@aws-sdk/util-user-agent-node@3.758.0": - version "3.758.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.758.0.tgz#604ccb02a5d11c9cedaea0bea279641ea9d4194d" - integrity sha512-A5EZw85V6WhoKMV2hbuFRvb9NPlxEErb4HPO6/SPXYY4QrjprIzScHxikqcWv1w4J3apB1wto9LPU3IMsYtfrw== +"@aws-sdk/util-user-agent-node@3.787.0": + version "3.787.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.787.0.tgz#58e63e99586cde1c1314f74b94596780321442f5" + integrity sha512-mG7Lz8ydfG4SF9e8WSXiPQ/Lsn3n8A5B5jtPROidafi06I3ckV2WxyMLdwG14m919NoS6IOfWHyRGSqWIwbVKA== dependencies: - "@aws-sdk/middleware-user-agent" "3.758.0" - "@aws-sdk/types" "3.734.0" - "@smithy/node-config-provider" "^4.0.1" - "@smithy/types" "^4.1.0" + "@aws-sdk/middleware-user-agent" "3.787.0" + "@aws-sdk/types" "3.775.0" + "@smithy/node-config-provider" "^4.0.2" + "@smithy/types" "^4.2.0" tslib "^2.6.2" "@aws-sdk/util-utf8-browser@^3.0.0": @@ -557,7 +559,7 @@ js-tokens "^4.0.0" picocolors "^1.0.0" -"@babel/compat-data@^7.26.5": +"@babel/compat-data@^7.26.8": version "7.26.8" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.26.8.tgz#821c1d35641c355284d4a870b8a4a7b0c141e367" integrity sha512-oH5UPLMWR3L2wEFLnFJ1TZXqHufiTKAiLfqw5zkhS4dKXLJ10yVztfil/twG8EDTA4F/tvVNw9nOl4ZMslB8rQ== @@ -592,23 +594,23 @@ jsesc "^2.5.1" source-map "^0.5.0" -"@babel/generator@^7.23.0", "@babel/generator@^7.26.10", "@babel/generator@^7.7.2": - version "7.26.10" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.26.10.tgz#a60d9de49caca16744e6340c3658dfef6138c3f7" - integrity sha512-rRHT8siFIXQrAYOYqZQVsAr8vJ+cBNqcVAY6m5V8/4QqzaPl+zDBe6cLEPRDuNOUf3ww8RfJVlOyQMoSI+5Ang== +"@babel/generator@^7.23.0", "@babel/generator@^7.26.10", "@babel/generator@^7.27.0", "@babel/generator@^7.7.2": + version "7.27.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.27.0.tgz#764382b5392e5b9aff93cadb190d0745866cbc2c" + integrity sha512-VybsKvpiN1gU1sdMZIp7FcqphVVKEwcuj02x73uvcHE0PTihx1nlBcowYWhDwjpoAXRv43+gDzyggGnn1XZhVw== dependencies: - "@babel/parser" "^7.26.10" - "@babel/types" "^7.26.10" + "@babel/parser" "^7.27.0" + "@babel/types" "^7.27.0" "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.25" jsesc "^3.0.2" "@babel/helper-compilation-targets@^7.26.5": - version "7.26.5" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.26.5.tgz#75d92bb8d8d51301c0d49e52a65c9a7fe94514d8" - integrity sha512-IXuyn5EkouFJscIDuFF5EsiSolseme1s0CZB+QxVugqJLYmKdxI1VfIBOst0SUu4rnk2Z7kqTwmoO1lp3HIfnA== + version "7.27.0" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.0.tgz#de0c753b1cd1d9ab55d473c5a5cf7170f0a81880" + integrity sha512-LVk7fbXml0H2xH34dFzKQ7TDZ2G4/rVTOrq9V+icbbadjbVxxeFeDsNHv2SrZeWoA+6ZiTyWYWtScEIW07EAcA== dependencies: - "@babel/compat-data" "^7.26.5" + "@babel/compat-data" "^7.26.8" "@babel/helper-validator-option" "^7.25.9" browserslist "^4.24.0" lru-cache "^5.1.1" @@ -681,19 +683,19 @@ integrity sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw== "@babel/helpers@^7.26.10": - version "7.26.10" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.26.10.tgz#6baea3cd62ec2d0c1068778d63cb1314f6637384" - integrity sha512-UPYc3SauzZ3JGgj87GgZ89JVdC5dj0AoetR5Bw6wj4niittNyFh6+eOGonYvJ1ao6B8lEa3Q3klS7ADZ53bc5g== + version "7.27.0" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.27.0.tgz#53d156098defa8243eab0f32fa17589075a1b808" + integrity sha512-U5eyP/CTFPuNE3qk+WZMxFkp/4zUzdceQlfzf7DdGdhp+Fezd7HD+i8Y24ZuTMKX3wQBld449jijbGq6OdGNQg== dependencies: - "@babel/template" "^7.26.9" - "@babel/types" "^7.26.10" + "@babel/template" "^7.27.0" + "@babel/types" "^7.27.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.5", "@babel/parser@^7.20.7", "@babel/parser@^7.23.0", "@babel/parser@^7.23.9", "@babel/parser@^7.26.10", "@babel/parser@^7.26.9": - version "7.26.10" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.26.10.tgz#e9bdb82f14b97df6569b0b038edd436839c57749" - integrity sha512-6aQR2zGE/QFi8JpDLjUZEPYOs7+mhKXm86VaKFiLP35JQwQb6bwUE+XbvkH0EptsYhbNBSUGaUBLKqxH1xSgsA== +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.5", "@babel/parser@^7.20.7", "@babel/parser@^7.23.0", "@babel/parser@^7.23.9", "@babel/parser@^7.26.10", "@babel/parser@^7.27.0": + version "7.27.0" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.27.0.tgz#3d7d6ee268e41d2600091cbd4e145ffee85a44ec" + integrity sha512-iaepho73/2Pz7w2eMS0Q5f83+0RKI7i4xmiYeBmDzfRVbQtTOG7Ts0S4HzJVsTMGI9keU8rNfuZr8DKfSt7Yyg== dependencies: - "@babel/types" "^7.26.10" + "@babel/types" "^7.27.0" "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -814,14 +816,14 @@ dependencies: "@babel/helper-plugin-utils" "^7.25.9" -"@babel/template@^7.24.7", "@babel/template@^7.26.9", "@babel/template@^7.3.3": - version "7.26.9" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.26.9.tgz#4577ad3ddf43d194528cff4e1fa6b232fa609bb2" - integrity sha512-qyRplbeIpNZhmzOysF/wFMuP9sctmh2cFzRAZOn1YapxBsE1i9bJIY586R/WBLfLcmcBlM8ROBiQURnnNy+zfA== +"@babel/template@^7.24.7", "@babel/template@^7.26.9", "@babel/template@^7.27.0", "@babel/template@^7.3.3": + version "7.27.0" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.27.0.tgz#b253e5406cc1df1c57dcd18f11760c2dbf40c0b4" + integrity sha512-2ncevenBqXI6qRMukPlXwHKHchC7RyMuu4xv5JBXRfOGVcTy1mXCD12qrp7Jsoxll1EV3+9sE4GugBVRjT2jFA== dependencies: "@babel/code-frame" "^7.26.2" - "@babel/parser" "^7.26.9" - "@babel/types" "^7.26.9" + "@babel/parser" "^7.27.0" + "@babel/types" "^7.27.0" "@babel/traverse@7.23.2": version "7.23.2" @@ -840,15 +842,15 @@ globals "^11.1.0" "@babel/traverse@^7.25.9", "@babel/traverse@^7.26.10": - version "7.26.10" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.26.10.tgz#43cca33d76005dbaa93024fae536cc1946a4c380" - integrity sha512-k8NuDrxr0WrPH5Aupqb2LCVURP/S0vBEn5mK6iH+GIYob66U5EtoZvcdudR2jQ4cmTwhEwW1DLB+Yyas9zjF6A== + version "7.27.0" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.27.0.tgz#11d7e644779e166c0442f9a07274d02cd91d4a70" + integrity sha512-19lYZFzYVQkkHkl4Cy4WrAVcqBkgvV2YM2TU3xG6DIwO7O3ecbDPfW3yM3bjAGcqcQHi+CCtjMR3dIEHxsd6bA== dependencies: "@babel/code-frame" "^7.26.2" - "@babel/generator" "^7.26.10" - "@babel/parser" "^7.26.10" - "@babel/template" "^7.26.9" - "@babel/types" "^7.26.10" + "@babel/generator" "^7.27.0" + "@babel/parser" "^7.27.0" + "@babel/template" "^7.27.0" + "@babel/types" "^7.27.0" debug "^4.3.1" globals "^11.1.0" @@ -860,10 +862,10 @@ "@babel/helper-validator-identifier" "^7.16.7" to-fast-properties "^2.0.0" -"@babel/types@^7.0.0", "@babel/types@^7.17.0", "@babel/types@^7.20.7", "@babel/types@^7.23.0", "@babel/types@^7.24.7", "@babel/types@^7.25.9", "@babel/types@^7.26.10", "@babel/types@^7.26.9", "@babel/types@^7.3.3": - version "7.26.10" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.26.10.tgz#396382f6335bd4feb65741eacfc808218f859259" - integrity sha512-emqcG3vHrpxUKTrxcblR36dcrcoRDvKmnL/dCL6ZsHaShW80qxCAcNhzQZrpeM765VzEos+xOi4s+r4IXzTwdQ== +"@babel/types@^7.0.0", "@babel/types@^7.17.0", "@babel/types@^7.20.7", "@babel/types@^7.23.0", "@babel/types@^7.24.7", "@babel/types@^7.25.9", "@babel/types@^7.26.10", "@babel/types@^7.27.0", "@babel/types@^7.3.3": + version "7.27.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.27.0.tgz#ef9acb6b06c3173f6632d993ecb6d4ae470b4559" + integrity sha512-H45s8fVLYjbhFH62dIJ3WtmJ6RSPt/3DRO0ZcT2SUiYiQyz3BLVb9ADEnLl91m74aQPS3AzzeajZHYOalWe3bg== dependencies: "@babel/helper-string-parser" "^7.25.9" "@babel/helper-validator-identifier" "^7.25.9" @@ -1196,9 +1198,9 @@ integrity sha512-lp4qAiMTD4sNWW4DbKLBkfiMZ4jbAboJIGOQr5DvciMRI494OapieI9qiODpOt0XBr1LjIDy1xAGAnVs5supTA== "@opentelemetry/semantic-conventions@^1.28.0", "@opentelemetry/semantic-conventions@^1.29.0": - version "1.30.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/semantic-conventions/-/semantic-conventions-1.30.0.tgz#3a42c4c475482f2ec87c12aad98832dc0087dc9a" - integrity sha512-4VlGgo32k2EQ2wcCY3vEU28A0O13aOtHz3Xt2/2U5FAh9EfhD6t6DqL5Z6yAnRCntbTFDU4YfbpyzSlHNWycPw== + version "1.32.0" + resolved "https://registry.yarnpkg.com/@opentelemetry/semantic-conventions/-/semantic-conventions-1.32.0.tgz#a15e8f78f32388a7e4655e7f539570e40958ca3f" + integrity sha512-s0OpmpQFSfMrmedAn9Lhg4KWJELHCU6uU9dtIJ28N8UGhf9Y55im5X8fEzwhwDwiSqN+ZPSNrDJF7ivf/AuRPQ== "@sinclair/typebox@^0.27.8": version "0.27.8" @@ -1219,48 +1221,48 @@ dependencies: "@sinonjs/commons" "^3.0.0" -"@smithy/abort-controller@^4.0.1": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@smithy/abort-controller/-/abort-controller-4.0.1.tgz#7c5e73690c4105ad264c2896bd1ea822450c3819" - integrity sha512-fiUIYgIgRjMWznk6iLJz35K2YxSLHzLBA/RC6lBrKfQ8fHbPfvk7Pk9UvpKoHgJjI18MnbPuEju53zcVy6KF1g== +"@smithy/abort-controller@^4.0.2": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@smithy/abort-controller/-/abort-controller-4.0.2.tgz#36a23e8cc65fc03cacb6afa35dfbfd319c560c6b" + integrity sha512-Sl/78VDtgqKxN2+1qduaVE140XF+Xg+TafkncspwM4jFP/LHr76ZHmIY/y3V1M0mMLNk+Je6IGbzxy23RSToMw== dependencies: - "@smithy/types" "^4.1.0" + "@smithy/types" "^4.2.0" tslib "^2.6.2" -"@smithy/config-resolver@^4.0.1": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@smithy/config-resolver/-/config-resolver-4.0.1.tgz#3d6c78bbc51adf99c9819bb3f0ea197fe03ad363" - integrity sha512-Igfg8lKu3dRVkTSEm98QpZUvKEOa71jDX4vKRcvJVyRc3UgN3j7vFMf0s7xLQhYmKa8kyJGQgUJDOV5V3neVlQ== +"@smithy/config-resolver@^4.1.0": + version "4.1.0" + resolved "https://registry.yarnpkg.com/@smithy/config-resolver/-/config-resolver-4.1.0.tgz#de1043cbd75f05d99798b0fbcfdaf4b89b0f2f41" + integrity sha512-8smPlwhga22pwl23fM5ew4T9vfLUCeFXlcqNOCD5M5h8VmNPNUE9j6bQSuRXpDSV11L/E/SwEBQuW8hr6+nS1A== dependencies: - "@smithy/node-config-provider" "^4.0.1" - "@smithy/types" "^4.1.0" + "@smithy/node-config-provider" "^4.0.2" + "@smithy/types" "^4.2.0" "@smithy/util-config-provider" "^4.0.0" - "@smithy/util-middleware" "^4.0.1" + "@smithy/util-middleware" "^4.0.2" tslib "^2.6.2" -"@smithy/core@^3.1.5": - version "3.1.5" - resolved "https://registry.yarnpkg.com/@smithy/core/-/core-3.1.5.tgz#cc260229e45964d8354a3737bf3dedb56e373616" - integrity sha512-HLclGWPkCsekQgsyzxLhCQLa8THWXtB5PxyYN+2O6nkyLt550KQKTlbV2D1/j5dNIQapAZM1+qFnpBFxZQkgCA== +"@smithy/core@^3.2.0": + version "3.2.0" + resolved "https://registry.yarnpkg.com/@smithy/core/-/core-3.2.0.tgz#613b15f76eab9a6be396b1d5453b6bc8f22ba99c" + integrity sha512-k17bgQhVZ7YmUvA8at4af1TDpl0NDMBuBKJl8Yg0nrefwmValU+CnA5l/AriVdQNthU/33H3nK71HrLgqOPr1Q== dependencies: - "@smithy/middleware-serde" "^4.0.2" - "@smithy/protocol-http" "^5.0.1" - "@smithy/types" "^4.1.0" + "@smithy/middleware-serde" "^4.0.3" + "@smithy/protocol-http" "^5.1.0" + "@smithy/types" "^4.2.0" "@smithy/util-body-length-browser" "^4.0.0" - "@smithy/util-middleware" "^4.0.1" - "@smithy/util-stream" "^4.1.2" + "@smithy/util-middleware" "^4.0.2" + "@smithy/util-stream" "^4.2.0" "@smithy/util-utf8" "^4.0.0" tslib "^2.6.2" -"@smithy/credential-provider-imds@^4.0.1": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@smithy/credential-provider-imds/-/credential-provider-imds-4.0.1.tgz#807110739982acd1588a4847b61e6edf196d004e" - integrity sha512-l/qdInaDq1Zpznpmev/+52QomsJNZ3JkTl5yrTl02V6NBgJOQ4LY0SFw/8zsMwj3tLe8vqiIuwF6nxaEwgf6mg== +"@smithy/credential-provider-imds@^4.0.2": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@smithy/credential-provider-imds/-/credential-provider-imds-4.0.2.tgz#1ec34a04842fa69996b151a695b027f0486c69a8" + integrity sha512-32lVig6jCaWBHnY+OEQ6e6Vnt5vDHaLiydGrwYMW9tPqO688hPGTYRamYJ1EptxEC2rAwJrHWmPoKRBl4iTa8w== dependencies: - "@smithy/node-config-provider" "^4.0.1" - "@smithy/property-provider" "^4.0.1" - "@smithy/types" "^4.1.0" - "@smithy/url-parser" "^4.0.1" + "@smithy/node-config-provider" "^4.0.2" + "@smithy/property-provider" "^4.0.2" + "@smithy/types" "^4.2.0" + "@smithy/url-parser" "^4.0.2" tslib "^2.6.2" "@smithy/eventstream-codec@^1.1.0": @@ -1273,33 +1275,33 @@ "@smithy/util-hex-encoding" "^1.1.0" tslib "^2.5.0" -"@smithy/fetch-http-handler@^5.0.1": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@smithy/fetch-http-handler/-/fetch-http-handler-5.0.1.tgz#8463393442ca6a1644204849e42c386066f0df79" - integrity sha512-3aS+fP28urrMW2KTjb6z9iFow6jO8n3MFfineGbndvzGZit3taZhKWtTorf+Gp5RpFDDafeHlhfsGlDCXvUnJA== +"@smithy/fetch-http-handler@^5.0.2": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@smithy/fetch-http-handler/-/fetch-http-handler-5.0.2.tgz#9d3cacf044aa9573ab933f445ab95cddb284813d" + integrity sha512-+9Dz8sakS9pe7f2cBocpJXdeVjMopUDLgZs1yWeu7h++WqSbjUYv/JAJwKwXw1HV6gq1jyWjxuyn24E2GhoEcQ== dependencies: - "@smithy/protocol-http" "^5.0.1" - "@smithy/querystring-builder" "^4.0.1" - "@smithy/types" "^4.1.0" + "@smithy/protocol-http" "^5.1.0" + "@smithy/querystring-builder" "^4.0.2" + "@smithy/types" "^4.2.0" "@smithy/util-base64" "^4.0.0" tslib "^2.6.2" -"@smithy/hash-node@^4.0.1": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@smithy/hash-node/-/hash-node-4.0.1.tgz#ce78fc11b848a4f47c2e1e7a07fb6b982d2f130c" - integrity sha512-TJ6oZS+3r2Xu4emVse1YPB3Dq3d8RkZDKcPr71Nj/lJsdAP1c7oFzYqEn1IBc915TsgLl2xIJNuxCz+gLbLE0w== +"@smithy/hash-node@^4.0.2": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@smithy/hash-node/-/hash-node-4.0.2.tgz#a34fe5a33b067d754ca63302b9791778f003e437" + integrity sha512-VnTpYPnRUE7yVhWozFdlxcYknv9UN7CeOqSrMH+V877v4oqtVYuoqhIhtSjmGPvYrYnAkaM61sLMKHvxL138yg== dependencies: - "@smithy/types" "^4.1.0" + "@smithy/types" "^4.2.0" "@smithy/util-buffer-from" "^4.0.0" "@smithy/util-utf8" "^4.0.0" tslib "^2.6.2" -"@smithy/invalid-dependency@^4.0.1": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@smithy/invalid-dependency/-/invalid-dependency-4.0.1.tgz#704d1acb6fac105558c17d53f6d55da6b0d6b6fc" - integrity sha512-gdudFPf4QRQ5pzj7HEnu6FhKRi61BfH/Gk5Yf6O0KiSbr1LlVhgjThcvjdu658VE6Nve8vaIWB8/fodmS1rBPQ== +"@smithy/invalid-dependency@^4.0.2": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@smithy/invalid-dependency/-/invalid-dependency-4.0.2.tgz#e9b1c5e407d795f10a03afba90e37bccdc3e38f7" + integrity sha512-GatB4+2DTpgWPday+mnUkoumP54u/MDM/5u44KF9hIu8jF0uafZtQLcdfIKkIcUNuF/fBojpLEHZS/56JqPeXQ== dependencies: - "@smithy/types" "^4.1.0" + "@smithy/types" "^4.2.0" tslib "^2.6.2" "@smithy/is-array-buffer@^1.1.0": @@ -1323,87 +1325,87 @@ dependencies: tslib "^2.6.2" -"@smithy/middleware-content-length@^4.0.1": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@smithy/middleware-content-length/-/middleware-content-length-4.0.1.tgz#378bc94ae623f45e412fb4f164b5bb90b9de2ba3" - integrity sha512-OGXo7w5EkB5pPiac7KNzVtfCW2vKBTZNuCctn++TTSOMpe6RZO/n6WEC1AxJINn3+vWLKW49uad3lo/u0WJ9oQ== +"@smithy/middleware-content-length@^4.0.2": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@smithy/middleware-content-length/-/middleware-content-length-4.0.2.tgz#ff78658e8047ad7038f58478cf8713ee2f6ef647" + integrity sha512-hAfEXm1zU+ELvucxqQ7I8SszwQ4znWMbNv6PLMndN83JJN41EPuS93AIyh2N+gJ6x8QFhzSO6b7q2e6oClDI8A== dependencies: - "@smithy/protocol-http" "^5.0.1" - "@smithy/types" "^4.1.0" + "@smithy/protocol-http" "^5.1.0" + "@smithy/types" "^4.2.0" tslib "^2.6.2" -"@smithy/middleware-endpoint@^4.0.6": - version "4.0.6" - resolved "https://registry.yarnpkg.com/@smithy/middleware-endpoint/-/middleware-endpoint-4.0.6.tgz#7ead08fcfda92ee470786a7f458e9b59048407eb" - integrity sha512-ftpmkTHIFqgaFugcjzLZv3kzPEFsBFSnq1JsIkr2mwFzCraZVhQk2gqN51OOeRxqhbPTkRFj39Qd2V91E/mQxg== - dependencies: - "@smithy/core" "^3.1.5" - "@smithy/middleware-serde" "^4.0.2" - "@smithy/node-config-provider" "^4.0.1" - "@smithy/shared-ini-file-loader" "^4.0.1" - "@smithy/types" "^4.1.0" - "@smithy/url-parser" "^4.0.1" - "@smithy/util-middleware" "^4.0.1" +"@smithy/middleware-endpoint@^4.1.0": + version "4.1.0" + resolved "https://registry.yarnpkg.com/@smithy/middleware-endpoint/-/middleware-endpoint-4.1.0.tgz#cbfe47c5632942c960dbcf71fb02fd0d9985444d" + integrity sha512-xhLimgNCbCzsUppRTGXWkZywksuTThxaIB0HwbpsVLY5sceac4e1TZ/WKYqufQLaUy+gUSJGNdwD2jo3cXL0iA== + dependencies: + "@smithy/core" "^3.2.0" + "@smithy/middleware-serde" "^4.0.3" + "@smithy/node-config-provider" "^4.0.2" + "@smithy/shared-ini-file-loader" "^4.0.2" + "@smithy/types" "^4.2.0" + "@smithy/url-parser" "^4.0.2" + "@smithy/util-middleware" "^4.0.2" tslib "^2.6.2" -"@smithy/middleware-retry@^4.0.7": - version "4.0.7" - resolved "https://registry.yarnpkg.com/@smithy/middleware-retry/-/middleware-retry-4.0.7.tgz#8bb2014842a6144f230967db502f5fe6adcd6529" - integrity sha512-58j9XbUPLkqAcV1kHzVX/kAR16GT+j7DUZJqwzsxh1jtz7G82caZiGyyFgUvogVfNTg3TeAOIJepGc8TXF4AVQ== - dependencies: - "@smithy/node-config-provider" "^4.0.1" - "@smithy/protocol-http" "^5.0.1" - "@smithy/service-error-classification" "^4.0.1" - "@smithy/smithy-client" "^4.1.6" - "@smithy/types" "^4.1.0" - "@smithy/util-middleware" "^4.0.1" - "@smithy/util-retry" "^4.0.1" +"@smithy/middleware-retry@^4.1.0": + version "4.1.0" + resolved "https://registry.yarnpkg.com/@smithy/middleware-retry/-/middleware-retry-4.1.0.tgz#338ac1e025bbc6fd7b008152c4efa8bc0591acc9" + integrity sha512-2zAagd1s6hAaI/ap6SXi5T3dDwBOczOMCSkkYzktqN1+tzbk1GAsHNAdo/1uzxz3Ky02jvZQwbi/vmDA6z4Oyg== + dependencies: + "@smithy/node-config-provider" "^4.0.2" + "@smithy/protocol-http" "^5.1.0" + "@smithy/service-error-classification" "^4.0.2" + "@smithy/smithy-client" "^4.2.0" + "@smithy/types" "^4.2.0" + "@smithy/util-middleware" "^4.0.2" + "@smithy/util-retry" "^4.0.2" tslib "^2.6.2" uuid "^9.0.1" -"@smithy/middleware-serde@^4.0.2": - version "4.0.2" - resolved "https://registry.yarnpkg.com/@smithy/middleware-serde/-/middleware-serde-4.0.2.tgz#f792d72f6ad8fa6b172e3f19c6fe1932a856a56d" - integrity sha512-Sdr5lOagCn5tt+zKsaW+U2/iwr6bI9p08wOkCp6/eL6iMbgdtc2R5Ety66rf87PeohR0ExI84Txz9GYv5ou3iQ== +"@smithy/middleware-serde@^4.0.3": + version "4.0.3" + resolved "https://registry.yarnpkg.com/@smithy/middleware-serde/-/middleware-serde-4.0.3.tgz#b90ef1065ad9dc0b54c561fae73c8a5792d145e3" + integrity sha512-rfgDVrgLEVMmMn0BI8O+8OVr6vXzjV7HZj57l0QxslhzbvVfikZbVfBVthjLHqib4BW44QhcIgJpvebHlRaC9A== dependencies: - "@smithy/types" "^4.1.0" + "@smithy/types" "^4.2.0" tslib "^2.6.2" -"@smithy/middleware-stack@^4.0.1": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@smithy/middleware-stack/-/middleware-stack-4.0.1.tgz#c157653f9df07f7c26e32f49994d368e4e071d22" - integrity sha512-dHwDmrtR/ln8UTHpaIavRSzeIk5+YZTBtLnKwDW3G2t6nAupCiQUvNzNoHBpik63fwUaJPtlnMzXbQrNFWssIA== +"@smithy/middleware-stack@^4.0.2": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@smithy/middleware-stack/-/middleware-stack-4.0.2.tgz#ca7bc3eedc7c1349e2cf94e0dc92a68d681bef18" + integrity sha512-eSPVcuJJGVYrFYu2hEq8g8WWdJav3sdrI4o2c6z/rjnYDd3xH9j9E7deZQCzFn4QvGPouLngH3dQ+QVTxv5bOQ== dependencies: - "@smithy/types" "^4.1.0" + "@smithy/types" "^4.2.0" tslib "^2.6.2" -"@smithy/node-config-provider@^4.0.1": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@smithy/node-config-provider/-/node-config-provider-4.0.1.tgz#4e84fe665c0774d5f4ebb75144994fc6ebedf86e" - integrity sha512-8mRTjvCtVET8+rxvmzRNRR0hH2JjV0DFOmwXPrISmTIJEfnCBugpYYGAsCj8t41qd+RB5gbheSQ/6aKZCQvFLQ== +"@smithy/node-config-provider@^4.0.2": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@smithy/node-config-provider/-/node-config-provider-4.0.2.tgz#017ba626828bced0fa588e795246e5468632f3ef" + integrity sha512-WgCkILRZfJwJ4Da92a6t3ozN/zcvYyJGUTmfGbgS/FkCcoCjl7G4FJaCDN1ySdvLvemnQeo25FdkyMSTSwulsw== dependencies: - "@smithy/property-provider" "^4.0.1" - "@smithy/shared-ini-file-loader" "^4.0.1" - "@smithy/types" "^4.1.0" + "@smithy/property-provider" "^4.0.2" + "@smithy/shared-ini-file-loader" "^4.0.2" + "@smithy/types" "^4.2.0" tslib "^2.6.2" -"@smithy/node-http-handler@^4.0.3": - version "4.0.3" - resolved "https://registry.yarnpkg.com/@smithy/node-http-handler/-/node-http-handler-4.0.3.tgz#363e1d453168b4e37e8dd456d0a368a4e413bc98" - integrity sha512-dYCLeINNbYdvmMLtW0VdhW1biXt+PPCGazzT5ZjKw46mOtdgToQEwjqZSS9/EN8+tNs/RO0cEWG044+YZs97aA== +"@smithy/node-http-handler@^4.0.4": + version "4.0.4" + resolved "https://registry.yarnpkg.com/@smithy/node-http-handler/-/node-http-handler-4.0.4.tgz#aa583d201c1ee968170b65a07f06d633c214b7a1" + integrity sha512-/mdqabuAT3o/ihBGjL94PUbTSPSRJ0eeVTdgADzow0wRJ0rN4A27EOrtlK56MYiO1fDvlO3jVTCxQtQmK9dZ1g== dependencies: - "@smithy/abort-controller" "^4.0.1" - "@smithy/protocol-http" "^5.0.1" - "@smithy/querystring-builder" "^4.0.1" - "@smithy/types" "^4.1.0" + "@smithy/abort-controller" "^4.0.2" + "@smithy/protocol-http" "^5.1.0" + "@smithy/querystring-builder" "^4.0.2" + "@smithy/types" "^4.2.0" tslib "^2.6.2" -"@smithy/property-provider@^4.0.1": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@smithy/property-provider/-/property-provider-4.0.1.tgz#8d35d5997af2a17cf15c5e921201ef6c5e3fc870" - integrity sha512-o+VRiwC2cgmk/WFV0jaETGOtX16VNPp2bSQEzu0whbReqE1BMqsP2ami2Vi3cbGVdKu1kq9gQkDAGKbt0WOHAQ== +"@smithy/property-provider@^4.0.2": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@smithy/property-provider/-/property-provider-4.0.2.tgz#4572c10415c9d4215f3df1530ba61b0319b17b55" + integrity sha512-wNRoQC1uISOuNc2s4hkOYwYllmiyrvVXWMtq+TysNRVQaHm4yoafYQyjN/goYZS+QbYlPIbb/QRjaUZMuzwQ7A== dependencies: - "@smithy/types" "^4.1.0" + "@smithy/types" "^4.2.0" tslib "^2.6.2" "@smithy/protocol-http@^1.1.0": @@ -1414,44 +1416,44 @@ "@smithy/types" "^1.2.0" tslib "^2.5.0" -"@smithy/protocol-http@^5.0.1": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@smithy/protocol-http/-/protocol-http-5.0.1.tgz#37c248117b29c057a9adfad4eb1d822a67079ff1" - integrity sha512-TE4cpj49jJNB/oHyh/cRVEgNZaoPaxd4vteJNB0yGidOCVR0jCw/hjPVsT8Q8FRmj8Bd3bFZt8Dh7xGCT+xMBQ== +"@smithy/protocol-http@^5.1.0": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@smithy/protocol-http/-/protocol-http-5.1.0.tgz#ad34e336a95944785185234bebe2ec8dbe266936" + integrity sha512-KxAOL1nUNw2JTYrtviRRjEnykIDhxc84qMBzxvu1MUfQfHTuBlCG7PA6EdVwqpJjH7glw7FqQoFxUJSyBQgu7g== dependencies: - "@smithy/types" "^4.1.0" + "@smithy/types" "^4.2.0" tslib "^2.6.2" -"@smithy/querystring-builder@^4.0.1": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@smithy/querystring-builder/-/querystring-builder-4.0.1.tgz#37e1e05d0d33c6f694088abc3e04eafb65cb6976" - integrity sha512-wU87iWZoCbcqrwszsOewEIuq+SU2mSoBE2CcsLwE0I19m0B2gOJr1MVjxWcDQYOzHbR1xCk7AcOBbGFUYOKvdg== +"@smithy/querystring-builder@^4.0.2": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@smithy/querystring-builder/-/querystring-builder-4.0.2.tgz#834cea95bf413ab417bf9c166d60fd80d2cb3016" + integrity sha512-NTOs0FwHw1vimmQM4ebh+wFQvOwkEf/kQL6bSM1Lock+Bv4I89B3hGYoUEPkmvYPkDKyp5UdXJYu+PoTQ3T31Q== dependencies: - "@smithy/types" "^4.1.0" + "@smithy/types" "^4.2.0" "@smithy/util-uri-escape" "^4.0.0" tslib "^2.6.2" -"@smithy/querystring-parser@^4.0.1": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@smithy/querystring-parser/-/querystring-parser-4.0.1.tgz#312dc62b146f8bb8a67558d82d4722bb9211af42" - integrity sha512-Ma2XC7VS9aV77+clSFylVUnPZRindhB7BbmYiNOdr+CHt/kZNJoPP0cd3QxCnCFyPXC4eybmyE98phEHkqZ5Jw== +"@smithy/querystring-parser@^4.0.2": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@smithy/querystring-parser/-/querystring-parser-4.0.2.tgz#d80c5afb740e12ad8b4d4f58415e402c69712479" + integrity sha512-v6w8wnmZcVXjfVLjxw8qF7OwESD9wnpjp0Dqry/Pod0/5vcEA3qxCr+BhbOHlxS8O+29eLpT3aagxXGwIoEk7Q== dependencies: - "@smithy/types" "^4.1.0" + "@smithy/types" "^4.2.0" tslib "^2.6.2" -"@smithy/service-error-classification@^4.0.1": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@smithy/service-error-classification/-/service-error-classification-4.0.1.tgz#84e78579af46c7b79c900b6d6cc822c9465f3259" - integrity sha512-3JNjBfOWpj/mYfjXJHB4Txc/7E4LVq32bwzE7m28GN79+M1f76XHflUaSUkhOriprPDzev9cX/M+dEB80DNDKA== +"@smithy/service-error-classification@^4.0.2": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@smithy/service-error-classification/-/service-error-classification-4.0.2.tgz#96740ed8be7ac5ad7d6f296d4ddf3f66444b8dcc" + integrity sha512-LA86xeFpTKn270Hbkixqs5n73S+LVM0/VZco8dqd+JT75Dyx3Lcw/MraL7ybjmz786+160K8rPOmhsq0SocoJQ== dependencies: - "@smithy/types" "^4.1.0" + "@smithy/types" "^4.2.0" -"@smithy/shared-ini-file-loader@^4.0.1": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-4.0.1.tgz#d35c21c29454ca4e58914a4afdde68d3b2def1ee" - integrity sha512-hC8F6qTBbuHRI/uqDgqqi6J0R4GtEZcgrZPhFQnMhfJs3MnUTGSnR1NSJCJs5VWlMydu0kJz15M640fJlRsIOw== +"@smithy/shared-ini-file-loader@^4.0.2": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-4.0.2.tgz#15043f0516fe09ff4b22982bc5f644dc701ebae5" + integrity sha512-J9/gTWBGVuFZ01oVA6vdb4DAjf1XbDhK6sLsu3OS9qmLrS6KB5ygpeHiM3miIbj1qgSJ96GYszXFWv6ErJ8QEw== dependencies: - "@smithy/types" "^4.1.0" + "@smithy/types" "^4.2.0" tslib "^2.6.2" "@smithy/signature-v4@^1.0.1": @@ -1468,31 +1470,31 @@ "@smithy/util-utf8" "^1.1.0" tslib "^2.5.0" -"@smithy/signature-v4@^5.0.1": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@smithy/signature-v4/-/signature-v4-5.0.1.tgz#f93401b176150286ba246681031b0503ec359270" - integrity sha512-nCe6fQ+ppm1bQuw5iKoeJ0MJfz2os7Ic3GBjOkLOPtavbD1ONoyE3ygjBfz2ythFWm4YnRm6OxW+8p/m9uCoIA== +"@smithy/signature-v4@^5.0.2": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@smithy/signature-v4/-/signature-v4-5.0.2.tgz#363854e946fbc5bc206ff82e79ada5d5c14be640" + integrity sha512-Mz+mc7okA73Lyz8zQKJNyr7lIcHLiPYp0+oiqiMNc/t7/Kf2BENs5d63pEj7oPqdjaum6g0Fc8wC78dY1TgtXw== dependencies: "@smithy/is-array-buffer" "^4.0.0" - "@smithy/protocol-http" "^5.0.1" - "@smithy/types" "^4.1.0" + "@smithy/protocol-http" "^5.1.0" + "@smithy/types" "^4.2.0" "@smithy/util-hex-encoding" "^4.0.0" - "@smithy/util-middleware" "^4.0.1" + "@smithy/util-middleware" "^4.0.2" "@smithy/util-uri-escape" "^4.0.0" "@smithy/util-utf8" "^4.0.0" tslib "^2.6.2" -"@smithy/smithy-client@^4.1.6": - version "4.1.6" - resolved "https://registry.yarnpkg.com/@smithy/smithy-client/-/smithy-client-4.1.6.tgz#2183c922d086d33252012232be891f29a008d932" - integrity sha512-UYDolNg6h2O0L+cJjtgSyKKvEKCOa/8FHYJnBobyeoeWDmNpXjwOAtw16ezyeu1ETuuLEOZbrynK0ZY1Lx9Jbw== - dependencies: - "@smithy/core" "^3.1.5" - "@smithy/middleware-endpoint" "^4.0.6" - "@smithy/middleware-stack" "^4.0.1" - "@smithy/protocol-http" "^5.0.1" - "@smithy/types" "^4.1.0" - "@smithy/util-stream" "^4.1.2" +"@smithy/smithy-client@^4.2.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@smithy/smithy-client/-/smithy-client-4.2.0.tgz#0c64cae4fb5bb4f26386e9b2c33fc9a3c24c9df3" + integrity sha512-Qs65/w30pWV7LSFAez9DKy0Koaoh3iHhpcpCCJ4waj/iqwsuSzJna2+vYwq46yBaqO5ZbP9TjUsATUNxrKeBdw== + dependencies: + "@smithy/core" "^3.2.0" + "@smithy/middleware-endpoint" "^4.1.0" + "@smithy/middleware-stack" "^4.0.2" + "@smithy/protocol-http" "^5.1.0" + "@smithy/types" "^4.2.0" + "@smithy/util-stream" "^4.2.0" tslib "^2.6.2" "@smithy/types@^1.2.0": @@ -1502,20 +1504,20 @@ dependencies: tslib "^2.5.0" -"@smithy/types@^4.1.0": - version "4.1.0" - resolved "https://registry.yarnpkg.com/@smithy/types/-/types-4.1.0.tgz#19de0b6087bccdd4182a334eb5d3d2629699370f" - integrity sha512-enhjdwp4D7CXmwLtD6zbcDMbo6/T6WtuuKCY49Xxc6OMOmUWlBEBDREsxxgV2LIdeQPW756+f97GzcgAwp3iLw== +"@smithy/types@^4.2.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@smithy/types/-/types-4.2.0.tgz#e7998984cc54b1acbc32e6d4cf982c712e3d26b6" + integrity sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg== dependencies: tslib "^2.6.2" -"@smithy/url-parser@^4.0.1": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@smithy/url-parser/-/url-parser-4.0.1.tgz#b47743f785f5b8d81324878cbb1b5f834bf8d85a" - integrity sha512-gPXcIEUtw7VlK8f/QcruNXm7q+T5hhvGu9tl63LsJPZ27exB6dtNwvh2HIi0v7JcXJ5emBxB+CJxwaLEdJfA+g== +"@smithy/url-parser@^4.0.2": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@smithy/url-parser/-/url-parser-4.0.2.tgz#a316f7d8593ffab796348bc5df96237833880713" + integrity sha512-Bm8n3j2ScqnT+kJaClSVCMeiSenK6jVAzZCNewsYWuZtnBehEz4r2qP0riZySZVfzB+03XZHJeqfmJDkeeSLiQ== dependencies: - "@smithy/querystring-parser" "^4.0.1" - "@smithy/types" "^4.1.0" + "@smithy/querystring-parser" "^4.0.2" + "@smithy/types" "^4.2.0" tslib "^2.6.2" "@smithy/util-base64@^4.0.0": @@ -1572,37 +1574,37 @@ dependencies: tslib "^2.6.2" -"@smithy/util-defaults-mode-browser@^4.0.7": - version "4.0.7" - resolved "https://registry.yarnpkg.com/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-4.0.7.tgz#54595ab3da6765bfb388e8e8b594276e0f485710" - integrity sha512-CZgDDrYHLv0RUElOsmZtAnp1pIjwDVCSuZWOPhIOBvG36RDfX1Q9+6lS61xBf+qqvHoqRjHxgINeQz47cYFC2Q== +"@smithy/util-defaults-mode-browser@^4.0.8": + version "4.0.8" + resolved "https://registry.yarnpkg.com/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-4.0.8.tgz#77bc4590cdc928901b80f3482e79607a2cbcb150" + integrity sha512-ZTypzBra+lI/LfTYZeop9UjoJhhGRTg3pxrNpfSTQLd3AJ37r2z4AXTKpq1rFXiiUIJsYyFgNJdjWRGP/cbBaQ== dependencies: - "@smithy/property-provider" "^4.0.1" - "@smithy/smithy-client" "^4.1.6" - "@smithy/types" "^4.1.0" + "@smithy/property-provider" "^4.0.2" + "@smithy/smithy-client" "^4.2.0" + "@smithy/types" "^4.2.0" bowser "^2.11.0" tslib "^2.6.2" -"@smithy/util-defaults-mode-node@^4.0.7": - version "4.0.7" - resolved "https://registry.yarnpkg.com/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-4.0.7.tgz#0dea136de9096a36d84416f6af5843d866621491" - integrity sha512-79fQW3hnfCdrfIi1soPbK3zmooRFnLpSx3Vxi6nUlqaaQeC5dm8plt4OTNDNqEEEDkvKghZSaoti684dQFVrGQ== - dependencies: - "@smithy/config-resolver" "^4.0.1" - "@smithy/credential-provider-imds" "^4.0.1" - "@smithy/node-config-provider" "^4.0.1" - "@smithy/property-provider" "^4.0.1" - "@smithy/smithy-client" "^4.1.6" - "@smithy/types" "^4.1.0" +"@smithy/util-defaults-mode-node@^4.0.8": + version "4.0.8" + resolved "https://registry.yarnpkg.com/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-4.0.8.tgz#123b517efe6434977139b341d1f64b5f1e743aac" + integrity sha512-Rgk0Jc/UDfRTzVthye/k2dDsz5Xxs9LZaKCNPgJTRyoyBoeiNCnHsYGOyu1PKN+sDyPnJzMOz22JbwxzBp9NNA== + dependencies: + "@smithy/config-resolver" "^4.1.0" + "@smithy/credential-provider-imds" "^4.0.2" + "@smithy/node-config-provider" "^4.0.2" + "@smithy/property-provider" "^4.0.2" + "@smithy/smithy-client" "^4.2.0" + "@smithy/types" "^4.2.0" tslib "^2.6.2" -"@smithy/util-endpoints@^3.0.1": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@smithy/util-endpoints/-/util-endpoints-3.0.1.tgz#44ccbf1721447966f69496c9003b87daa8f61975" - integrity sha512-zVdUENQpdtn9jbpD9SCFK4+aSiavRb9BxEtw9ZGUR1TYo6bBHbIoi7VkrFQ0/RwZlzx0wRBaRmPclj8iAoJCLA== +"@smithy/util-endpoints@^3.0.2": + version "3.0.2" + resolved "https://registry.yarnpkg.com/@smithy/util-endpoints/-/util-endpoints-3.0.2.tgz#6933a0d6d4a349523ef71ca9540c9c0b222b559e" + integrity sha512-6QSutU5ZyrpNbnd51zRTL7goojlcnuOB55+F9VBD+j8JpRY50IGamsjlycrmpn8PQkmJucFW8A0LSfXj7jjtLQ== dependencies: - "@smithy/node-config-provider" "^4.0.1" - "@smithy/types" "^4.1.0" + "@smithy/node-config-provider" "^4.0.2" + "@smithy/types" "^4.2.0" tslib "^2.6.2" "@smithy/util-hex-encoding@^1.1.0": @@ -1626,31 +1628,31 @@ dependencies: tslib "^2.5.0" -"@smithy/util-middleware@^4.0.1": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@smithy/util-middleware/-/util-middleware-4.0.1.tgz#58d363dcd661219298c89fa176a28e98ccc4bf43" - integrity sha512-HiLAvlcqhbzhuiOa0Lyct5IIlyIz0PQO5dnMlmQ/ubYM46dPInB+3yQGkfxsk6Q24Y0n3/JmcA1v5iEhmOF5mA== +"@smithy/util-middleware@^4.0.2": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@smithy/util-middleware/-/util-middleware-4.0.2.tgz#272f1249664e27068ef0d5f967a233bf7b77962c" + integrity sha512-6GDamTGLuBQVAEuQ4yDQ+ti/YINf/MEmIegrEeg7DdB/sld8BX1lqt9RRuIcABOhAGTA50bRbPzErez7SlDtDQ== dependencies: - "@smithy/types" "^4.1.0" + "@smithy/types" "^4.2.0" tslib "^2.6.2" -"@smithy/util-retry@^4.0.1": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@smithy/util-retry/-/util-retry-4.0.1.tgz#fb5f26492383dcb9a09cc4aee23a10f839cd0769" - integrity sha512-WmRHqNVwn3kI3rKk1LsKcVgPBG6iLTBGC1iYOV3GQegwJ3E8yjzHytPt26VNzOWr1qu0xE03nK0Ug8S7T7oufw== +"@smithy/util-retry@^4.0.2": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@smithy/util-retry/-/util-retry-4.0.2.tgz#9b64cf460d63555884e641721d19e3c0abff8ee6" + integrity sha512-Qryc+QG+7BCpvjloFLQrmlSd0RsVRHejRXd78jNO3+oREueCjwG1CCEH1vduw/ZkM1U9TztwIKVIi3+8MJScGg== dependencies: - "@smithy/service-error-classification" "^4.0.1" - "@smithy/types" "^4.1.0" + "@smithy/service-error-classification" "^4.0.2" + "@smithy/types" "^4.2.0" tslib "^2.6.2" -"@smithy/util-stream@^4.1.2": - version "4.1.2" - resolved "https://registry.yarnpkg.com/@smithy/util-stream/-/util-stream-4.1.2.tgz#b867f25bc8b016de0582810a2f4092a71c5e3244" - integrity sha512-44PKEqQ303d3rlQuiDpcCcu//hV8sn+u2JBo84dWCE0rvgeiVl0IlLMagbU++o0jCWhYCsHaAt9wZuZqNe05Hw== +"@smithy/util-stream@^4.2.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@smithy/util-stream/-/util-stream-4.2.0.tgz#85f85516b0042726162bf619caa3358332195652" + integrity sha512-Vj1TtwWnuWqdgQI6YTUF5hQ/0jmFiOYsc51CSMgj7QfyO+RF4EnT2HNjoviNlOOmgzgvf3f5yno+EiC4vrnaWQ== dependencies: - "@smithy/fetch-http-handler" "^5.0.1" - "@smithy/node-http-handler" "^4.0.3" - "@smithy/types" "^4.1.0" + "@smithy/fetch-http-handler" "^5.0.2" + "@smithy/node-http-handler" "^4.0.4" + "@smithy/types" "^4.2.0" "@smithy/util-base64" "^4.0.0" "@smithy/util-buffer-from" "^4.0.0" "@smithy/util-hex-encoding" "^4.0.0" @@ -1695,13 +1697,13 @@ "@smithy/util-buffer-from" "^4.0.0" tslib "^2.6.2" -"@smithy/util-waiter@^4.0.2": - version "4.0.2" - resolved "https://registry.yarnpkg.com/@smithy/util-waiter/-/util-waiter-4.0.2.tgz#0a73a0fcd30ea7bbc3009cf98ad199f51b8eac51" - integrity sha512-piUTHyp2Axx3p/kc2CIJkYSv0BAaheBQmbACZgQSSfWUumWNW+R1lL+H9PDBxKJkvOeEX+hKYEFiwO8xagL8AQ== +"@smithy/util-waiter@^4.0.3": + version "4.0.3" + resolved "https://registry.yarnpkg.com/@smithy/util-waiter/-/util-waiter-4.0.3.tgz#ec5605ec123493259ccbf1c0b5c1951b3360f43b" + integrity sha512-JtaY3FxmD+te+KSI2FJuEcfNC9T/DGGVf551babM7fAaXhjJUt7oSYurH1Devxd2+BOSUACCgt3buinx4UnmEA== dependencies: - "@smithy/abort-controller" "^4.0.1" - "@smithy/types" "^4.1.0" + "@smithy/abort-controller" "^4.0.2" + "@smithy/types" "^4.2.0" tslib "^2.6.2" "@tootallnate/once@2": @@ -1774,9 +1776,9 @@ "@types/babel__traverse" "*" "@types/babel__generator@*": - version "7.6.8" - resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.8.tgz#f836c61f48b1346e7d2b0d93c6dacc5b9535d3ab" - integrity sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw== + version "7.27.0" + resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.27.0.tgz#b5819294c51179957afaec341442f9341e4108a9" + integrity sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg== dependencies: "@babel/types" "^7.0.0" @@ -1789,9 +1791,9 @@ "@babel/types" "^7.0.0" "@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": - version "7.20.6" - resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.20.6.tgz#8dc9f0ae0f202c08d8d4dab648912c8d6038e3f7" - integrity sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg== + version "7.20.7" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.20.7.tgz#968cdc2366ec3da159f61166428ee40f370e56c2" + integrity sha512-dkO5fhS7+/oos4ciWxyEyjWe48zmG6wbCheo/G2ZnHx4fs3EU6YC6UM8rk56gAjNJ9P3MTH2jo5jb92/K6wbng== dependencies: "@babel/types" "^7.20.7" @@ -1819,9 +1821,9 @@ "@types/json-schema" "*" "@types/estree@*", "@types/estree@^1.0.6": - version "1.0.6" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.6.tgz#628effeeae2064a1b4e79f78e81d87b7e5fc7b50" - integrity sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw== + version "1.0.7" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.7.tgz#4158d3105276773d5b7695cd4834b1722e4f37a8" + integrity sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ== "@types/graceful-fs@^4.1.3": version "4.1.9" @@ -1885,16 +1887,16 @@ form-data "^4.0.0" "@types/node@*": - version "22.13.10" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.13.10.tgz#df9ea358c5ed991266becc3109dc2dc9125d77e4" - integrity sha512-I6LPUvlRH+O6VRUqYOcMudhaIdUVWfsjnZavnsraHvpBwaEyMN29ry+0UVJhImYL16xsscu0aske3yA+uPOWfw== + version "22.14.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.14.1.tgz#53b54585cec81c21eee3697521e31312d6ca1e6f" + integrity sha512-u0HuPQwe/dHrItgHHpmw3N2fYCR6x4ivMNbPHRkBVP4CvN+kiRrKHWk3i8tXiO/joPwXLMYvF9TTF0eqgHIuOw== dependencies: - undici-types "~6.20.0" + undici-types "~6.21.0" "@types/node@^18.11.18", "@types/node@^18.19.70": - version "18.19.80" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.80.tgz#6d6008e8920dddcd23f9dd33da24684ef57d487c" - integrity sha512-kEWeMwMeIvxYkeg1gTc01awpwLbfMRZXdIhwRcakd/KlK53jmRC26LqcbIt7fnAQTu5GzlnWmzA3H6+l1u6xxQ== + version "18.19.86" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.86.tgz#a7e1785289c343155578b9d84a0e3e924deb948b" + integrity sha512-fifKayi175wLyKyc5qUfyENhQ1dCNI1UNjp653d8kuYcPQN5JhX3dGuP/XmvPTg/xRBn1VTLpbmi+H/Mr7tLfQ== dependencies: undici-types "~5.26.4" @@ -2372,9 +2374,9 @@ camelcase@^6.2.0: integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30001688: - version "1.0.30001706" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001706.tgz#902c3f896f4b2968031c3a546ab2ef8b465a2c8f" - integrity sha512-3ZczoTApMAZwPKYWmwVbQMFpXBDds3/0VciVoUwPUbldlYyVLmRVuRs/PcUZtHpbLRpzzDvrvnFuREsGt6lUug== + version "1.0.30001713" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001713.tgz#6b33a8857e6c7dcb41a0caa2dd0f0489c823a52d" + integrity sha512-wCIWIg+A4Xr7NfhTuHdX+/FKh3+Op3LBbSp2N5Pfx6T/LhdQy3GTyoTg48BReaW/MyMNZAkTadsBtai3ldWK0Q== chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0: version "4.1.2" @@ -2426,9 +2428,9 @@ co@^4.6.0: integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== cohere-ai@^7.15.0: - version "7.16.0" - resolved "https://registry.yarnpkg.com/cohere-ai/-/cohere-ai-7.16.0.tgz#6dfa16426cb3a082c27c0736f4d0d574098b2f77" - integrity sha512-hrG3EtVNSJLxJTaEeGRli+5rX34GiQC/UZ2WuUpaWiRwYbfzz7zKflfU/tg8SFFjkvYHDyS43UvVESepNd8C4w== + version "7.17.0" + resolved "https://registry.yarnpkg.com/cohere-ai/-/cohere-ai-7.17.0.tgz#a762f726e6e4c3ad727aeb61b0591b119a38122b" + integrity sha512-E5dYL+GotIwTdCXjCywEu2yKPkr/Crsqzyf6kmC+yyypkeKMI9grYpkopZJDqpwNGd1WAXKCyrjm/C2tLV8Mbw== dependencies: "@aws-sdk/client-sagemaker" "^3.583.0" "@aws-sdk/credential-providers" "^3.583.0" @@ -2584,9 +2586,9 @@ domexception@^4.0.0: webidl-conversions "^7.0.0" dotenv@^16.4.6: - version "16.4.7" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.7.tgz#0e20c5b82950140aa99be360a8a5f52335f53c26" - integrity sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ== + version "16.5.0" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.5.0.tgz#092b49f25f808f020050051d1ff258e404c78692" + integrity sha512-m/C+AwOAr9/W1UOIZUo232ejMNnJAJtYQjUbHoNTBNTJSvqzzDh7vnrei3o3r3m9blf6ZoDkvcw0VmozNRFJxg== dunder-proto@^1.0.1: version "1.0.1" @@ -2605,9 +2607,9 @@ ejs@^3.1.10: jake "^10.8.5" electron-to-chromium@^1.5.73: - version "1.5.120" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.120.tgz#ccfdd28e9795fb8c2221cefa2c9a071501c86247" - integrity sha512-oTUp3gfX1gZI+xfD2djr2rzQdHCwHzPQrrK0CD7WpTdF0nPdQ/INcRVjWgLdCT4a9W3jFObR9DAfsuyFQnI8CQ== + version "1.5.137" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.137.tgz#53a7fef3ea9f7eb5fcf704454050ff930c43ed92" + integrity sha512-/QSJaU2JyIuTbbABAo/crOs+SuAZLS+fVVS10PVrIT9hrRkmZl8Hb0xPSkKRUUWHQtYzXHpQUW3Dy5hwMzGZkA== emittery@^0.13.1: version "0.13.1" @@ -3806,9 +3808,9 @@ npm-run-path@^4.0.1: path-key "^3.0.0" nwsapi@^2.2.2: - version "2.2.19" - resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.19.tgz#586660f7c24c34691907002309a8dc28064c9c0b" - integrity sha512-94bcyI3RsqiZufXjkr3ltkI86iEl+I7uiHVDtcq9wJUTwYQJ5odHDeSzkkrRzi80jJ8MaeZgqKjH1bAWAFw9bA== + version "2.2.20" + resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.20.tgz#22e53253c61e7b0e7e93cef42c891154bcca11ef" + integrity sha512-/ieB+mDe4MrrKMT8z+mQL8klXydZWGR5Dowt4RAGKbJ3kIGEx3X4ljUo+6V73IXtUPWgfOlU5B9MlGxFO5T+cA== object-inspect@^1.13.3: version "1.13.4" @@ -3830,9 +3832,9 @@ onetime@^5.1.2: mimic-fn "^2.1.0" openai@^4.74.0: - version "4.87.4" - resolved "https://registry.yarnpkg.com/openai/-/openai-4.87.4.tgz#f9d8da366a1ded2c7aa92cb9f2256755d0e58902" - integrity sha512-lsfM20jZY4A0lNexfoUAkfmrEXxaTXvv8OKYicpeAJUNHObpRgkvC7pxPgMnB6gc9ID8OCwzzhEhBpNy69UR7w== + version "4.94.0" + resolved "https://registry.yarnpkg.com/openai/-/openai-4.94.0.tgz#d5fb3f39ec0e2090687dc9f97db4ca05200e27ca" + integrity sha512-WVmr9HWcwfouLJ7R3UHd2A93ClezTPuJljQxkCYQAL15Sjyt+FBNoqEz5MHSdH/ebQrVyvRhFyn/bvdqtSPyIA== dependencies: "@types/node" "^18.11.18" "@types/node-fetch" "^2.6.4" @@ -3916,9 +3918,9 @@ picomatch@^2.0.4, picomatch@^2.2.3, picomatch@^2.3.1: integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== pirates@^4.0.4: - version "4.0.6" - resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9" - integrity sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg== + version "4.0.7" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.7.tgz#643b4a18c4257c8a65104b73f3049ce9a0a15e22" + integrity sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA== pkg-dir@^4.2.0: version "4.2.0" @@ -4377,9 +4379,9 @@ tr46@~0.0.3: integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== ts-jest@^29.1.1: - version "29.2.6" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.2.6.tgz#df53edf8b72fb89de032cfa310abf37582851d9a" - integrity sha512-yTNZVZqc8lSixm+QGVFcPe6+yj7+TWZwIesuOWvfcn4B9bz5x4NDzVCQQjOs7Hfouu36aEqfEbo9Qpo+gq8dDg== + version "29.3.2" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.3.2.tgz#0576cdf0a507f811fe73dcd16d135ce89f8156cb" + integrity sha512-bJJkrWc6PjFVz5g2DGCNUo8z7oFEYaz1xP1NpeDU7KNLMWPpEyV8Chbpkn8xjzgRDpQhnGMyvyldoL7h8JXyug== dependencies: bs-logger "^0.2.6" ejs "^3.1.10" @@ -4389,6 +4391,7 @@ ts-jest@^29.1.1: lodash.memoize "^4.1.2" make-error "^1.3.6" semver "^7.7.1" + type-fest "^4.39.1" yargs-parser "^21.1.1" ts-loader@^9.5.1: @@ -4422,6 +4425,11 @@ type-fest@^0.21.3: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== +type-fest@^4.39.1: + version "4.40.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-4.40.0.tgz#62bc09caccb99a75e1ad6b9b4653e8805e5e1eee" + integrity sha512-ABHZ2/tS2JkvH1PEjxFDTUWC8dB5OsIGZP4IFLhR293GqT5Y5qB1WwL2kMPYhQW9DVgVD8Hd7I8gjwPIf5GFkw== + typescript@~5.7.2: version "5.7.3" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.7.3.tgz#919b44a7dbb8583a9b856d162be24a54bf80073e" @@ -4432,10 +4440,10 @@ undici-types@~5.26.4: resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== -undici-types@~6.20.0: - version "6.20.0" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.20.0.tgz#8171bf22c1f588d1554d55bf204bc624af388433" - integrity sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg== +undici-types@~6.21.0: + version "6.21.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.21.0.tgz#691d00af3909be93a7faa13be61b3a5b50ef12cb" + integrity sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ== universalify@^0.2.0: version "0.2.0" @@ -4520,9 +4528,9 @@ webpack-sources@^3.2.3: integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== webpack@^5.97.1: - version "5.98.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.98.0.tgz#44ae19a8f2ba97537978246072fb89d10d1fbd17" - integrity sha512-UFynvx+gM44Gv9qFgj0acCQK2VE1CtdfwFdimkapco3hlPCJ/zeq73n2yVKimVbtm+TnApIugGhLJnkU6gjYXA== + version "5.99.5" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.99.5.tgz#86e3b3a5a03377ea5da271c929934003f5ac5dd8" + integrity sha512-q+vHBa6H9qwBLUlHL4Y7L0L1/LlyBKZtS9FHNCQmtayxjI5RKC9yD8gpvLeqGv5lCQp1Re04yi0MF40pf30Pvg== dependencies: "@types/eslint-scope" "^3.7.7" "@types/estree" "^1.0.6" From 2e5e9efce2fb6e1d66f3cca1161ab2d783279223 Mon Sep 17 00:00:00 2001 From: Andrei Bratu Date: Tue, 15 Apr 2025 21:04:59 +0100 Subject: [PATCH 2/2] overload log for agents --- src/humanloop.client.ts | 8 ++++++++ src/overload.ts | 7 +++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/humanloop.client.ts b/src/humanloop.client.ts index ce35228d..76208af7 100644 --- a/src/humanloop.client.ts +++ b/src/humanloop.client.ts @@ -8,6 +8,7 @@ import { NodeTracerProvider } from "@opentelemetry/sdk-trace-node"; import { AnthropicInstrumentation } from "@traceloop/instrumentation-anthropic"; import { CohereInstrumentation } from "@traceloop/instrumentation-cohere"; import { OpenAIInstrumentation } from "@traceloop/instrumentation-openai"; +import { Agents } from "api/resources/agents/client/Client"; import { HumanloopClient as BaseHumanloopClient } from "./Client"; import { ChatMessage } from "./api"; @@ -216,6 +217,7 @@ export class HumanloopClient extends BaseHumanloopClient { protected readonly _flows_overloaded: Flows; protected readonly _tools_overloaded: Tools; protected readonly _evaluators_overloaded: Evaluators; + protected readonly _agents_overloaded: Agents; protected readonly instrumentProviders: { OpenAI?: any; Anthropic?: any; @@ -276,6 +278,8 @@ export class HumanloopClient extends BaseHumanloopClient { this._evaluators_overloaded = overloadLog(super.evaluators); + this._agents_overloaded = overloadLog(super.agents); + this._evaluations = new ExtendedEvaluations(_options, this); // Initialize the tracer singleton @@ -571,6 +575,10 @@ ${RESET}`, return this._evaluations; } + public get agents(): Agents { + return this._agents_overloaded; + } + public get prompts(): Prompts { return this._prompts_overloaded; } diff --git a/src/overload.ts b/src/overload.ts index dd66643a..5b4c3652 100644 --- a/src/overload.ts +++ b/src/overload.ts @@ -1,3 +1,4 @@ +import { Agents } from "api/resources/agents/client/Client"; import { CreateEvaluatorLogRequest, FlowLogRequest, @@ -12,7 +13,7 @@ import { Tools } from "./api/resources/tools/client/Client"; import { getDecoratorContext, getEvaluationContext, getTraceId } from "./context"; import { HumanloopRuntimeError } from "./error"; -export function overloadLog( +export function overloadLog( client: T, ): T { const originalLog = client.log.bind(client); @@ -35,7 +36,9 @@ export function overloadLog( ? Tools.RequestOptions : T extends Evaluators ? Evaluators.RequestOptions - : never, + : T extends Agents + ? Agents.RequestOptions + : never, ) => { const traceId = getTraceId(); if (traceId !== undefined && client instanceof Flows) {