opik 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Node18UniversalStreamWrapper-5PLK6H2I.js +216 -0
- package/dist/NodePre18StreamWrapper-PJE27LW2.js +88 -0
- package/dist/UndiciStreamWrapper-M2WUKUR4.js +204 -0
- package/dist/chunk-MLKGABMK.js +9 -0
- package/dist/index.cjs +10735 -0
- package/dist/index.d.cts +3653 -0
- package/dist/index.d.ts +3653 -0
- package/dist/index.js +10173 -0
- package/examples/manual-trace.js +16 -0
- package/package.json +56 -0
- package/src/opik/client/Client.ts +65 -0
- package/src/opik/config/Config.ts +35 -0
- package/src/opik/index.ts +2 -0
- package/src/opik/rest_api/Client.ts +247 -0
- package/src/opik/rest_api/api/errors/BadRequestError.ts +16 -0
- package/src/opik/rest_api/api/errors/ConflictError.ts +16 -0
- package/src/opik/rest_api/api/errors/ForbiddenError.ts +17 -0
- package/src/opik/rest_api/api/errors/NotFoundError.ts +16 -0
- package/src/opik/rest_api/api/errors/NotImplementedError.ts +16 -0
- package/src/opik/rest_api/api/errors/UnauthorizedError.ts +17 -0
- package/src/opik/rest_api/api/errors/UnprocessableEntityError.ts +16 -0
- package/src/opik/rest_api/api/errors/index.ts +7 -0
- package/src/opik/rest_api/api/index.ts +3 -0
- package/src/opik/rest_api/api/resources/chatCompletions/client/Client.ts +125 -0
- package/src/opik/rest_api/api/resources/chatCompletions/client/index.ts +1 -0
- package/src/opik/rest_api/api/resources/chatCompletions/client/requests/ChatCompletionRequest.ts +33 -0
- package/src/opik/rest_api/api/resources/chatCompletions/client/requests/index.ts +1 -0
- package/src/opik/rest_api/api/resources/chatCompletions/index.ts +1 -0
- package/src/opik/rest_api/api/resources/check/client/Client.ts +141 -0
- package/src/opik/rest_api/api/resources/check/client/index.ts +1 -0
- package/src/opik/rest_api/api/resources/check/index.ts +1 -0
- package/src/opik/rest_api/api/resources/datasets/client/Client.ts +1244 -0
- package/src/opik/rest_api/api/resources/datasets/client/index.ts +1 -0
- package/src/opik/rest_api/api/resources/datasets/client/requests/DatasetIdentifier.ts +13 -0
- package/src/opik/rest_api/api/resources/datasets/client/requests/DatasetIdentifierPublic.ts +13 -0
- package/src/opik/rest_api/api/resources/datasets/client/requests/DatasetItemBatchWrite.ts +21 -0
- package/src/opik/rest_api/api/resources/datasets/client/requests/DatasetItemStreamRequest.ts +9 -0
- package/src/opik/rest_api/api/resources/datasets/client/requests/DatasetItemsDelete.ts +13 -0
- package/src/opik/rest_api/api/resources/datasets/client/requests/DatasetUpdate.ts +14 -0
- package/src/opik/rest_api/api/resources/datasets/client/requests/DatasetWrite.ts +15 -0
- package/src/opik/rest_api/api/resources/datasets/client/requests/FindDatasetItemsWithExperimentItemsRequest.ts +17 -0
- package/src/opik/rest_api/api/resources/datasets/client/requests/FindDatasetsRequest.ts +16 -0
- package/src/opik/rest_api/api/resources/datasets/client/requests/GetDatasetItemsOutputColumnsRequest.ts +11 -0
- package/src/opik/rest_api/api/resources/datasets/client/requests/GetDatasetItemsRequest.ts +13 -0
- package/src/opik/rest_api/api/resources/datasets/client/requests/index.ts +11 -0
- package/src/opik/rest_api/api/resources/datasets/index.ts +1 -0
- package/src/opik/rest_api/api/resources/experiments/client/Client.ts +858 -0
- package/src/opik/rest_api/api/resources/experiments/client/index.ts +1 -0
- package/src/opik/rest_api/api/resources/experiments/client/requests/ExperimentItemStreamRequest.ts +9 -0
- package/src/opik/rest_api/api/resources/experiments/client/requests/ExperimentItemsBatch.ts +19 -0
- package/src/opik/rest_api/api/resources/experiments/client/requests/ExperimentItemsDelete.ts +13 -0
- package/src/opik/rest_api/api/resources/experiments/client/requests/ExperimentWrite.ts +19 -0
- package/src/opik/rest_api/api/resources/experiments/client/requests/ExperimentsDelete.ts +13 -0
- package/src/opik/rest_api/api/resources/experiments/client/requests/FindExperimentsRequest.ts +16 -0
- package/src/opik/rest_api/api/resources/experiments/client/requests/FindFeedbackScoreNamesRequest.ts +11 -0
- package/src/opik/rest_api/api/resources/experiments/client/requests/IdentifierPublic.ts +13 -0
- package/src/opik/rest_api/api/resources/experiments/client/requests/index.ts +8 -0
- package/src/opik/rest_api/api/resources/experiments/index.ts +1 -0
- package/src/opik/rest_api/api/resources/feedbackDefinitions/client/Client.ts +515 -0
- package/src/opik/rest_api/api/resources/feedbackDefinitions/client/index.ts +1 -0
- package/src/opik/rest_api/api/resources/feedbackDefinitions/client/requests/FindFeedbackDefinitionsRequest.ts +16 -0
- package/src/opik/rest_api/api/resources/feedbackDefinitions/client/requests/index.ts +1 -0
- package/src/opik/rest_api/api/resources/feedbackDefinitions/index.ts +2 -0
- package/src/opik/rest_api/api/resources/feedbackDefinitions/types/FindFeedbackDefinitionsRequestType.ts +10 -0
- package/src/opik/rest_api/api/resources/feedbackDefinitions/types/index.ts +1 -0
- package/src/opik/rest_api/api/resources/index.ts +23 -0
- package/src/opik/rest_api/api/resources/llmProviderKey/client/Client.ts +412 -0
- package/src/opik/rest_api/api/resources/llmProviderKey/client/index.ts +1 -0
- package/src/opik/rest_api/api/resources/llmProviderKey/client/requests/ProviderApiKeyUpdate.ts +13 -0
- package/src/opik/rest_api/api/resources/llmProviderKey/client/requests/ProviderApiKeyWrite.ts +13 -0
- package/src/opik/rest_api/api/resources/llmProviderKey/client/requests/index.ts +2 -0
- package/src/opik/rest_api/api/resources/llmProviderKey/index.ts +1 -0
- package/src/opik/rest_api/api/resources/projects/client/Client.ts +720 -0
- package/src/opik/rest_api/api/resources/projects/client/index.ts +1 -0
- package/src/opik/rest_api/api/resources/projects/client/requests/FindProjectsRequest.ts +14 -0
- package/src/opik/rest_api/api/resources/projects/client/requests/ProjectMetricRequestPublic.ts +16 -0
- package/src/opik/rest_api/api/resources/projects/client/requests/ProjectRetrievePublic.ts +13 -0
- package/src/opik/rest_api/api/resources/projects/client/requests/ProjectUpdate.ts +12 -0
- package/src/opik/rest_api/api/resources/projects/client/requests/ProjectWrite.ts +14 -0
- package/src/opik/rest_api/api/resources/projects/client/requests/index.ts +5 -0
- package/src/opik/rest_api/api/resources/projects/index.ts +2 -0
- package/src/opik/rest_api/api/resources/projects/types/ProjectMetricRequestPublicInterval.ts +11 -0
- package/src/opik/rest_api/api/resources/projects/types/ProjectMetricRequestPublicMetricType.ts +18 -0
- package/src/opik/rest_api/api/resources/projects/types/index.ts +2 -0
- package/src/opik/rest_api/api/resources/prompts/client/Client.ts +900 -0
- package/src/opik/rest_api/api/resources/prompts/client/index.ts +1 -0
- package/src/opik/rest_api/api/resources/prompts/client/requests/CreatePromptVersionDetail.ts +19 -0
- package/src/opik/rest_api/api/resources/prompts/client/requests/GetPromptVersionsRequest.ts +12 -0
- package/src/opik/rest_api/api/resources/prompts/client/requests/GetPromptsRequest.ts +13 -0
- package/src/opik/rest_api/api/resources/prompts/client/requests/PromptUpdatable.ts +14 -0
- package/src/opik/rest_api/api/resources/prompts/client/requests/PromptVersionRetrieveDetail.ts +14 -0
- package/src/opik/rest_api/api/resources/prompts/client/requests/PromptWrite.ts +16 -0
- package/src/opik/rest_api/api/resources/prompts/client/requests/index.ts +6 -0
- package/src/opik/rest_api/api/resources/prompts/index.ts +1 -0
- package/src/opik/rest_api/api/resources/spans/client/Client.ts +957 -0
- package/src/opik/rest_api/api/resources/spans/client/index.ts +1 -0
- package/src/opik/rest_api/api/resources/spans/client/requests/FindFeedbackScoreNames1Request.ts +14 -0
- package/src/opik/rest_api/api/resources/spans/client/requests/GetSpanStatsRequest.ts +17 -0
- package/src/opik/rest_api/api/resources/spans/client/requests/GetSpansByProjectRequest.ts +20 -0
- package/src/opik/rest_api/api/resources/spans/client/requests/SpanBatchWrite.ts +20 -0
- package/src/opik/rest_api/api/resources/spans/client/requests/SpanUpdate.ts +29 -0
- package/src/opik/rest_api/api/resources/spans/client/requests/index.ts +5 -0
- package/src/opik/rest_api/api/resources/spans/index.ts +2 -0
- package/src/opik/rest_api/api/resources/spans/types/FindFeedbackScoreNames1RequestType.ts +11 -0
- package/src/opik/rest_api/api/resources/spans/types/GetSpanStatsRequestType.ts +11 -0
- package/src/opik/rest_api/api/resources/spans/types/GetSpansByProjectRequestType.ts +11 -0
- package/src/opik/rest_api/api/resources/spans/types/index.ts +3 -0
- package/src/opik/rest_api/api/resources/systemUsage/client/Client.ts +347 -0
- package/src/opik/rest_api/api/resources/systemUsage/client/index.ts +1 -0
- package/src/opik/rest_api/api/resources/systemUsage/index.ts +1 -0
- package/src/opik/rest_api/api/resources/traces/client/Client.ts +990 -0
- package/src/opik/rest_api/api/resources/traces/client/index.ts +1 -0
- package/src/opik/rest_api/api/resources/traces/client/requests/FindFeedbackScoreNames2Request.ts +11 -0
- package/src/opik/rest_api/api/resources/traces/client/requests/GetTraceStatsRequest.ts +13 -0
- package/src/opik/rest_api/api/resources/traces/client/requests/GetTracesByProjectRequest.ts +16 -0
- package/src/opik/rest_api/api/resources/traces/client/requests/TraceBatchWrite.ts +18 -0
- package/src/opik/rest_api/api/resources/traces/client/requests/TraceUpdate.ts +22 -0
- package/src/opik/rest_api/api/resources/traces/client/requests/index.ts +5 -0
- package/src/opik/rest_api/api/resources/traces/index.ts +1 -0
- package/src/opik/rest_api/api/types/AssistantMessage.ts +14 -0
- package/src/opik/rest_api/api/types/AssistantMessageRole.ts +13 -0
- package/src/opik/rest_api/api/types/AuthDetailsHolder.ts +5 -0
- package/src/opik/rest_api/api/types/AvgValueStatPublic.ts +7 -0
- package/src/opik/rest_api/api/types/BatchDelete.ts +7 -0
- package/src/opik/rest_api/api/types/BiInformation.ts +9 -0
- package/src/opik/rest_api/api/types/BiInformationResponse.ts +9 -0
- package/src/opik/rest_api/api/types/CategoricalFeedbackDefinition.ts +13 -0
- package/src/opik/rest_api/api/types/CategoricalFeedbackDefinitionCreate.ts +9 -0
- package/src/opik/rest_api/api/types/CategoricalFeedbackDefinitionPublic.ts +13 -0
- package/src/opik/rest_api/api/types/CategoricalFeedbackDefinitionUpdate.ts +9 -0
- package/src/opik/rest_api/api/types/CategoricalFeedbackDetail.ts +7 -0
- package/src/opik/rest_api/api/types/CategoricalFeedbackDetailCreate.ts +7 -0
- package/src/opik/rest_api/api/types/CategoricalFeedbackDetailPublic.ts +7 -0
- package/src/opik/rest_api/api/types/CategoricalFeedbackDetailUpdate.ts +7 -0
- package/src/opik/rest_api/api/types/ChatCompletionChoice.ts +12 -0
- package/src/opik/rest_api/api/types/ChatCompletionResponse.ts +14 -0
- package/src/opik/rest_api/api/types/ChunkedOutputJsonNode.ts +10 -0
- package/src/opik/rest_api/api/types/ChunkedOutputJsonNodeType.ts +7 -0
- package/src/opik/rest_api/api/types/Column.ts +13 -0
- package/src/opik/rest_api/api/types/ColumnCompare.ts +13 -0
- package/src/opik/rest_api/api/types/ColumnCompareTypesItem.ts +14 -0
- package/src/opik/rest_api/api/types/ColumnPublic.ts +13 -0
- package/src/opik/rest_api/api/types/ColumnPublicTypesItem.ts +14 -0
- package/src/opik/rest_api/api/types/ColumnTypesItem.ts +14 -0
- package/src/opik/rest_api/api/types/CompletionTokensDetails.ts +7 -0
- package/src/opik/rest_api/api/types/CountValueStatPublic.ts +7 -0
- package/src/opik/rest_api/api/types/DataPointNumberPublic.ts +8 -0
- package/src/opik/rest_api/api/types/Dataset.ts +17 -0
- package/src/opik/rest_api/api/types/DatasetItem.ts +21 -0
- package/src/opik/rest_api/api/types/DatasetItemBatch.ts +13 -0
- package/src/opik/rest_api/api/types/DatasetItemCompare.ts +21 -0
- package/src/opik/rest_api/api/types/DatasetItemCompareSource.ts +12 -0
- package/src/opik/rest_api/api/types/DatasetItemPageCompare.ts +13 -0
- package/src/opik/rest_api/api/types/DatasetItemPagePublic.ts +13 -0
- package/src/opik/rest_api/api/types/DatasetItemPublic.ts +21 -0
- package/src/opik/rest_api/api/types/DatasetItemPublicSource.ts +12 -0
- package/src/opik/rest_api/api/types/DatasetItemSource.ts +12 -0
- package/src/opik/rest_api/api/types/DatasetItemWrite.ts +16 -0
- package/src/opik/rest_api/api/types/DatasetItemWriteSource.ts +12 -0
- package/src/opik/rest_api/api/types/DatasetPagePublic.ts +12 -0
- package/src/opik/rest_api/api/types/DatasetPublic.ts +17 -0
- package/src/opik/rest_api/api/types/DeleteFeedbackScore.ts +7 -0
- package/src/opik/rest_api/api/types/Delta.ts +12 -0
- package/src/opik/rest_api/api/types/DeltaRole.ts +13 -0
- package/src/opik/rest_api/api/types/ErrorInfo.ts +9 -0
- package/src/opik/rest_api/api/types/ErrorInfoPublic.ts +9 -0
- package/src/opik/rest_api/api/types/ErrorInfoWrite.ts +9 -0
- package/src/opik/rest_api/api/types/ErrorMessage.ts +9 -0
- package/src/opik/rest_api/api/types/ErrorMessageDetail.ts +9 -0
- package/src/opik/rest_api/api/types/ErrorMessagePublic.ts +7 -0
- package/src/opik/rest_api/api/types/Experiment.ts +20 -0
- package/src/opik/rest_api/api/types/ExperimentItem.ts +19 -0
- package/src/opik/rest_api/api/types/ExperimentItemCompare.ts +19 -0
- package/src/opik/rest_api/api/types/ExperimentItemPublic.ts +14 -0
- package/src/opik/rest_api/api/types/ExperimentPagePublic.ts +12 -0
- package/src/opik/rest_api/api/types/ExperimentPublic.ts +20 -0
- package/src/opik/rest_api/api/types/Feedback.ts +26 -0
- package/src/opik/rest_api/api/types/FeedbackCreate.ts +22 -0
- package/src/opik/rest_api/api/types/FeedbackDefinitionPagePublic.ts +12 -0
- package/src/opik/rest_api/api/types/FeedbackObjectPublic.ts +26 -0
- package/src/opik/rest_api/api/types/FeedbackPublic.ts +26 -0
- package/src/opik/rest_api/api/types/FeedbackScore.ts +17 -0
- package/src/opik/rest_api/api/types/FeedbackScoreAverage.ts +8 -0
- package/src/opik/rest_api/api/types/FeedbackScoreAveragePublic.ts +8 -0
- package/src/opik/rest_api/api/types/FeedbackScoreBatch.ts +9 -0
- package/src/opik/rest_api/api/types/FeedbackScoreBatchItem.ts +16 -0
- package/src/opik/rest_api/api/types/FeedbackScoreBatchItemSource.ts +10 -0
- package/src/opik/rest_api/api/types/FeedbackScoreCompare.ts +17 -0
- package/src/opik/rest_api/api/types/FeedbackScoreCompareSource.ts +10 -0
- package/src/opik/rest_api/api/types/FeedbackScorePublic.ts +17 -0
- package/src/opik/rest_api/api/types/FeedbackScorePublicSource.ts +10 -0
- package/src/opik/rest_api/api/types/FeedbackScoreSource.ts +10 -0
- package/src/opik/rest_api/api/types/FeedbackUpdate.ts +22 -0
- package/src/opik/rest_api/api/types/Function.ts +12 -0
- package/src/opik/rest_api/api/types/FunctionCall.ts +8 -0
- package/src/opik/rest_api/api/types/JsonNode.ts +5 -0
- package/src/opik/rest_api/api/types/JsonNodeCompare.ts +5 -0
- package/src/opik/rest_api/api/types/JsonNodePublic.ts +5 -0
- package/src/opik/rest_api/api/types/JsonNodeWrite.ts +5 -0
- package/src/opik/rest_api/api/types/JsonObjectSchema.ts +14 -0
- package/src/opik/rest_api/api/types/JsonSchema.ts +11 -0
- package/src/opik/rest_api/api/types/JsonSchemaElement.ts +7 -0
- package/src/opik/rest_api/api/types/Message.ts +5 -0
- package/src/opik/rest_api/api/types/NumericalFeedbackDefinition.ts +13 -0
- package/src/opik/rest_api/api/types/NumericalFeedbackDefinitionCreate.ts +9 -0
- package/src/opik/rest_api/api/types/NumericalFeedbackDefinitionPublic.ts +13 -0
- package/src/opik/rest_api/api/types/NumericalFeedbackDefinitionUpdate.ts +9 -0
- package/src/opik/rest_api/api/types/NumericalFeedbackDetail.ts +8 -0
- package/src/opik/rest_api/api/types/NumericalFeedbackDetailCreate.ts +8 -0
- package/src/opik/rest_api/api/types/NumericalFeedbackDetailPublic.ts +8 -0
- package/src/opik/rest_api/api/types/NumericalFeedbackDetailUpdate.ts +8 -0
- package/src/opik/rest_api/api/types/PageColumns.ts +9 -0
- package/src/opik/rest_api/api/types/PercentageValueStatPublic.ts +9 -0
- package/src/opik/rest_api/api/types/PercentageValuesPublic.ts +9 -0
- package/src/opik/rest_api/api/types/Project.ts +14 -0
- package/src/opik/rest_api/api/types/ProjectMetricResponsePublic.ts +12 -0
- package/src/opik/rest_api/api/types/ProjectMetricResponsePublicInterval.ts +11 -0
- package/src/opik/rest_api/api/types/ProjectMetricResponsePublicMetricType.ts +18 -0
- package/src/opik/rest_api/api/types/ProjectPagePublic.ts +13 -0
- package/src/opik/rest_api/api/types/ProjectPublic.ts +14 -0
- package/src/opik/rest_api/api/types/ProjectStatItemObjectPublic.ts +28 -0
- package/src/opik/rest_api/api/types/ProjectStatsPublic.ts +9 -0
- package/src/opik/rest_api/api/types/Prompt.ts +18 -0
- package/src/opik/rest_api/api/types/PromptDetail.ts +17 -0
- package/src/opik/rest_api/api/types/PromptPagePublic.ts +12 -0
- package/src/opik/rest_api/api/types/PromptPublic.ts +14 -0
- package/src/opik/rest_api/api/types/PromptVersion.ts +15 -0
- package/src/opik/rest_api/api/types/PromptVersionDetail.ts +15 -0
- package/src/opik/rest_api/api/types/PromptVersionLink.ts +9 -0
- package/src/opik/rest_api/api/types/PromptVersionLinkPublic.ts +9 -0
- package/src/opik/rest_api/api/types/PromptVersionLinkWrite.ts +7 -0
- package/src/opik/rest_api/api/types/PromptVersionPagePublic.ts +12 -0
- package/src/opik/rest_api/api/types/PromptVersionPublic.ts +14 -0
- package/src/opik/rest_api/api/types/ProviderApiKey.ts +13 -0
- package/src/opik/rest_api/api/types/ProviderApiKeyPublic.ts +12 -0
- package/src/opik/rest_api/api/types/ResponseFormat.ts +10 -0
- package/src/opik/rest_api/api/types/ResponseFormatType.ts +11 -0
- package/src/opik/rest_api/api/types/ResultsNumberPublic.ts +10 -0
- package/src/opik/rest_api/api/types/Span.ts +32 -0
- package/src/opik/rest_api/api/types/SpanBatch.ts +9 -0
- package/src/opik/rest_api/api/types/SpanPagePublic.ts +12 -0
- package/src/opik/rest_api/api/types/SpanPublic.ts +30 -0
- package/src/opik/rest_api/api/types/SpanPublicType.ts +11 -0
- package/src/opik/rest_api/api/types/SpanType.ts +11 -0
- package/src/opik/rest_api/api/types/SpanWrite.ts +25 -0
- package/src/opik/rest_api/api/types/SpanWriteType.ts +11 -0
- package/src/opik/rest_api/api/types/StreamOptions.ts +7 -0
- package/src/opik/rest_api/api/types/Tool.ts +10 -0
- package/src/opik/rest_api/api/types/ToolCall.ts +12 -0
- package/src/opik/rest_api/api/types/Trace.ts +27 -0
- package/src/opik/rest_api/api/types/TraceBatch.ts +9 -0
- package/src/opik/rest_api/api/types/TraceCountResponse.ts +9 -0
- package/src/opik/rest_api/api/types/TracePagePublic.ts +12 -0
- package/src/opik/rest_api/api/types/TracePublic.ts +25 -0
- package/src/opik/rest_api/api/types/TraceWrite.ts +19 -0
- package/src/opik/rest_api/api/types/Usage.ts +12 -0
- package/src/opik/rest_api/api/types/WorkspaceTraceCount.ts +8 -0
- package/src/opik/rest_api/api/types/index.ts +138 -0
- package/src/opik/rest_api/core/api-promise/APIPromise.ts +54 -0
- package/src/opik/rest_api/core/api-promise/index.ts +1 -0
- package/src/opik/rest_api/core/fetcher/APIResponse.ts +12 -0
- package/src/opik/rest_api/core/fetcher/Fetcher.ts +143 -0
- package/src/opik/rest_api/core/fetcher/Supplier.ts +11 -0
- package/src/opik/rest_api/core/fetcher/createRequestUrl.ts +10 -0
- package/src/opik/rest_api/core/fetcher/getFetchFn.ts +25 -0
- package/src/opik/rest_api/core/fetcher/getHeader.ts +8 -0
- package/src/opik/rest_api/core/fetcher/getRequestBody.ts +14 -0
- package/src/opik/rest_api/core/fetcher/getResponseBody.ts +34 -0
- package/src/opik/rest_api/core/fetcher/index.ts +5 -0
- package/src/opik/rest_api/core/fetcher/makeRequest.ts +44 -0
- package/src/opik/rest_api/core/fetcher/requestWithRetries.ts +33 -0
- package/src/opik/rest_api/core/fetcher/signals.ts +38 -0
- package/src/opik/rest_api/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.ts +256 -0
- package/src/opik/rest_api/core/fetcher/stream-wrappers/NodePre18StreamWrapper.ts +106 -0
- package/src/opik/rest_api/core/fetcher/stream-wrappers/UndiciStreamWrapper.ts +243 -0
- package/src/opik/rest_api/core/fetcher/stream-wrappers/chooseStreamWrapper.ts +33 -0
- package/src/opik/rest_api/core/index.ts +4 -0
- package/src/opik/rest_api/core/runtime/index.ts +1 -0
- package/src/opik/rest_api/core/runtime/runtime.ts +126 -0
- package/src/opik/rest_api/core/schemas/Schema.ts +99 -0
- package/src/opik/rest_api/core/schemas/builders/bigint/bigint.ts +50 -0
- package/src/opik/rest_api/core/schemas/builders/bigint/index.ts +1 -0
- package/src/opik/rest_api/core/schemas/builders/date/date.ts +65 -0
- package/src/opik/rest_api/core/schemas/builders/date/index.ts +1 -0
- package/src/opik/rest_api/core/schemas/builders/enum/enum.ts +43 -0
- package/src/opik/rest_api/core/schemas/builders/enum/index.ts +1 -0
- package/src/opik/rest_api/core/schemas/builders/index.ts +14 -0
- package/src/opik/rest_api/core/schemas/builders/lazy/index.ts +3 -0
- package/src/opik/rest_api/core/schemas/builders/lazy/lazy.ts +32 -0
- package/src/opik/rest_api/core/schemas/builders/lazy/lazyObject.ts +20 -0
- package/src/opik/rest_api/core/schemas/builders/list/index.ts +1 -0
- package/src/opik/rest_api/core/schemas/builders/list/list.ts +73 -0
- package/src/opik/rest_api/core/schemas/builders/literals/booleanLiteral.ts +29 -0
- package/src/opik/rest_api/core/schemas/builders/literals/index.ts +2 -0
- package/src/opik/rest_api/core/schemas/builders/literals/stringLiteral.ts +29 -0
- package/src/opik/rest_api/core/schemas/builders/object/index.ts +22 -0
- package/src/opik/rest_api/core/schemas/builders/object/object.ts +324 -0
- package/src/opik/rest_api/core/schemas/builders/object/objectWithoutOptionalProperties.ts +18 -0
- package/src/opik/rest_api/core/schemas/builders/object/property.ts +23 -0
- package/src/opik/rest_api/core/schemas/builders/object/types.ts +72 -0
- package/src/opik/rest_api/core/schemas/builders/object-like/getObjectLikeUtils.ts +79 -0
- package/src/opik/rest_api/core/schemas/builders/object-like/index.ts +2 -0
- package/src/opik/rest_api/core/schemas/builders/object-like/types.ts +11 -0
- package/src/opik/rest_api/core/schemas/builders/primitives/any.ts +4 -0
- package/src/opik/rest_api/core/schemas/builders/primitives/boolean.ts +25 -0
- package/src/opik/rest_api/core/schemas/builders/primitives/index.ts +5 -0
- package/src/opik/rest_api/core/schemas/builders/primitives/number.ts +25 -0
- package/src/opik/rest_api/core/schemas/builders/primitives/string.ts +25 -0
- package/src/opik/rest_api/core/schemas/builders/primitives/unknown.ts +4 -0
- package/src/opik/rest_api/core/schemas/builders/record/index.ts +2 -0
- package/src/opik/rest_api/core/schemas/builders/record/record.ts +130 -0
- package/src/opik/rest_api/core/schemas/builders/record/types.ts +17 -0
- package/src/opik/rest_api/core/schemas/builders/schema-utils/JsonError.ts +9 -0
- package/src/opik/rest_api/core/schemas/builders/schema-utils/ParseError.ts +9 -0
- package/src/opik/rest_api/core/schemas/builders/schema-utils/getSchemaUtils.ts +105 -0
- package/src/opik/rest_api/core/schemas/builders/schema-utils/index.ts +4 -0
- package/src/opik/rest_api/core/schemas/builders/schema-utils/stringifyValidationErrors.ts +8 -0
- package/src/opik/rest_api/core/schemas/builders/set/index.ts +1 -0
- package/src/opik/rest_api/core/schemas/builders/set/set.ts +43 -0
- package/src/opik/rest_api/core/schemas/builders/undiscriminated-union/index.ts +6 -0
- package/src/opik/rest_api/core/schemas/builders/undiscriminated-union/types.ts +10 -0
- package/src/opik/rest_api/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.ts +60 -0
- package/src/opik/rest_api/core/schemas/builders/union/discriminant.ts +14 -0
- package/src/opik/rest_api/core/schemas/builders/union/index.ts +10 -0
- package/src/opik/rest_api/core/schemas/builders/union/types.ts +26 -0
- package/src/opik/rest_api/core/schemas/builders/union/union.ts +170 -0
- package/src/opik/rest_api/core/schemas/index.ts +2 -0
- package/src/opik/rest_api/core/schemas/utils/MaybePromise.ts +1 -0
- package/src/opik/rest_api/core/schemas/utils/addQuestionMarksToNullableProperties.ts +15 -0
- package/src/opik/rest_api/core/schemas/utils/createIdentitySchemaCreator.ts +21 -0
- package/src/opik/rest_api/core/schemas/utils/entries.ts +3 -0
- package/src/opik/rest_api/core/schemas/utils/filterObject.ts +10 -0
- package/src/opik/rest_api/core/schemas/utils/getErrorMessageForIncorrectType.ts +25 -0
- package/src/opik/rest_api/core/schemas/utils/isPlainObject.ts +17 -0
- package/src/opik/rest_api/core/schemas/utils/keys.ts +3 -0
- package/src/opik/rest_api/core/schemas/utils/maybeSkipValidation.ts +38 -0
- package/src/opik/rest_api/core/schemas/utils/partition.ts +12 -0
- package/src/opik/rest_api/environments.ts +9 -0
- package/src/opik/rest_api/errors/OpikApiError.ts +45 -0
- package/src/opik/rest_api/errors/OpikApiTimeoutError.ts +10 -0
- package/src/opik/rest_api/errors/index.ts +2 -0
- package/src/opik/rest_api/index.ts +4 -0
- package/src/opik/rest_api/serialization/index.ts +2 -0
- package/src/opik/rest_api/serialization/resources/chatCompletions/client/index.ts +1 -0
- package/src/opik/rest_api/serialization/resources/chatCompletions/client/requests/ChatCompletionRequest.ts +72 -0
- package/src/opik/rest_api/serialization/resources/chatCompletions/client/requests/index.ts +1 -0
- package/src/opik/rest_api/serialization/resources/chatCompletions/index.ts +1 -0
- package/src/opik/rest_api/serialization/resources/datasets/client/index.ts +1 -0
- package/src/opik/rest_api/serialization/resources/datasets/client/requests/DatasetIdentifier.ts +20 -0
- package/src/opik/rest_api/serialization/resources/datasets/client/requests/DatasetIdentifierPublic.ts +20 -0
- package/src/opik/rest_api/serialization/resources/datasets/client/requests/DatasetItemBatchWrite.ts +25 -0
- package/src/opik/rest_api/serialization/resources/datasets/client/requests/DatasetItemStreamRequest.ts +24 -0
- package/src/opik/rest_api/serialization/resources/datasets/client/requests/DatasetItemsDelete.ts +20 -0
- package/src/opik/rest_api/serialization/resources/datasets/client/requests/DatasetUpdate.ts +20 -0
- package/src/opik/rest_api/serialization/resources/datasets/client/requests/DatasetWrite.ts +22 -0
- package/src/opik/rest_api/serialization/resources/datasets/client/requests/index.ts +7 -0
- package/src/opik/rest_api/serialization/resources/datasets/index.ts +1 -0
- package/src/opik/rest_api/serialization/resources/experiments/client/findFeedbackScoreNames.ts +15 -0
- package/src/opik/rest_api/serialization/resources/experiments/client/index.ts +2 -0
- package/src/opik/rest_api/serialization/resources/experiments/client/requests/ExperimentItemStreamRequest.ts +24 -0
- package/src/opik/rest_api/serialization/resources/experiments/client/requests/ExperimentItemsBatch.ts +21 -0
- package/src/opik/rest_api/serialization/resources/experiments/client/requests/ExperimentItemsDelete.ts +20 -0
- package/src/opik/rest_api/serialization/resources/experiments/client/requests/ExperimentWrite.ts +28 -0
- package/src/opik/rest_api/serialization/resources/experiments/client/requests/ExperimentsDelete.ts +20 -0
- package/src/opik/rest_api/serialization/resources/experiments/client/requests/IdentifierPublic.ts +18 -0
- package/src/opik/rest_api/serialization/resources/experiments/client/requests/index.ts +6 -0
- package/src/opik/rest_api/serialization/resources/experiments/index.ts +1 -0
- package/src/opik/rest_api/serialization/resources/feedbackDefinitions/index.ts +1 -0
- package/src/opik/rest_api/serialization/resources/feedbackDefinitions/types/FindFeedbackDefinitionsRequestType.ts +16 -0
- package/src/opik/rest_api/serialization/resources/feedbackDefinitions/types/index.ts +1 -0
- package/src/opik/rest_api/serialization/resources/index.ts +20 -0
- package/src/opik/rest_api/serialization/resources/llmProviderKey/client/index.ts +1 -0
- package/src/opik/rest_api/serialization/resources/llmProviderKey/client/requests/ProviderApiKeyUpdate.ts +20 -0
- package/src/opik/rest_api/serialization/resources/llmProviderKey/client/requests/ProviderApiKeyWrite.ts +20 -0
- package/src/opik/rest_api/serialization/resources/llmProviderKey/client/requests/index.ts +2 -0
- package/src/opik/rest_api/serialization/resources/llmProviderKey/index.ts +1 -0
- package/src/opik/rest_api/serialization/resources/projects/client/index.ts +1 -0
- package/src/opik/rest_api/serialization/resources/projects/client/requests/ProjectMetricRequestPublic.ts +28 -0
- package/src/opik/rest_api/serialization/resources/projects/client/requests/ProjectRetrievePublic.ts +20 -0
- package/src/opik/rest_api/serialization/resources/projects/client/requests/ProjectUpdate.ts +20 -0
- package/src/opik/rest_api/serialization/resources/projects/client/requests/ProjectWrite.ts +20 -0
- package/src/opik/rest_api/serialization/resources/projects/client/requests/index.ts +4 -0
- package/src/opik/rest_api/serialization/resources/projects/index.ts +2 -0
- package/src/opik/rest_api/serialization/resources/projects/types/ProjectMetricRequestPublicInterval.ts +16 -0
- package/src/opik/rest_api/serialization/resources/projects/types/ProjectMetricRequestPublicMetricType.ts +16 -0
- package/src/opik/rest_api/serialization/resources/projects/types/index.ts +2 -0
- package/src/opik/rest_api/serialization/resources/prompts/client/index.ts +1 -0
- package/src/opik/rest_api/serialization/resources/prompts/client/requests/CreatePromptVersionDetail.ts +23 -0
- package/src/opik/rest_api/serialization/resources/prompts/client/requests/PromptUpdatable.ts +20 -0
- package/src/opik/rest_api/serialization/resources/prompts/client/requests/PromptVersionRetrieveDetail.ts +22 -0
- package/src/opik/rest_api/serialization/resources/prompts/client/requests/PromptWrite.ts +24 -0
- package/src/opik/rest_api/serialization/resources/prompts/client/requests/index.ts +4 -0
- package/src/opik/rest_api/serialization/resources/prompts/index.ts +1 -0
- package/src/opik/rest_api/serialization/resources/spans/client/findFeedbackScoreNames1.ts +13 -0
- package/src/opik/rest_api/serialization/resources/spans/client/index.ts +2 -0
- package/src/opik/rest_api/serialization/resources/spans/client/requests/SpanBatchWrite.ts +19 -0
- package/src/opik/rest_api/serialization/resources/spans/client/requests/SpanUpdate.ts +44 -0
- package/src/opik/rest_api/serialization/resources/spans/client/requests/index.ts +2 -0
- package/src/opik/rest_api/serialization/resources/spans/index.ts +2 -0
- package/src/opik/rest_api/serialization/resources/spans/types/FindFeedbackScoreNames1RequestType.ts +16 -0
- package/src/opik/rest_api/serialization/resources/spans/types/GetSpanStatsRequestType.ts +16 -0
- package/src/opik/rest_api/serialization/resources/spans/types/GetSpansByProjectRequestType.ts +16 -0
- package/src/opik/rest_api/serialization/resources/spans/types/index.ts +3 -0
- package/src/opik/rest_api/serialization/resources/traces/client/findFeedbackScoreNames2.ts +13 -0
- package/src/opik/rest_api/serialization/resources/traces/client/index.ts +2 -0
- package/src/opik/rest_api/serialization/resources/traces/client/requests/TraceBatchWrite.ts +19 -0
- package/src/opik/rest_api/serialization/resources/traces/client/requests/TraceUpdate.ts +34 -0
- package/src/opik/rest_api/serialization/resources/traces/client/requests/index.ts +2 -0
- package/src/opik/rest_api/serialization/resources/traces/index.ts +1 -0
- package/src/opik/rest_api/serialization/types/AssistantMessage.ts +33 -0
- package/src/opik/rest_api/serialization/types/AssistantMessageRole.ts +16 -0
- package/src/opik/rest_api/serialization/types/AuthDetailsHolder.ts +16 -0
- package/src/opik/rest_api/serialization/types/AvgValueStatPublic.ts +20 -0
- package/src/opik/rest_api/serialization/types/BatchDelete.ts +18 -0
- package/src/opik/rest_api/serialization/types/BiInformation.ts +22 -0
- package/src/opik/rest_api/serialization/types/BiInformationResponse.ts +21 -0
- package/src/opik/rest_api/serialization/types/CategoricalFeedbackDefinition.ts +29 -0
- package/src/opik/rest_api/serialization/types/CategoricalFeedbackDefinitionCreate.ts +21 -0
- package/src/opik/rest_api/serialization/types/CategoricalFeedbackDefinitionPublic.ts +29 -0
- package/src/opik/rest_api/serialization/types/CategoricalFeedbackDefinitionUpdate.ts +21 -0
- package/src/opik/rest_api/serialization/types/CategoricalFeedbackDetail.ts +20 -0
- package/src/opik/rest_api/serialization/types/CategoricalFeedbackDetailCreate.ts +20 -0
- package/src/opik/rest_api/serialization/types/CategoricalFeedbackDetailPublic.ts +20 -0
- package/src/opik/rest_api/serialization/types/CategoricalFeedbackDetailUpdate.ts +20 -0
- package/src/opik/rest_api/serialization/types/ChatCompletionChoice.ts +28 -0
- package/src/opik/rest_api/serialization/types/ChatCompletionResponse.ts +32 -0
- package/src/opik/rest_api/serialization/types/ChunkedOutputJsonNode.ts +23 -0
- package/src/opik/rest_api/serialization/types/ChunkedOutputJsonNodeType.ts +20 -0
- package/src/opik/rest_api/serialization/types/Column.ts +25 -0
- package/src/opik/rest_api/serialization/types/ColumnCompare.ts +25 -0
- package/src/opik/rest_api/serialization/types/ColumnCompareTypesItem.ts +16 -0
- package/src/opik/rest_api/serialization/types/ColumnPublic.ts +25 -0
- package/src/opik/rest_api/serialization/types/ColumnPublicTypesItem.ts +16 -0
- package/src/opik/rest_api/serialization/types/ColumnTypesItem.ts +14 -0
- package/src/opik/rest_api/serialization/types/CompletionTokensDetails.ts +20 -0
- package/src/opik/rest_api/serialization/types/CountValueStatPublic.ts +20 -0
- package/src/opik/rest_api/serialization/types/DataPointNumberPublic.ts +22 -0
- package/src/opik/rest_api/serialization/types/Dataset.ts +44 -0
- package/src/opik/rest_api/serialization/types/DatasetItem.ts +48 -0
- package/src/opik/rest_api/serialization/types/DatasetItemBatch.ts +25 -0
- package/src/opik/rest_api/serialization/types/DatasetItemCompare.ts +51 -0
- package/src/opik/rest_api/serialization/types/DatasetItemCompareSource.ts +16 -0
- package/src/opik/rest_api/serialization/types/DatasetItemPageCompare.ts +30 -0
- package/src/opik/rest_api/serialization/types/DatasetItemPagePublic.ts +30 -0
- package/src/opik/rest_api/serialization/types/DatasetItemPublic.ts +51 -0
- package/src/opik/rest_api/serialization/types/DatasetItemPublicSource.ts +16 -0
- package/src/opik/rest_api/serialization/types/DatasetItemSource.ts +16 -0
- package/src/opik/rest_api/serialization/types/DatasetItemWrite.ts +37 -0
- package/src/opik/rest_api/serialization/types/DatasetItemWriteSource.ts +16 -0
- package/src/opik/rest_api/serialization/types/DatasetPagePublic.ts +27 -0
- package/src/opik/rest_api/serialization/types/DatasetPublic.ts +44 -0
- package/src/opik/rest_api/serialization/types/DeleteFeedbackScore.ts +20 -0
- package/src/opik/rest_api/serialization/types/Delta.ts +26 -0
- package/src/opik/rest_api/serialization/types/DeltaRole.ts +14 -0
- package/src/opik/rest_api/serialization/types/ErrorInfo.ts +22 -0
- package/src/opik/rest_api/serialization/types/ErrorInfoPublic.ts +24 -0
- package/src/opik/rest_api/serialization/types/ErrorInfoWrite.ts +22 -0
- package/src/opik/rest_api/serialization/types/ErrorMessage.ts +22 -0
- package/src/opik/rest_api/serialization/types/ErrorMessageDetail.ts +24 -0
- package/src/opik/rest_api/serialization/types/ErrorMessagePublic.ts +20 -0
- package/src/opik/rest_api/serialization/types/Experiment.ts +46 -0
- package/src/opik/rest_api/serialization/types/ExperimentItem.ts +43 -0
- package/src/opik/rest_api/serialization/types/ExperimentItemCompare.ts +45 -0
- package/src/opik/rest_api/serialization/types/ExperimentItemPublic.ts +34 -0
- package/src/opik/rest_api/serialization/types/ExperimentPagePublic.ts +27 -0
- package/src/opik/rest_api/serialization/types/ExperimentPublic.ts +48 -0
- package/src/opik/rest_api/serialization/types/Feedback.ts +48 -0
- package/src/opik/rest_api/serialization/types/FeedbackCreate.ts +41 -0
- package/src/opik/rest_api/serialization/types/FeedbackDefinitionPagePublic.ts +27 -0
- package/src/opik/rest_api/serialization/types/FeedbackObjectPublic.ts +51 -0
- package/src/opik/rest_api/serialization/types/FeedbackPublic.ts +49 -0
- package/src/opik/rest_api/serialization/types/FeedbackScore.ts +35 -0
- package/src/opik/rest_api/serialization/types/FeedbackScoreAverage.ts +22 -0
- package/src/opik/rest_api/serialization/types/FeedbackScoreAveragePublic.ts +22 -0
- package/src/opik/rest_api/serialization/types/FeedbackScoreBatch.ts +21 -0
- package/src/opik/rest_api/serialization/types/FeedbackScoreBatchItem.ts +33 -0
- package/src/opik/rest_api/serialization/types/FeedbackScoreBatchItemSource.ts +16 -0
- package/src/opik/rest_api/serialization/types/FeedbackScoreCompare.ts +37 -0
- package/src/opik/rest_api/serialization/types/FeedbackScoreCompareSource.ts +16 -0
- package/src/opik/rest_api/serialization/types/FeedbackScorePublic.ts +37 -0
- package/src/opik/rest_api/serialization/types/FeedbackScorePublicSource.ts +16 -0
- package/src/opik/rest_api/serialization/types/FeedbackScoreSource.ts +16 -0
- package/src/opik/rest_api/serialization/types/FeedbackUpdate.ts +41 -0
- package/src/opik/rest_api/serialization/types/Function.ts +25 -0
- package/src/opik/rest_api/serialization/types/FunctionCall.ts +20 -0
- package/src/opik/rest_api/serialization/types/JsonNode.ts +14 -0
- package/src/opik/rest_api/serialization/types/JsonNodeCompare.ts +14 -0
- package/src/opik/rest_api/serialization/types/JsonNodePublic.ts +14 -0
- package/src/opik/rest_api/serialization/types/JsonNodeWrite.ts +14 -0
- package/src/opik/rest_api/serialization/types/JsonObjectSchema.ts +34 -0
- package/src/opik/rest_api/serialization/types/JsonSchema.ts +23 -0
- package/src/opik/rest_api/serialization/types/JsonSchemaElement.ts +20 -0
- package/src/opik/rest_api/serialization/types/Message.ts +16 -0
- package/src/opik/rest_api/serialization/types/NumericalFeedbackDefinition.ts +29 -0
- package/src/opik/rest_api/serialization/types/NumericalFeedbackDefinitionCreate.ts +21 -0
- package/src/opik/rest_api/serialization/types/NumericalFeedbackDefinitionPublic.ts +29 -0
- package/src/opik/rest_api/serialization/types/NumericalFeedbackDefinitionUpdate.ts +21 -0
- package/src/opik/rest_api/serialization/types/NumericalFeedbackDetail.ts +22 -0
- package/src/opik/rest_api/serialization/types/NumericalFeedbackDetailCreate.ts +22 -0
- package/src/opik/rest_api/serialization/types/NumericalFeedbackDetailPublic.ts +22 -0
- package/src/opik/rest_api/serialization/types/NumericalFeedbackDetailUpdate.ts +22 -0
- package/src/opik/rest_api/serialization/types/PageColumns.ts +19 -0
- package/src/opik/rest_api/serialization/types/PercentageValueStatPublic.ts +21 -0
- package/src/opik/rest_api/serialization/types/PercentageValuesPublic.ts +24 -0
- package/src/opik/rest_api/serialization/types/Project.ts +32 -0
- package/src/opik/rest_api/serialization/types/ProjectMetricResponsePublic.ts +29 -0
- package/src/opik/rest_api/serialization/types/ProjectMetricResponsePublicInterval.ts +16 -0
- package/src/opik/rest_api/serialization/types/ProjectMetricResponsePublicMetricType.ts +16 -0
- package/src/opik/rest_api/serialization/types/ProjectPagePublic.ts +29 -0
- package/src/opik/rest_api/serialization/types/ProjectPublic.ts +32 -0
- package/src/opik/rest_api/serialization/types/ProjectStatItemObjectPublic.ts +50 -0
- package/src/opik/rest_api/serialization/types/ProjectStatsPublic.ts +21 -0
- package/src/opik/rest_api/serialization/types/Prompt.ts +37 -0
- package/src/opik/rest_api/serialization/types/PromptDetail.ts +35 -0
- package/src/opik/rest_api/serialization/types/PromptPagePublic.ts +27 -0
- package/src/opik/rest_api/serialization/types/PromptPublic.ts +32 -0
- package/src/opik/rest_api/serialization/types/PromptVersion.ts +30 -0
- package/src/opik/rest_api/serialization/types/PromptVersionDetail.ts +32 -0
- package/src/opik/rest_api/serialization/types/PromptVersionLink.ts +24 -0
- package/src/opik/rest_api/serialization/types/PromptVersionLinkPublic.ts +24 -0
- package/src/opik/rest_api/serialization/types/PromptVersionLinkWrite.ts +20 -0
- package/src/opik/rest_api/serialization/types/PromptVersionPagePublic.ts +27 -0
- package/src/opik/rest_api/serialization/types/PromptVersionPublic.ts +30 -0
- package/src/opik/rest_api/serialization/types/ProviderApiKey.ts +30 -0
- package/src/opik/rest_api/serialization/types/ProviderApiKeyPublic.ts +30 -0
- package/src/opik/rest_api/serialization/types/ResponseFormat.ts +22 -0
- package/src/opik/rest_api/serialization/types/ResponseFormatType.ts +16 -0
- package/src/opik/rest_api/serialization/types/ResultsNumberPublic.ts +23 -0
- package/src/opik/rest_api/serialization/types/Span.ts +65 -0
- package/src/opik/rest_api/serialization/types/SpanBatch.ts +19 -0
- package/src/opik/rest_api/serialization/types/SpanPagePublic.ts +25 -0
- package/src/opik/rest_api/serialization/types/SpanPublic.ts +67 -0
- package/src/opik/rest_api/serialization/types/SpanPublicType.ts +14 -0
- package/src/opik/rest_api/serialization/types/SpanType.ts +15 -0
- package/src/opik/rest_api/serialization/types/SpanWrite.ts +51 -0
- package/src/opik/rest_api/serialization/types/SpanWriteType.ts +14 -0
- package/src/opik/rest_api/serialization/types/StreamOptions.ts +18 -0
- package/src/opik/rest_api/serialization/types/Tool.ts +20 -0
- package/src/opik/rest_api/serialization/types/ToolCall.ts +25 -0
- package/src/opik/rest_api/serialization/types/Trace.ts +54 -0
- package/src/opik/rest_api/serialization/types/TraceBatch.ts +19 -0
- package/src/opik/rest_api/serialization/types/TraceCountResponse.ts +24 -0
- package/src/opik/rest_api/serialization/types/TracePagePublic.ts +27 -0
- package/src/opik/rest_api/serialization/types/TracePublic.ts +56 -0
- package/src/opik/rest_api/serialization/types/TraceWrite.ts +38 -0
- package/src/opik/rest_api/serialization/types/Usage.ts +27 -0
- package/src/opik/rest_api/serialization/types/WorkspaceTraceCount.ts +22 -0
- package/src/opik/rest_api/serialization/types/index.ts +138 -0
- package/src/opik/tracer/Span.ts +34 -0
- package/src/opik/tracer/Trace.ts +61 -0
- package/tests/client.test.ts +25 -0
- package/tsconfig.json +25 -0
- package/tsup.config.ts +11 -0
- package/vitest.config.ts +13 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,3653 @@
|
|
|
1
|
+
import * as stream from 'stream';
|
|
2
|
+
|
|
3
|
+
interface OpikConfig {
|
|
4
|
+
apiKey: string;
|
|
5
|
+
host?: string;
|
|
6
|
+
projectName: string;
|
|
7
|
+
useBatching?: boolean;
|
|
8
|
+
workspaceName: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
13
|
+
*/
|
|
14
|
+
type FindFeedbackDefinitionsRequestType = "numerical" | "categorical";
|
|
15
|
+
declare const FindFeedbackDefinitionsRequestType: {
|
|
16
|
+
readonly Numerical: "numerical";
|
|
17
|
+
readonly Categorical: "categorical";
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* @example
|
|
26
|
+
* {}
|
|
27
|
+
*/
|
|
28
|
+
interface FindFeedbackDefinitionsRequest {
|
|
29
|
+
page?: number;
|
|
30
|
+
size?: number;
|
|
31
|
+
name?: string;
|
|
32
|
+
type?: FindFeedbackDefinitionsRequestType;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
37
|
+
*/
|
|
38
|
+
type ProjectMetricRequestPublicMetricType = "FEEDBACK_SCORES" | "TRACE_COUNT" | "TOKEN_USAGE" | "DURATION" | "COST";
|
|
39
|
+
declare const ProjectMetricRequestPublicMetricType: {
|
|
40
|
+
readonly FeedbackScores: "FEEDBACK_SCORES";
|
|
41
|
+
readonly TraceCount: "TRACE_COUNT";
|
|
42
|
+
readonly TokenUsage: "TOKEN_USAGE";
|
|
43
|
+
readonly Duration: "DURATION";
|
|
44
|
+
readonly Cost: "COST";
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
49
|
+
*/
|
|
50
|
+
type ProjectMetricRequestPublicInterval = "HOURLY" | "DAILY" | "WEEKLY";
|
|
51
|
+
declare const ProjectMetricRequestPublicInterval: {
|
|
52
|
+
readonly Hourly: "HOURLY";
|
|
53
|
+
readonly Daily: "DAILY";
|
|
54
|
+
readonly Weekly: "WEEKLY";
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
59
|
+
*/
|
|
60
|
+
/**
|
|
61
|
+
* @example
|
|
62
|
+
* {}
|
|
63
|
+
*/
|
|
64
|
+
interface FindProjectsRequest {
|
|
65
|
+
page?: number;
|
|
66
|
+
size?: number;
|
|
67
|
+
name?: string;
|
|
68
|
+
sorting?: string;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
73
|
+
*/
|
|
74
|
+
/**
|
|
75
|
+
* @example
|
|
76
|
+
* {
|
|
77
|
+
* name: "name"
|
|
78
|
+
* }
|
|
79
|
+
*/
|
|
80
|
+
interface ProjectWrite {
|
|
81
|
+
name: string;
|
|
82
|
+
description?: string;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
87
|
+
*/
|
|
88
|
+
/**
|
|
89
|
+
* @example
|
|
90
|
+
* {}
|
|
91
|
+
*/
|
|
92
|
+
interface ProjectUpdate {
|
|
93
|
+
name?: string;
|
|
94
|
+
description?: string;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
99
|
+
*/
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* @example
|
|
103
|
+
* {}
|
|
104
|
+
*/
|
|
105
|
+
interface ProjectMetricRequestPublic {
|
|
106
|
+
metricType?: ProjectMetricRequestPublicMetricType;
|
|
107
|
+
interval?: ProjectMetricRequestPublicInterval;
|
|
108
|
+
intervalStart?: Date;
|
|
109
|
+
intervalEnd?: Date;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
114
|
+
*/
|
|
115
|
+
/**
|
|
116
|
+
* @example
|
|
117
|
+
* {
|
|
118
|
+
* name: "name"
|
|
119
|
+
* }
|
|
120
|
+
*/
|
|
121
|
+
interface ProjectRetrievePublic {
|
|
122
|
+
name: string;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
127
|
+
*/
|
|
128
|
+
type GetSpansByProjectRequestType = "general" | "tool" | "llm";
|
|
129
|
+
declare const GetSpansByProjectRequestType: {
|
|
130
|
+
readonly General: "general";
|
|
131
|
+
readonly Tool: "tool";
|
|
132
|
+
readonly Llm: "llm";
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
137
|
+
*/
|
|
138
|
+
type FindFeedbackScoreNames1RequestType = "general" | "tool" | "llm";
|
|
139
|
+
declare const FindFeedbackScoreNames1RequestType: {
|
|
140
|
+
readonly General: "general";
|
|
141
|
+
readonly Tool: "tool";
|
|
142
|
+
readonly Llm: "llm";
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
147
|
+
*/
|
|
148
|
+
type GetSpanStatsRequestType = "general" | "tool" | "llm";
|
|
149
|
+
declare const GetSpanStatsRequestType: {
|
|
150
|
+
readonly General: "general";
|
|
151
|
+
readonly Tool: "tool";
|
|
152
|
+
readonly Llm: "llm";
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
157
|
+
*/
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* @example
|
|
161
|
+
* {}
|
|
162
|
+
*/
|
|
163
|
+
interface GetSpansByProjectRequest {
|
|
164
|
+
page?: number;
|
|
165
|
+
size?: number;
|
|
166
|
+
projectName?: string;
|
|
167
|
+
projectId?: string;
|
|
168
|
+
traceId?: string;
|
|
169
|
+
type?: GetSpansByProjectRequestType;
|
|
170
|
+
filters?: string;
|
|
171
|
+
truncate?: boolean;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
176
|
+
*/
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* @example
|
|
180
|
+
* {
|
|
181
|
+
* spans: [{
|
|
182
|
+
* traceId: "trace_id",
|
|
183
|
+
* name: "name",
|
|
184
|
+
* type: "general",
|
|
185
|
+
* startTime: "2024-01-15T09:30:00Z"
|
|
186
|
+
* }]
|
|
187
|
+
* }
|
|
188
|
+
*/
|
|
189
|
+
interface SpanBatchWrite {
|
|
190
|
+
spans: SpanWrite[];
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
195
|
+
*/
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* @example
|
|
199
|
+
* {
|
|
200
|
+
* traceId: "trace_id"
|
|
201
|
+
* }
|
|
202
|
+
*/
|
|
203
|
+
interface SpanUpdate {
|
|
204
|
+
/** If null and project_id not specified, Default Project is assumed */
|
|
205
|
+
projectName?: string;
|
|
206
|
+
/** If null and project_name not specified, Default Project is assumed */
|
|
207
|
+
projectId?: string;
|
|
208
|
+
traceId: string;
|
|
209
|
+
parentSpanId?: string;
|
|
210
|
+
endTime?: Date;
|
|
211
|
+
input?: JsonNode;
|
|
212
|
+
output?: JsonNode;
|
|
213
|
+
metadata?: JsonNode;
|
|
214
|
+
model?: string;
|
|
215
|
+
provider?: string;
|
|
216
|
+
tags?: string[];
|
|
217
|
+
usage?: Record<string, number>;
|
|
218
|
+
errorInfo?: ErrorInfo;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
223
|
+
*/
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* @example
|
|
227
|
+
* {}
|
|
228
|
+
*/
|
|
229
|
+
interface FindFeedbackScoreNames1Request {
|
|
230
|
+
projectId?: string;
|
|
231
|
+
type?: FindFeedbackScoreNames1RequestType;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
236
|
+
*/
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* @example
|
|
240
|
+
* {}
|
|
241
|
+
*/
|
|
242
|
+
interface GetSpanStatsRequest {
|
|
243
|
+
projectId?: string;
|
|
244
|
+
projectName?: string;
|
|
245
|
+
traceId?: string;
|
|
246
|
+
type?: GetSpanStatsRequestType;
|
|
247
|
+
filters?: string;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
252
|
+
*/
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* @example
|
|
256
|
+
* {}
|
|
257
|
+
*/
|
|
258
|
+
interface ChatCompletionRequest {
|
|
259
|
+
model?: string;
|
|
260
|
+
messages?: Message[];
|
|
261
|
+
temperature?: number;
|
|
262
|
+
topP?: number;
|
|
263
|
+
n?: number;
|
|
264
|
+
stream?: boolean;
|
|
265
|
+
streamOptions?: StreamOptions;
|
|
266
|
+
stop?: string[];
|
|
267
|
+
maxTokens?: number;
|
|
268
|
+
maxCompletionTokens?: number;
|
|
269
|
+
presencePenalty?: number;
|
|
270
|
+
frequencyPenalty?: number;
|
|
271
|
+
logitBias?: Record<string, number>;
|
|
272
|
+
user?: string;
|
|
273
|
+
responseFormat?: ResponseFormat;
|
|
274
|
+
seed?: number;
|
|
275
|
+
tools?: Tool[];
|
|
276
|
+
toolChoice?: Record<string, unknown>;
|
|
277
|
+
parallelToolCalls?: boolean;
|
|
278
|
+
functions?: Function[];
|
|
279
|
+
functionCall?: FunctionCall;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
284
|
+
*/
|
|
285
|
+
/**
|
|
286
|
+
* @example
|
|
287
|
+
* {}
|
|
288
|
+
*/
|
|
289
|
+
interface FindDatasetsRequest {
|
|
290
|
+
page?: number;
|
|
291
|
+
size?: number;
|
|
292
|
+
withExperimentsOnly?: boolean;
|
|
293
|
+
promptId?: string;
|
|
294
|
+
name?: string;
|
|
295
|
+
sorting?: string;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
300
|
+
*/
|
|
301
|
+
/**
|
|
302
|
+
* @example
|
|
303
|
+
* {
|
|
304
|
+
* name: "name"
|
|
305
|
+
* }
|
|
306
|
+
*/
|
|
307
|
+
interface DatasetWrite {
|
|
308
|
+
id?: string;
|
|
309
|
+
name: string;
|
|
310
|
+
description?: string;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
315
|
+
*/
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* @example
|
|
319
|
+
* {
|
|
320
|
+
* items: [{
|
|
321
|
+
* source: "manual"
|
|
322
|
+
* }]
|
|
323
|
+
* }
|
|
324
|
+
*/
|
|
325
|
+
interface DatasetItemBatchWrite {
|
|
326
|
+
/** If null, dataset_id must be provided */
|
|
327
|
+
datasetName?: string;
|
|
328
|
+
/** If null, dataset_name must be provided */
|
|
329
|
+
datasetId?: string;
|
|
330
|
+
items: DatasetItemWrite[];
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
335
|
+
*/
|
|
336
|
+
/**
|
|
337
|
+
* @example
|
|
338
|
+
* {
|
|
339
|
+
* name: "name"
|
|
340
|
+
* }
|
|
341
|
+
*/
|
|
342
|
+
interface DatasetUpdate {
|
|
343
|
+
name: string;
|
|
344
|
+
description?: string;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
349
|
+
*/
|
|
350
|
+
/**
|
|
351
|
+
* @example
|
|
352
|
+
* {
|
|
353
|
+
* datasetName: "dataset_name"
|
|
354
|
+
* }
|
|
355
|
+
*/
|
|
356
|
+
interface DatasetIdentifier {
|
|
357
|
+
datasetName: string;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
362
|
+
*/
|
|
363
|
+
/**
|
|
364
|
+
* @example
|
|
365
|
+
* {
|
|
366
|
+
* itemIds: ["item_ids"]
|
|
367
|
+
* }
|
|
368
|
+
*/
|
|
369
|
+
interface DatasetItemsDelete {
|
|
370
|
+
itemIds: string[];
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
375
|
+
*/
|
|
376
|
+
/**
|
|
377
|
+
* @example
|
|
378
|
+
* {
|
|
379
|
+
* experimentIds: "experiment_ids"
|
|
380
|
+
* }
|
|
381
|
+
*/
|
|
382
|
+
interface FindDatasetItemsWithExperimentItemsRequest {
|
|
383
|
+
page?: number;
|
|
384
|
+
size?: number;
|
|
385
|
+
experimentIds: string;
|
|
386
|
+
filters?: string;
|
|
387
|
+
truncate?: boolean;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
392
|
+
*/
|
|
393
|
+
/**
|
|
394
|
+
* @example
|
|
395
|
+
* {
|
|
396
|
+
* datasetName: "dataset_name"
|
|
397
|
+
* }
|
|
398
|
+
*/
|
|
399
|
+
interface DatasetIdentifierPublic {
|
|
400
|
+
datasetName: string;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
405
|
+
*/
|
|
406
|
+
/**
|
|
407
|
+
* @example
|
|
408
|
+
* {}
|
|
409
|
+
*/
|
|
410
|
+
interface GetDatasetItemsRequest {
|
|
411
|
+
page?: number;
|
|
412
|
+
size?: number;
|
|
413
|
+
truncate?: boolean;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
418
|
+
*/
|
|
419
|
+
/**
|
|
420
|
+
* @example
|
|
421
|
+
* {}
|
|
422
|
+
*/
|
|
423
|
+
interface GetDatasetItemsOutputColumnsRequest {
|
|
424
|
+
experimentIds?: string;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
429
|
+
*/
|
|
430
|
+
interface DatasetItemStreamRequest {
|
|
431
|
+
datasetName: string;
|
|
432
|
+
lastRetrievedId?: string;
|
|
433
|
+
steamLimit?: number;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
/**
|
|
437
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
438
|
+
*/
|
|
439
|
+
/**
|
|
440
|
+
* @example
|
|
441
|
+
* {}
|
|
442
|
+
*/
|
|
443
|
+
interface FindExperimentsRequest {
|
|
444
|
+
page?: number;
|
|
445
|
+
size?: number;
|
|
446
|
+
datasetId?: string;
|
|
447
|
+
name?: string;
|
|
448
|
+
datasetDeleted?: boolean;
|
|
449
|
+
promptId?: string;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
454
|
+
*/
|
|
455
|
+
|
|
456
|
+
/**
|
|
457
|
+
* @example
|
|
458
|
+
* {
|
|
459
|
+
* datasetName: "dataset_name"
|
|
460
|
+
* }
|
|
461
|
+
*/
|
|
462
|
+
interface ExperimentWrite {
|
|
463
|
+
id?: string;
|
|
464
|
+
datasetName: string;
|
|
465
|
+
name?: string;
|
|
466
|
+
metadata?: JsonNodeWrite;
|
|
467
|
+
promptVersion?: PromptVersionLinkWrite;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
472
|
+
*/
|
|
473
|
+
|
|
474
|
+
/**
|
|
475
|
+
* @example
|
|
476
|
+
* {
|
|
477
|
+
* experimentItems: [{
|
|
478
|
+
* experimentId: "experiment_id",
|
|
479
|
+
* datasetItemId: "dataset_item_id",
|
|
480
|
+
* traceId: "trace_id"
|
|
481
|
+
* }]
|
|
482
|
+
* }
|
|
483
|
+
*/
|
|
484
|
+
interface ExperimentItemsBatch {
|
|
485
|
+
experimentItems: ExperimentItem[];
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
490
|
+
*/
|
|
491
|
+
/**
|
|
492
|
+
* @example
|
|
493
|
+
* {
|
|
494
|
+
* ids: ["ids"]
|
|
495
|
+
* }
|
|
496
|
+
*/
|
|
497
|
+
interface ExperimentItemsDelete {
|
|
498
|
+
ids: string[];
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
503
|
+
*/
|
|
504
|
+
/**
|
|
505
|
+
* @example
|
|
506
|
+
* {
|
|
507
|
+
* ids: ["ids"]
|
|
508
|
+
* }
|
|
509
|
+
*/
|
|
510
|
+
interface ExperimentsDelete {
|
|
511
|
+
ids: string[];
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
/**
|
|
515
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
516
|
+
*/
|
|
517
|
+
/**
|
|
518
|
+
* @example
|
|
519
|
+
* {}
|
|
520
|
+
*/
|
|
521
|
+
interface FindFeedbackScoreNamesRequest {
|
|
522
|
+
experimentIds?: string;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
/**
|
|
526
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
527
|
+
*/
|
|
528
|
+
/**
|
|
529
|
+
* @example
|
|
530
|
+
* {
|
|
531
|
+
* name: "name"
|
|
532
|
+
* }
|
|
533
|
+
*/
|
|
534
|
+
interface IdentifierPublic {
|
|
535
|
+
name: string;
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
/**
|
|
539
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
540
|
+
*/
|
|
541
|
+
interface ExperimentItemStreamRequest {
|
|
542
|
+
experimentName: string;
|
|
543
|
+
limit?: number;
|
|
544
|
+
lastRetrievedId?: string;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
549
|
+
*/
|
|
550
|
+
/**
|
|
551
|
+
* @example
|
|
552
|
+
* {
|
|
553
|
+
* apiKey: "api_key"
|
|
554
|
+
* }
|
|
555
|
+
*/
|
|
556
|
+
interface ProviderApiKeyWrite {
|
|
557
|
+
apiKey: string;
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
/**
|
|
561
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
562
|
+
*/
|
|
563
|
+
/**
|
|
564
|
+
* @example
|
|
565
|
+
* {
|
|
566
|
+
* apiKey: "api_key"
|
|
567
|
+
* }
|
|
568
|
+
*/
|
|
569
|
+
interface ProviderApiKeyUpdate {
|
|
570
|
+
apiKey: string;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
/**
|
|
574
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
575
|
+
*/
|
|
576
|
+
/**
|
|
577
|
+
* @example
|
|
578
|
+
* {}
|
|
579
|
+
*/
|
|
580
|
+
interface GetPromptsRequest {
|
|
581
|
+
page?: number;
|
|
582
|
+
size?: number;
|
|
583
|
+
name?: string;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
/**
|
|
587
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
588
|
+
*/
|
|
589
|
+
/**
|
|
590
|
+
* @example
|
|
591
|
+
* {
|
|
592
|
+
* name: "name"
|
|
593
|
+
* }
|
|
594
|
+
*/
|
|
595
|
+
interface PromptWrite {
|
|
596
|
+
id?: string;
|
|
597
|
+
name: string;
|
|
598
|
+
description?: string;
|
|
599
|
+
template?: string;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
/**
|
|
603
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
604
|
+
*/
|
|
605
|
+
|
|
606
|
+
/**
|
|
607
|
+
* @example
|
|
608
|
+
* {
|
|
609
|
+
* name: "name",
|
|
610
|
+
* version: {
|
|
611
|
+
* template: "template"
|
|
612
|
+
* }
|
|
613
|
+
* }
|
|
614
|
+
*/
|
|
615
|
+
interface CreatePromptVersionDetail {
|
|
616
|
+
name: string;
|
|
617
|
+
version: PromptVersionDetail;
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
/**
|
|
621
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
622
|
+
*/
|
|
623
|
+
/**
|
|
624
|
+
* @example
|
|
625
|
+
* {
|
|
626
|
+
* name: "name"
|
|
627
|
+
* }
|
|
628
|
+
*/
|
|
629
|
+
interface PromptUpdatable {
|
|
630
|
+
name: string;
|
|
631
|
+
description?: string;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
/**
|
|
635
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
636
|
+
*/
|
|
637
|
+
/**
|
|
638
|
+
* @example
|
|
639
|
+
* {}
|
|
640
|
+
*/
|
|
641
|
+
interface GetPromptVersionsRequest {
|
|
642
|
+
page?: number;
|
|
643
|
+
size?: number;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
/**
|
|
647
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
648
|
+
*/
|
|
649
|
+
/**
|
|
650
|
+
* @example
|
|
651
|
+
* {
|
|
652
|
+
* name: "name"
|
|
653
|
+
* }
|
|
654
|
+
*/
|
|
655
|
+
interface PromptVersionRetrieveDetail {
|
|
656
|
+
name: string;
|
|
657
|
+
commit?: string;
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
/**
|
|
661
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
662
|
+
*/
|
|
663
|
+
/**
|
|
664
|
+
* @example
|
|
665
|
+
* {}
|
|
666
|
+
*/
|
|
667
|
+
interface GetTracesByProjectRequest {
|
|
668
|
+
page?: number;
|
|
669
|
+
size?: number;
|
|
670
|
+
projectName?: string;
|
|
671
|
+
projectId?: string;
|
|
672
|
+
filters?: string;
|
|
673
|
+
truncate?: boolean;
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
/**
|
|
677
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
678
|
+
*/
|
|
679
|
+
|
|
680
|
+
/**
|
|
681
|
+
* @example
|
|
682
|
+
* {
|
|
683
|
+
* traces: [{
|
|
684
|
+
* name: "name",
|
|
685
|
+
* startTime: "2024-01-15T09:30:00Z"
|
|
686
|
+
* }]
|
|
687
|
+
* }
|
|
688
|
+
*/
|
|
689
|
+
interface TraceBatchWrite {
|
|
690
|
+
traces: TraceWrite[];
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
/**
|
|
694
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
695
|
+
*/
|
|
696
|
+
|
|
697
|
+
/**
|
|
698
|
+
* @example
|
|
699
|
+
* {}
|
|
700
|
+
*/
|
|
701
|
+
interface TraceUpdate {
|
|
702
|
+
/** If null and project_id not specified, Default Project is assumed */
|
|
703
|
+
projectName?: string;
|
|
704
|
+
/** If null and project_name not specified, Default Project is assumed */
|
|
705
|
+
projectId?: string;
|
|
706
|
+
endTime?: Date;
|
|
707
|
+
input?: JsonNode;
|
|
708
|
+
output?: JsonNode;
|
|
709
|
+
metadata?: JsonNode;
|
|
710
|
+
tags?: string[];
|
|
711
|
+
errorInfo?: ErrorInfo;
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
/**
|
|
715
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
716
|
+
*/
|
|
717
|
+
/**
|
|
718
|
+
* @example
|
|
719
|
+
* {}
|
|
720
|
+
*/
|
|
721
|
+
interface FindFeedbackScoreNames2Request {
|
|
722
|
+
projectId?: string;
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
/**
|
|
726
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
727
|
+
*/
|
|
728
|
+
/**
|
|
729
|
+
* @example
|
|
730
|
+
* {}
|
|
731
|
+
*/
|
|
732
|
+
interface GetTraceStatsRequest {
|
|
733
|
+
projectId?: string;
|
|
734
|
+
projectName?: string;
|
|
735
|
+
filters?: string;
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
/**
|
|
739
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
740
|
+
*/
|
|
741
|
+
interface BiInformation {
|
|
742
|
+
workspaceId?: string;
|
|
743
|
+
user?: string;
|
|
744
|
+
count?: number;
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
/**
|
|
748
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
749
|
+
*/
|
|
750
|
+
|
|
751
|
+
interface BiInformationResponse {
|
|
752
|
+
biInformation?: BiInformation[];
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
/**
|
|
756
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
757
|
+
*/
|
|
758
|
+
|
|
759
|
+
interface TraceCountResponse {
|
|
760
|
+
workspacesTracesCount?: WorkspaceTraceCount[];
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
/**
|
|
764
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
765
|
+
*/
|
|
766
|
+
interface WorkspaceTraceCount {
|
|
767
|
+
workspace?: string;
|
|
768
|
+
traceCount?: number;
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
/**
|
|
772
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
773
|
+
*/
|
|
774
|
+
type AuthDetailsHolder = Record<string, unknown>;
|
|
775
|
+
|
|
776
|
+
/**
|
|
777
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
778
|
+
*/
|
|
779
|
+
type AssistantMessageRole = "system" | "user" | "assistant" | "tool" | "function";
|
|
780
|
+
declare const AssistantMessageRole: {
|
|
781
|
+
readonly System: "system";
|
|
782
|
+
readonly User: "user";
|
|
783
|
+
readonly Assistant: "assistant";
|
|
784
|
+
readonly Tool: "tool";
|
|
785
|
+
readonly Function: "function";
|
|
786
|
+
};
|
|
787
|
+
|
|
788
|
+
/**
|
|
789
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
790
|
+
*/
|
|
791
|
+
|
|
792
|
+
interface AssistantMessage {
|
|
793
|
+
role?: AssistantMessageRole;
|
|
794
|
+
content?: string;
|
|
795
|
+
name?: string;
|
|
796
|
+
toolCalls?: ToolCall[];
|
|
797
|
+
refusal?: boolean;
|
|
798
|
+
functionCall?: FunctionCall;
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
/**
|
|
802
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
803
|
+
*/
|
|
804
|
+
|
|
805
|
+
interface ChatCompletionChoice {
|
|
806
|
+
index?: number;
|
|
807
|
+
message?: AssistantMessage;
|
|
808
|
+
delta?: Delta;
|
|
809
|
+
finishReason?: string;
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
/**
|
|
813
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
814
|
+
*/
|
|
815
|
+
|
|
816
|
+
interface ChatCompletionResponse {
|
|
817
|
+
id?: string;
|
|
818
|
+
created?: number;
|
|
819
|
+
model?: string;
|
|
820
|
+
choices?: ChatCompletionChoice[];
|
|
821
|
+
usage?: Usage;
|
|
822
|
+
systemFingerprint?: string;
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
/**
|
|
826
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
827
|
+
*/
|
|
828
|
+
interface CompletionTokensDetails {
|
|
829
|
+
reasoningTokens?: number;
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
/**
|
|
833
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
834
|
+
*/
|
|
835
|
+
type DeltaRole = "system" | "user" | "assistant" | "tool" | "function";
|
|
836
|
+
declare const DeltaRole: {
|
|
837
|
+
readonly System: "system";
|
|
838
|
+
readonly User: "user";
|
|
839
|
+
readonly Assistant: "assistant";
|
|
840
|
+
readonly Tool: "tool";
|
|
841
|
+
readonly Function: "function";
|
|
842
|
+
};
|
|
843
|
+
|
|
844
|
+
/**
|
|
845
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
846
|
+
*/
|
|
847
|
+
|
|
848
|
+
interface Delta {
|
|
849
|
+
role?: DeltaRole;
|
|
850
|
+
content?: string;
|
|
851
|
+
toolCalls?: ToolCall[];
|
|
852
|
+
functionCall?: FunctionCall;
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
/**
|
|
856
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
857
|
+
*/
|
|
858
|
+
interface FunctionCall {
|
|
859
|
+
name?: string;
|
|
860
|
+
arguments?: string;
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
/**
|
|
864
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
865
|
+
*/
|
|
866
|
+
|
|
867
|
+
interface ToolCall {
|
|
868
|
+
id?: string;
|
|
869
|
+
index?: number;
|
|
870
|
+
type?: "function";
|
|
871
|
+
function?: FunctionCall;
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
/**
|
|
875
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
876
|
+
*/
|
|
877
|
+
|
|
878
|
+
interface Usage {
|
|
879
|
+
totalTokens?: number;
|
|
880
|
+
promptTokens?: number;
|
|
881
|
+
completionTokens?: number;
|
|
882
|
+
completionTokensDetails?: CompletionTokensDetails;
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
/**
|
|
886
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
887
|
+
*/
|
|
888
|
+
|
|
889
|
+
interface Function {
|
|
890
|
+
name?: string;
|
|
891
|
+
description?: string;
|
|
892
|
+
strict?: boolean;
|
|
893
|
+
parameters?: JsonObjectSchema;
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
/**
|
|
897
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
898
|
+
*/
|
|
899
|
+
|
|
900
|
+
interface JsonObjectSchema {
|
|
901
|
+
type?: string;
|
|
902
|
+
description?: string;
|
|
903
|
+
properties?: Record<string, JsonSchemaElement>;
|
|
904
|
+
required?: string[];
|
|
905
|
+
additionalProperties?: boolean;
|
|
906
|
+
defs?: Record<string, JsonSchemaElement>;
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
/**
|
|
910
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
911
|
+
*/
|
|
912
|
+
|
|
913
|
+
interface JsonSchema {
|
|
914
|
+
name?: string;
|
|
915
|
+
strict?: boolean;
|
|
916
|
+
schema?: JsonObjectSchema;
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
/**
|
|
920
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
921
|
+
*/
|
|
922
|
+
interface JsonSchemaElement {
|
|
923
|
+
type?: string;
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
/**
|
|
927
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
928
|
+
*/
|
|
929
|
+
type Message = Record<string, unknown>;
|
|
930
|
+
|
|
931
|
+
/**
|
|
932
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
933
|
+
*/
|
|
934
|
+
type ResponseFormatType = "text" | "json_object" | "json_schema";
|
|
935
|
+
declare const ResponseFormatType: {
|
|
936
|
+
readonly Text: "text";
|
|
937
|
+
readonly JsonObject: "json_object";
|
|
938
|
+
readonly JsonSchema: "json_schema";
|
|
939
|
+
};
|
|
940
|
+
|
|
941
|
+
/**
|
|
942
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
943
|
+
*/
|
|
944
|
+
|
|
945
|
+
interface ResponseFormat {
|
|
946
|
+
type?: ResponseFormatType;
|
|
947
|
+
jsonSchema?: JsonSchema;
|
|
948
|
+
}
|
|
949
|
+
|
|
950
|
+
/**
|
|
951
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
952
|
+
*/
|
|
953
|
+
interface StreamOptions {
|
|
954
|
+
includeUsage?: boolean;
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
/**
|
|
958
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
959
|
+
*/
|
|
960
|
+
|
|
961
|
+
interface Tool {
|
|
962
|
+
type?: "function";
|
|
963
|
+
function?: Function;
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
/**
|
|
967
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
968
|
+
*/
|
|
969
|
+
|
|
970
|
+
interface ExperimentItem {
|
|
971
|
+
id?: string;
|
|
972
|
+
experimentId: string;
|
|
973
|
+
datasetItemId: string;
|
|
974
|
+
traceId: string;
|
|
975
|
+
input?: JsonNode;
|
|
976
|
+
output?: JsonNode;
|
|
977
|
+
feedbackScores?: FeedbackScore[];
|
|
978
|
+
createdAt?: Date;
|
|
979
|
+
lastUpdatedAt?: Date;
|
|
980
|
+
createdBy?: string;
|
|
981
|
+
lastUpdatedBy?: string;
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
/**
|
|
985
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
986
|
+
*/
|
|
987
|
+
type FeedbackScoreSource = "ui" | "sdk";
|
|
988
|
+
declare const FeedbackScoreSource: {
|
|
989
|
+
readonly Ui: "ui";
|
|
990
|
+
readonly Sdk: "sdk";
|
|
991
|
+
};
|
|
992
|
+
|
|
993
|
+
/**
|
|
994
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
995
|
+
*/
|
|
996
|
+
|
|
997
|
+
interface FeedbackScore {
|
|
998
|
+
name: string;
|
|
999
|
+
categoryName?: string;
|
|
1000
|
+
value: number;
|
|
1001
|
+
reason?: string;
|
|
1002
|
+
source: FeedbackScoreSource;
|
|
1003
|
+
createdAt?: Date;
|
|
1004
|
+
lastUpdatedAt?: Date;
|
|
1005
|
+
createdBy?: string;
|
|
1006
|
+
lastUpdatedBy?: string;
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
/**
|
|
1010
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1011
|
+
*/
|
|
1012
|
+
type JsonNode = Record<string, unknown>;
|
|
1013
|
+
|
|
1014
|
+
/**
|
|
1015
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1016
|
+
*/
|
|
1017
|
+
type DatasetItemWriteSource = "manual" | "trace" | "span" | "sdk";
|
|
1018
|
+
declare const DatasetItemWriteSource: {
|
|
1019
|
+
readonly Manual: "manual";
|
|
1020
|
+
readonly Trace: "trace";
|
|
1021
|
+
readonly Span: "span";
|
|
1022
|
+
readonly Sdk: "sdk";
|
|
1023
|
+
};
|
|
1024
|
+
|
|
1025
|
+
/**
|
|
1026
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1027
|
+
*/
|
|
1028
|
+
|
|
1029
|
+
interface DatasetItemWrite {
|
|
1030
|
+
id?: string;
|
|
1031
|
+
input?: JsonNodeWrite;
|
|
1032
|
+
expectedOutput?: JsonNodeWrite;
|
|
1033
|
+
metadata?: JsonNodeWrite;
|
|
1034
|
+
traceId?: string;
|
|
1035
|
+
spanId?: string;
|
|
1036
|
+
source: DatasetItemWriteSource;
|
|
1037
|
+
data?: JsonNode;
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
/**
|
|
1041
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1042
|
+
*/
|
|
1043
|
+
type JsonNodeWrite = Record<string, unknown>;
|
|
1044
|
+
|
|
1045
|
+
/**
|
|
1046
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1047
|
+
*/
|
|
1048
|
+
interface BatchDelete {
|
|
1049
|
+
ids: string[];
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
/**
|
|
1053
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1054
|
+
*/
|
|
1055
|
+
type ColumnCompareTypesItem = "string" | "number" | "object" | "boolean" | "array" | "null";
|
|
1056
|
+
declare const ColumnCompareTypesItem: {
|
|
1057
|
+
readonly String: "string";
|
|
1058
|
+
readonly Number: "number";
|
|
1059
|
+
readonly Object: "object";
|
|
1060
|
+
readonly Boolean: "boolean";
|
|
1061
|
+
readonly Array: "array";
|
|
1062
|
+
readonly Null: "null";
|
|
1063
|
+
};
|
|
1064
|
+
|
|
1065
|
+
/**
|
|
1066
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1067
|
+
*/
|
|
1068
|
+
|
|
1069
|
+
interface ColumnCompare {
|
|
1070
|
+
name?: string;
|
|
1071
|
+
types?: ColumnCompareTypesItem[];
|
|
1072
|
+
filterFieldPrefix?: string;
|
|
1073
|
+
/** The field to use for filtering */
|
|
1074
|
+
filterField?: string;
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
/**
|
|
1078
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1079
|
+
*/
|
|
1080
|
+
|
|
1081
|
+
interface DatasetItemPageCompare {
|
|
1082
|
+
content?: DatasetItemCompare[];
|
|
1083
|
+
page?: number;
|
|
1084
|
+
size?: number;
|
|
1085
|
+
total?: number;
|
|
1086
|
+
columns?: ColumnCompare[];
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
/**
|
|
1090
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1091
|
+
*/
|
|
1092
|
+
type DatasetItemCompareSource = "manual" | "trace" | "span" | "sdk";
|
|
1093
|
+
declare const DatasetItemCompareSource: {
|
|
1094
|
+
readonly Manual: "manual";
|
|
1095
|
+
readonly Trace: "trace";
|
|
1096
|
+
readonly Span: "span";
|
|
1097
|
+
readonly Sdk: "sdk";
|
|
1098
|
+
};
|
|
1099
|
+
|
|
1100
|
+
/**
|
|
1101
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1102
|
+
*/
|
|
1103
|
+
|
|
1104
|
+
interface DatasetItemCompare {
|
|
1105
|
+
id?: string;
|
|
1106
|
+
input?: JsonNodeCompare;
|
|
1107
|
+
expectedOutput?: JsonNodeCompare;
|
|
1108
|
+
metadata?: JsonNodeCompare;
|
|
1109
|
+
traceId?: string;
|
|
1110
|
+
spanId?: string;
|
|
1111
|
+
source: DatasetItemCompareSource;
|
|
1112
|
+
data?: JsonNode;
|
|
1113
|
+
experimentItems?: ExperimentItemCompare[];
|
|
1114
|
+
createdAt?: Date;
|
|
1115
|
+
lastUpdatedAt?: Date;
|
|
1116
|
+
createdBy?: string;
|
|
1117
|
+
lastUpdatedBy?: string;
|
|
1118
|
+
}
|
|
1119
|
+
|
|
1120
|
+
/**
|
|
1121
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1122
|
+
*/
|
|
1123
|
+
|
|
1124
|
+
interface ExperimentItemCompare {
|
|
1125
|
+
id?: string;
|
|
1126
|
+
experimentId: string;
|
|
1127
|
+
datasetItemId: string;
|
|
1128
|
+
traceId: string;
|
|
1129
|
+
input?: JsonNodeCompare;
|
|
1130
|
+
output?: JsonNodeCompare;
|
|
1131
|
+
feedbackScores?: FeedbackScoreCompare[];
|
|
1132
|
+
createdAt?: Date;
|
|
1133
|
+
lastUpdatedAt?: Date;
|
|
1134
|
+
createdBy?: string;
|
|
1135
|
+
lastUpdatedBy?: string;
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
/**
|
|
1139
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1140
|
+
*/
|
|
1141
|
+
type FeedbackScoreCompareSource = "ui" | "sdk";
|
|
1142
|
+
declare const FeedbackScoreCompareSource: {
|
|
1143
|
+
readonly Ui: "ui";
|
|
1144
|
+
readonly Sdk: "sdk";
|
|
1145
|
+
};
|
|
1146
|
+
|
|
1147
|
+
/**
|
|
1148
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1149
|
+
*/
|
|
1150
|
+
|
|
1151
|
+
interface FeedbackScoreCompare {
|
|
1152
|
+
name: string;
|
|
1153
|
+
categoryName?: string;
|
|
1154
|
+
value: number;
|
|
1155
|
+
reason?: string;
|
|
1156
|
+
source: FeedbackScoreCompareSource;
|
|
1157
|
+
createdAt?: Date;
|
|
1158
|
+
lastUpdatedAt?: Date;
|
|
1159
|
+
createdBy?: string;
|
|
1160
|
+
lastUpdatedBy?: string;
|
|
1161
|
+
}
|
|
1162
|
+
|
|
1163
|
+
/**
|
|
1164
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1165
|
+
*/
|
|
1166
|
+
type JsonNodeCompare = Record<string, unknown>;
|
|
1167
|
+
|
|
1168
|
+
/**
|
|
1169
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1170
|
+
*/
|
|
1171
|
+
|
|
1172
|
+
interface DatasetPagePublic {
|
|
1173
|
+
content?: DatasetPublic[];
|
|
1174
|
+
page?: number;
|
|
1175
|
+
size?: number;
|
|
1176
|
+
total?: number;
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
/**
|
|
1180
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1181
|
+
*/
|
|
1182
|
+
interface DatasetPublic {
|
|
1183
|
+
id?: string;
|
|
1184
|
+
name: string;
|
|
1185
|
+
description?: string;
|
|
1186
|
+
createdAt?: Date;
|
|
1187
|
+
createdBy?: string;
|
|
1188
|
+
lastUpdatedAt?: Date;
|
|
1189
|
+
lastUpdatedBy?: string;
|
|
1190
|
+
experimentCount?: number;
|
|
1191
|
+
datasetItemsCount?: number;
|
|
1192
|
+
mostRecentExperimentAt?: Date;
|
|
1193
|
+
lastCreatedExperimentAt?: Date;
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1196
|
+
/**
|
|
1197
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1198
|
+
*/
|
|
1199
|
+
type DatasetItemPublicSource = "manual" | "trace" | "span" | "sdk";
|
|
1200
|
+
declare const DatasetItemPublicSource: {
|
|
1201
|
+
readonly Manual: "manual";
|
|
1202
|
+
readonly Trace: "trace";
|
|
1203
|
+
readonly Span: "span";
|
|
1204
|
+
readonly Sdk: "sdk";
|
|
1205
|
+
};
|
|
1206
|
+
|
|
1207
|
+
/**
|
|
1208
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1209
|
+
*/
|
|
1210
|
+
|
|
1211
|
+
interface DatasetItemPublic {
|
|
1212
|
+
id?: string;
|
|
1213
|
+
input?: JsonNodePublic;
|
|
1214
|
+
expectedOutput?: JsonNodePublic;
|
|
1215
|
+
metadata?: JsonNodePublic;
|
|
1216
|
+
traceId?: string;
|
|
1217
|
+
spanId?: string;
|
|
1218
|
+
source: DatasetItemPublicSource;
|
|
1219
|
+
data?: JsonNode;
|
|
1220
|
+
experimentItems?: ExperimentItemPublic[];
|
|
1221
|
+
createdAt?: Date;
|
|
1222
|
+
lastUpdatedAt?: Date;
|
|
1223
|
+
createdBy?: string;
|
|
1224
|
+
lastUpdatedBy?: string;
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
/**
|
|
1228
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1229
|
+
*/
|
|
1230
|
+
interface ExperimentItemPublic {
|
|
1231
|
+
id?: string;
|
|
1232
|
+
experimentId: string;
|
|
1233
|
+
datasetItemId: string;
|
|
1234
|
+
traceId: string;
|
|
1235
|
+
createdAt?: Date;
|
|
1236
|
+
lastUpdatedAt?: Date;
|
|
1237
|
+
createdBy?: string;
|
|
1238
|
+
lastUpdatedBy?: string;
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
/**
|
|
1242
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1243
|
+
*/
|
|
1244
|
+
type JsonNodePublic = Record<string, unknown>;
|
|
1245
|
+
|
|
1246
|
+
/**
|
|
1247
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1248
|
+
*/
|
|
1249
|
+
type ColumnPublicTypesItem = "string" | "number" | "object" | "boolean" | "array" | "null";
|
|
1250
|
+
declare const ColumnPublicTypesItem: {
|
|
1251
|
+
readonly String: "string";
|
|
1252
|
+
readonly Number: "number";
|
|
1253
|
+
readonly Object: "object";
|
|
1254
|
+
readonly Boolean: "boolean";
|
|
1255
|
+
readonly Array: "array";
|
|
1256
|
+
readonly Null: "null";
|
|
1257
|
+
};
|
|
1258
|
+
|
|
1259
|
+
/**
|
|
1260
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1261
|
+
*/
|
|
1262
|
+
|
|
1263
|
+
interface ColumnPublic {
|
|
1264
|
+
name?: string;
|
|
1265
|
+
types?: ColumnPublicTypesItem[];
|
|
1266
|
+
filterFieldPrefix?: string;
|
|
1267
|
+
/** The field to use for filtering */
|
|
1268
|
+
filterField?: string;
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
/**
|
|
1272
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1273
|
+
*/
|
|
1274
|
+
|
|
1275
|
+
interface DatasetItemPagePublic {
|
|
1276
|
+
content?: DatasetItemPublic[];
|
|
1277
|
+
page?: number;
|
|
1278
|
+
size?: number;
|
|
1279
|
+
total?: number;
|
|
1280
|
+
columns?: ColumnPublic[];
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
/**
|
|
1284
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1285
|
+
*/
|
|
1286
|
+
type ColumnTypesItem = "string" | "number" | "object" | "boolean" | "array" | "null";
|
|
1287
|
+
declare const ColumnTypesItem: {
|
|
1288
|
+
readonly String: "string";
|
|
1289
|
+
readonly Number: "number";
|
|
1290
|
+
readonly Object: "object";
|
|
1291
|
+
readonly Boolean: "boolean";
|
|
1292
|
+
readonly Array: "array";
|
|
1293
|
+
readonly Null: "null";
|
|
1294
|
+
};
|
|
1295
|
+
|
|
1296
|
+
/**
|
|
1297
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1298
|
+
*/
|
|
1299
|
+
|
|
1300
|
+
interface Column {
|
|
1301
|
+
name?: string;
|
|
1302
|
+
types?: ColumnTypesItem[];
|
|
1303
|
+
filterFieldPrefix?: string;
|
|
1304
|
+
/** The field to use for filtering */
|
|
1305
|
+
filterField?: string;
|
|
1306
|
+
}
|
|
1307
|
+
|
|
1308
|
+
/**
|
|
1309
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1310
|
+
*/
|
|
1311
|
+
|
|
1312
|
+
interface PageColumns {
|
|
1313
|
+
columns?: Column[];
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1316
|
+
/**
|
|
1317
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1318
|
+
*/
|
|
1319
|
+
interface PromptVersionLinkWrite {
|
|
1320
|
+
id: string;
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1323
|
+
/**
|
|
1324
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1325
|
+
*/
|
|
1326
|
+
|
|
1327
|
+
interface ExperimentPagePublic {
|
|
1328
|
+
page?: number;
|
|
1329
|
+
size?: number;
|
|
1330
|
+
total?: number;
|
|
1331
|
+
content?: ExperimentPublic[];
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1334
|
+
/**
|
|
1335
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1336
|
+
*/
|
|
1337
|
+
|
|
1338
|
+
interface ExperimentPublic {
|
|
1339
|
+
id?: string;
|
|
1340
|
+
datasetName: string;
|
|
1341
|
+
datasetId?: string;
|
|
1342
|
+
name?: string;
|
|
1343
|
+
metadata?: JsonNodePublic;
|
|
1344
|
+
feedbackScores?: FeedbackScoreAveragePublic[];
|
|
1345
|
+
traceCount?: number;
|
|
1346
|
+
createdAt?: Date;
|
|
1347
|
+
lastUpdatedAt?: Date;
|
|
1348
|
+
createdBy?: string;
|
|
1349
|
+
lastUpdatedBy?: string;
|
|
1350
|
+
promptVersion?: PromptVersionLinkPublic;
|
|
1351
|
+
}
|
|
1352
|
+
|
|
1353
|
+
/**
|
|
1354
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1355
|
+
*/
|
|
1356
|
+
interface FeedbackScoreAveragePublic {
|
|
1357
|
+
name: string;
|
|
1358
|
+
value: number;
|
|
1359
|
+
}
|
|
1360
|
+
|
|
1361
|
+
/**
|
|
1362
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1363
|
+
*/
|
|
1364
|
+
interface PromptVersionLinkPublic {
|
|
1365
|
+
id: string;
|
|
1366
|
+
commit?: string;
|
|
1367
|
+
promptId?: string;
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1370
|
+
/**
|
|
1371
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1372
|
+
*/
|
|
1373
|
+
|
|
1374
|
+
interface CategoricalFeedbackDefinitionCreate {
|
|
1375
|
+
details?: CategoricalFeedbackDetailCreate;
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1378
|
+
/**
|
|
1379
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1380
|
+
*/
|
|
1381
|
+
interface CategoricalFeedbackDetailCreate {
|
|
1382
|
+
categories: Record<string, number>;
|
|
1383
|
+
}
|
|
1384
|
+
|
|
1385
|
+
/**
|
|
1386
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1387
|
+
*/
|
|
1388
|
+
|
|
1389
|
+
type FeedbackCreate = FeedbackCreate.Numerical | FeedbackCreate.Categorical;
|
|
1390
|
+
declare namespace FeedbackCreate {
|
|
1391
|
+
interface Numerical extends NumericalFeedbackDefinitionCreate, _Base {
|
|
1392
|
+
type: "numerical";
|
|
1393
|
+
}
|
|
1394
|
+
interface Categorical extends CategoricalFeedbackDefinitionCreate, _Base {
|
|
1395
|
+
type: "categorical";
|
|
1396
|
+
}
|
|
1397
|
+
interface _Base {
|
|
1398
|
+
id?: string;
|
|
1399
|
+
name: string;
|
|
1400
|
+
}
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
/**
|
|
1404
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1405
|
+
*/
|
|
1406
|
+
|
|
1407
|
+
interface NumericalFeedbackDefinitionCreate {
|
|
1408
|
+
details?: NumericalFeedbackDetailCreate;
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1411
|
+
/**
|
|
1412
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1413
|
+
*/
|
|
1414
|
+
interface NumericalFeedbackDetailCreate {
|
|
1415
|
+
max: number;
|
|
1416
|
+
min: number;
|
|
1417
|
+
}
|
|
1418
|
+
|
|
1419
|
+
/**
|
|
1420
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1421
|
+
*/
|
|
1422
|
+
|
|
1423
|
+
interface CategoricalFeedbackDefinitionPublic {
|
|
1424
|
+
details?: CategoricalFeedbackDetailPublic;
|
|
1425
|
+
createdAt?: Date;
|
|
1426
|
+
createdBy?: string;
|
|
1427
|
+
lastUpdatedAt?: Date;
|
|
1428
|
+
lastUpdatedBy?: string;
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1431
|
+
/**
|
|
1432
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1433
|
+
*/
|
|
1434
|
+
interface CategoricalFeedbackDetailPublic {
|
|
1435
|
+
categories: Record<string, number>;
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1438
|
+
/**
|
|
1439
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1440
|
+
*/
|
|
1441
|
+
|
|
1442
|
+
interface FeedbackDefinitionPagePublic {
|
|
1443
|
+
page?: number;
|
|
1444
|
+
size?: number;
|
|
1445
|
+
total?: number;
|
|
1446
|
+
content?: FeedbackObjectPublic[];
|
|
1447
|
+
}
|
|
1448
|
+
|
|
1449
|
+
/**
|
|
1450
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1451
|
+
*/
|
|
1452
|
+
|
|
1453
|
+
type FeedbackObjectPublic = FeedbackObjectPublic.Numerical | FeedbackObjectPublic.Categorical;
|
|
1454
|
+
declare namespace FeedbackObjectPublic {
|
|
1455
|
+
interface Numerical extends NumericalFeedbackDefinitionPublic, _Base {
|
|
1456
|
+
type: "numerical";
|
|
1457
|
+
}
|
|
1458
|
+
interface Categorical extends CategoricalFeedbackDefinitionPublic, _Base {
|
|
1459
|
+
type: "categorical";
|
|
1460
|
+
}
|
|
1461
|
+
interface _Base {
|
|
1462
|
+
id?: string;
|
|
1463
|
+
name: string;
|
|
1464
|
+
createdAt?: Date;
|
|
1465
|
+
createdBy?: string;
|
|
1466
|
+
lastUpdatedAt?: Date;
|
|
1467
|
+
lastUpdatedBy?: string;
|
|
1468
|
+
}
|
|
1469
|
+
}
|
|
1470
|
+
|
|
1471
|
+
/**
|
|
1472
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1473
|
+
*/
|
|
1474
|
+
|
|
1475
|
+
interface NumericalFeedbackDefinitionPublic {
|
|
1476
|
+
details?: NumericalFeedbackDetailPublic;
|
|
1477
|
+
createdAt?: Date;
|
|
1478
|
+
createdBy?: string;
|
|
1479
|
+
lastUpdatedAt?: Date;
|
|
1480
|
+
lastUpdatedBy?: string;
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1483
|
+
/**
|
|
1484
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1485
|
+
*/
|
|
1486
|
+
interface NumericalFeedbackDetailPublic {
|
|
1487
|
+
max: number;
|
|
1488
|
+
min: number;
|
|
1489
|
+
}
|
|
1490
|
+
|
|
1491
|
+
/**
|
|
1492
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1493
|
+
*/
|
|
1494
|
+
|
|
1495
|
+
type FeedbackPublic = FeedbackPublic.Numerical | FeedbackPublic.Categorical;
|
|
1496
|
+
declare namespace FeedbackPublic {
|
|
1497
|
+
interface Numerical extends NumericalFeedbackDefinitionPublic, _Base {
|
|
1498
|
+
type: "numerical";
|
|
1499
|
+
}
|
|
1500
|
+
interface Categorical extends CategoricalFeedbackDefinitionPublic, _Base {
|
|
1501
|
+
type: "categorical";
|
|
1502
|
+
}
|
|
1503
|
+
interface _Base {
|
|
1504
|
+
id?: string;
|
|
1505
|
+
name: string;
|
|
1506
|
+
createdAt?: Date;
|
|
1507
|
+
createdBy?: string;
|
|
1508
|
+
lastUpdatedAt?: Date;
|
|
1509
|
+
lastUpdatedBy?: string;
|
|
1510
|
+
}
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1513
|
+
/**
|
|
1514
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1515
|
+
*/
|
|
1516
|
+
|
|
1517
|
+
interface CategoricalFeedbackDefinitionUpdate {
|
|
1518
|
+
details?: CategoricalFeedbackDetailUpdate;
|
|
1519
|
+
}
|
|
1520
|
+
|
|
1521
|
+
/**
|
|
1522
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1523
|
+
*/
|
|
1524
|
+
interface CategoricalFeedbackDetailUpdate {
|
|
1525
|
+
categories: Record<string, number>;
|
|
1526
|
+
}
|
|
1527
|
+
|
|
1528
|
+
/**
|
|
1529
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1530
|
+
*/
|
|
1531
|
+
|
|
1532
|
+
type FeedbackUpdate = FeedbackUpdate.Numerical | FeedbackUpdate.Categorical;
|
|
1533
|
+
declare namespace FeedbackUpdate {
|
|
1534
|
+
interface Numerical extends NumericalFeedbackDefinitionUpdate, _Base {
|
|
1535
|
+
type: "numerical";
|
|
1536
|
+
}
|
|
1537
|
+
interface Categorical extends CategoricalFeedbackDefinitionUpdate, _Base {
|
|
1538
|
+
type: "categorical";
|
|
1539
|
+
}
|
|
1540
|
+
interface _Base {
|
|
1541
|
+
id?: string;
|
|
1542
|
+
name: string;
|
|
1543
|
+
}
|
|
1544
|
+
}
|
|
1545
|
+
|
|
1546
|
+
/**
|
|
1547
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1548
|
+
*/
|
|
1549
|
+
|
|
1550
|
+
interface NumericalFeedbackDefinitionUpdate {
|
|
1551
|
+
details?: NumericalFeedbackDetailUpdate;
|
|
1552
|
+
}
|
|
1553
|
+
|
|
1554
|
+
/**
|
|
1555
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1556
|
+
*/
|
|
1557
|
+
interface NumericalFeedbackDetailUpdate {
|
|
1558
|
+
max: number;
|
|
1559
|
+
min: number;
|
|
1560
|
+
}
|
|
1561
|
+
|
|
1562
|
+
/**
|
|
1563
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1564
|
+
*/
|
|
1565
|
+
|
|
1566
|
+
interface ProjectPagePublic {
|
|
1567
|
+
page?: number;
|
|
1568
|
+
size?: number;
|
|
1569
|
+
total?: number;
|
|
1570
|
+
content?: ProjectPublic[];
|
|
1571
|
+
sortableBy?: string[];
|
|
1572
|
+
}
|
|
1573
|
+
|
|
1574
|
+
/**
|
|
1575
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1576
|
+
*/
|
|
1577
|
+
interface ProviderApiKeyPublic {
|
|
1578
|
+
id?: string;
|
|
1579
|
+
provider: "openai";
|
|
1580
|
+
createdAt?: Date;
|
|
1581
|
+
createdBy?: string;
|
|
1582
|
+
lastUpdatedAt?: Date;
|
|
1583
|
+
lastUpdatedBy?: string;
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1586
|
+
/**
|
|
1587
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1588
|
+
*/
|
|
1589
|
+
interface ProjectPublic {
|
|
1590
|
+
id?: string;
|
|
1591
|
+
name: string;
|
|
1592
|
+
description?: string;
|
|
1593
|
+
createdAt?: Date;
|
|
1594
|
+
createdBy?: string;
|
|
1595
|
+
lastUpdatedAt?: Date;
|
|
1596
|
+
lastUpdatedBy?: string;
|
|
1597
|
+
lastUpdatedTraceAt?: Date;
|
|
1598
|
+
}
|
|
1599
|
+
|
|
1600
|
+
/**
|
|
1601
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1602
|
+
*/
|
|
1603
|
+
interface DataPointNumberPublic {
|
|
1604
|
+
time: Date;
|
|
1605
|
+
value?: number;
|
|
1606
|
+
}
|
|
1607
|
+
|
|
1608
|
+
/**
|
|
1609
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1610
|
+
*/
|
|
1611
|
+
type ProjectMetricResponsePublicMetricType = "FEEDBACK_SCORES" | "TRACE_COUNT" | "TOKEN_USAGE" | "DURATION" | "COST";
|
|
1612
|
+
declare const ProjectMetricResponsePublicMetricType: {
|
|
1613
|
+
readonly FeedbackScores: "FEEDBACK_SCORES";
|
|
1614
|
+
readonly TraceCount: "TRACE_COUNT";
|
|
1615
|
+
readonly TokenUsage: "TOKEN_USAGE";
|
|
1616
|
+
readonly Duration: "DURATION";
|
|
1617
|
+
readonly Cost: "COST";
|
|
1618
|
+
};
|
|
1619
|
+
|
|
1620
|
+
/**
|
|
1621
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1622
|
+
*/
|
|
1623
|
+
type ProjectMetricResponsePublicInterval = "HOURLY" | "DAILY" | "WEEKLY";
|
|
1624
|
+
declare const ProjectMetricResponsePublicInterval: {
|
|
1625
|
+
readonly Hourly: "HOURLY";
|
|
1626
|
+
readonly Daily: "DAILY";
|
|
1627
|
+
readonly Weekly: "WEEKLY";
|
|
1628
|
+
};
|
|
1629
|
+
|
|
1630
|
+
/**
|
|
1631
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1632
|
+
*/
|
|
1633
|
+
|
|
1634
|
+
interface ProjectMetricResponsePublic {
|
|
1635
|
+
projectId?: string;
|
|
1636
|
+
metricType?: ProjectMetricResponsePublicMetricType;
|
|
1637
|
+
interval?: ProjectMetricResponsePublicInterval;
|
|
1638
|
+
results?: ResultsNumberPublic[];
|
|
1639
|
+
}
|
|
1640
|
+
|
|
1641
|
+
/**
|
|
1642
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1643
|
+
*/
|
|
1644
|
+
|
|
1645
|
+
interface ResultsNumberPublic {
|
|
1646
|
+
name?: string;
|
|
1647
|
+
data?: DataPointNumberPublic[];
|
|
1648
|
+
}
|
|
1649
|
+
|
|
1650
|
+
/**
|
|
1651
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1652
|
+
*/
|
|
1653
|
+
interface PromptVersionDetail {
|
|
1654
|
+
/** version unique identifier, generated if absent */
|
|
1655
|
+
id?: string;
|
|
1656
|
+
promptId?: string;
|
|
1657
|
+
/** version short unique identifier, generated if absent. it must be 8 characters long */
|
|
1658
|
+
commit?: string;
|
|
1659
|
+
template: string;
|
|
1660
|
+
variables?: string[];
|
|
1661
|
+
createdAt?: Date;
|
|
1662
|
+
createdBy?: string;
|
|
1663
|
+
}
|
|
1664
|
+
|
|
1665
|
+
/**
|
|
1666
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1667
|
+
*/
|
|
1668
|
+
|
|
1669
|
+
interface PromptDetail {
|
|
1670
|
+
id?: string;
|
|
1671
|
+
name: string;
|
|
1672
|
+
description?: string;
|
|
1673
|
+
createdAt?: Date;
|
|
1674
|
+
createdBy?: string;
|
|
1675
|
+
lastUpdatedAt?: Date;
|
|
1676
|
+
lastUpdatedBy?: string;
|
|
1677
|
+
versionCount?: number;
|
|
1678
|
+
latestVersion?: PromptVersionDetail;
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1681
|
+
/**
|
|
1682
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1683
|
+
*/
|
|
1684
|
+
|
|
1685
|
+
interface PromptVersionPagePublic {
|
|
1686
|
+
page?: number;
|
|
1687
|
+
size?: number;
|
|
1688
|
+
total?: number;
|
|
1689
|
+
content?: PromptVersionPublic[];
|
|
1690
|
+
}
|
|
1691
|
+
|
|
1692
|
+
/**
|
|
1693
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1694
|
+
*/
|
|
1695
|
+
interface PromptVersionPublic {
|
|
1696
|
+
/** version unique identifier, generated if absent */
|
|
1697
|
+
id?: string;
|
|
1698
|
+
promptId?: string;
|
|
1699
|
+
/** version short unique identifier, generated if absent. it must be 8 characters long */
|
|
1700
|
+
commit?: string;
|
|
1701
|
+
template: string;
|
|
1702
|
+
createdAt?: Date;
|
|
1703
|
+
createdBy?: string;
|
|
1704
|
+
}
|
|
1705
|
+
|
|
1706
|
+
/**
|
|
1707
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1708
|
+
*/
|
|
1709
|
+
|
|
1710
|
+
interface PromptPagePublic {
|
|
1711
|
+
page?: number;
|
|
1712
|
+
size?: number;
|
|
1713
|
+
total?: number;
|
|
1714
|
+
content?: PromptPublic[];
|
|
1715
|
+
}
|
|
1716
|
+
|
|
1717
|
+
/**
|
|
1718
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1719
|
+
*/
|
|
1720
|
+
interface PromptPublic {
|
|
1721
|
+
id?: string;
|
|
1722
|
+
name: string;
|
|
1723
|
+
description?: string;
|
|
1724
|
+
createdAt?: Date;
|
|
1725
|
+
createdBy?: string;
|
|
1726
|
+
lastUpdatedAt?: Date;
|
|
1727
|
+
lastUpdatedBy?: string;
|
|
1728
|
+
versionCount?: number;
|
|
1729
|
+
}
|
|
1730
|
+
|
|
1731
|
+
/**
|
|
1732
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1733
|
+
*/
|
|
1734
|
+
interface ErrorInfo {
|
|
1735
|
+
exceptionType: string;
|
|
1736
|
+
message?: string;
|
|
1737
|
+
traceback: string;
|
|
1738
|
+
}
|
|
1739
|
+
|
|
1740
|
+
/**
|
|
1741
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1742
|
+
*/
|
|
1743
|
+
type SpanType = "general" | "tool" | "llm";
|
|
1744
|
+
declare const SpanType: {
|
|
1745
|
+
readonly General: "general";
|
|
1746
|
+
readonly Tool: "tool";
|
|
1747
|
+
readonly Llm: "llm";
|
|
1748
|
+
};
|
|
1749
|
+
|
|
1750
|
+
/**
|
|
1751
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1752
|
+
*/
|
|
1753
|
+
|
|
1754
|
+
interface Span$1 {
|
|
1755
|
+
id?: string;
|
|
1756
|
+
/** If null, the default project is used */
|
|
1757
|
+
projectName?: string;
|
|
1758
|
+
projectId?: string;
|
|
1759
|
+
traceId: string;
|
|
1760
|
+
parentSpanId?: string;
|
|
1761
|
+
name: string;
|
|
1762
|
+
type: SpanType;
|
|
1763
|
+
startTime: Date;
|
|
1764
|
+
endTime?: Date;
|
|
1765
|
+
input?: JsonNode;
|
|
1766
|
+
output?: JsonNode;
|
|
1767
|
+
metadata?: JsonNode;
|
|
1768
|
+
model?: string;
|
|
1769
|
+
provider?: string;
|
|
1770
|
+
tags?: string[];
|
|
1771
|
+
usage?: Record<string, number>;
|
|
1772
|
+
errorInfo?: ErrorInfo;
|
|
1773
|
+
createdAt?: Date;
|
|
1774
|
+
lastUpdatedAt?: Date;
|
|
1775
|
+
createdBy?: string;
|
|
1776
|
+
lastUpdatedBy?: string;
|
|
1777
|
+
feedbackScores?: FeedbackScore[];
|
|
1778
|
+
totalEstimatedCost?: number;
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1781
|
+
/**
|
|
1782
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1783
|
+
*/
|
|
1784
|
+
interface ErrorInfoWrite {
|
|
1785
|
+
exceptionType: string;
|
|
1786
|
+
message?: string;
|
|
1787
|
+
traceback: string;
|
|
1788
|
+
}
|
|
1789
|
+
|
|
1790
|
+
/**
|
|
1791
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1792
|
+
*/
|
|
1793
|
+
type SpanWriteType = "general" | "tool" | "llm";
|
|
1794
|
+
declare const SpanWriteType: {
|
|
1795
|
+
readonly General: "general";
|
|
1796
|
+
readonly Tool: "tool";
|
|
1797
|
+
readonly Llm: "llm";
|
|
1798
|
+
};
|
|
1799
|
+
|
|
1800
|
+
/**
|
|
1801
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1802
|
+
*/
|
|
1803
|
+
|
|
1804
|
+
interface SpanWrite {
|
|
1805
|
+
id?: string;
|
|
1806
|
+
/** If null, the default project is used */
|
|
1807
|
+
projectName?: string;
|
|
1808
|
+
traceId: string;
|
|
1809
|
+
parentSpanId?: string;
|
|
1810
|
+
name: string;
|
|
1811
|
+
type: SpanWriteType;
|
|
1812
|
+
startTime: Date;
|
|
1813
|
+
endTime?: Date;
|
|
1814
|
+
input?: JsonNodeWrite;
|
|
1815
|
+
output?: JsonNodeWrite;
|
|
1816
|
+
metadata?: JsonNodeWrite;
|
|
1817
|
+
model?: string;
|
|
1818
|
+
provider?: string;
|
|
1819
|
+
tags?: string[];
|
|
1820
|
+
usage?: Record<string, number>;
|
|
1821
|
+
errorInfo?: ErrorInfoWrite;
|
|
1822
|
+
}
|
|
1823
|
+
|
|
1824
|
+
/**
|
|
1825
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1826
|
+
*/
|
|
1827
|
+
interface DeleteFeedbackScore {
|
|
1828
|
+
name: string;
|
|
1829
|
+
}
|
|
1830
|
+
|
|
1831
|
+
/**
|
|
1832
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1833
|
+
*/
|
|
1834
|
+
interface ErrorInfoPublic {
|
|
1835
|
+
exceptionType: string;
|
|
1836
|
+
message?: string;
|
|
1837
|
+
traceback: string;
|
|
1838
|
+
}
|
|
1839
|
+
|
|
1840
|
+
/**
|
|
1841
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1842
|
+
*/
|
|
1843
|
+
type FeedbackScorePublicSource = "ui" | "sdk";
|
|
1844
|
+
declare const FeedbackScorePublicSource: {
|
|
1845
|
+
readonly Ui: "ui";
|
|
1846
|
+
readonly Sdk: "sdk";
|
|
1847
|
+
};
|
|
1848
|
+
|
|
1849
|
+
/**
|
|
1850
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1851
|
+
*/
|
|
1852
|
+
|
|
1853
|
+
interface FeedbackScorePublic {
|
|
1854
|
+
name: string;
|
|
1855
|
+
categoryName?: string;
|
|
1856
|
+
value: number;
|
|
1857
|
+
reason?: string;
|
|
1858
|
+
source: FeedbackScorePublicSource;
|
|
1859
|
+
createdAt?: Date;
|
|
1860
|
+
lastUpdatedAt?: Date;
|
|
1861
|
+
createdBy?: string;
|
|
1862
|
+
lastUpdatedBy?: string;
|
|
1863
|
+
}
|
|
1864
|
+
|
|
1865
|
+
/**
|
|
1866
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1867
|
+
*/
|
|
1868
|
+
type SpanPublicType = "general" | "tool" | "llm";
|
|
1869
|
+
declare const SpanPublicType: {
|
|
1870
|
+
readonly General: "general";
|
|
1871
|
+
readonly Tool: "tool";
|
|
1872
|
+
readonly Llm: "llm";
|
|
1873
|
+
};
|
|
1874
|
+
|
|
1875
|
+
/**
|
|
1876
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1877
|
+
*/
|
|
1878
|
+
|
|
1879
|
+
interface SpanPublic {
|
|
1880
|
+
id?: string;
|
|
1881
|
+
projectId?: string;
|
|
1882
|
+
traceId: string;
|
|
1883
|
+
parentSpanId?: string;
|
|
1884
|
+
name: string;
|
|
1885
|
+
type: SpanPublicType;
|
|
1886
|
+
startTime: Date;
|
|
1887
|
+
endTime?: Date;
|
|
1888
|
+
input?: JsonNodePublic;
|
|
1889
|
+
output?: JsonNodePublic;
|
|
1890
|
+
metadata?: JsonNodePublic;
|
|
1891
|
+
model?: string;
|
|
1892
|
+
provider?: string;
|
|
1893
|
+
tags?: string[];
|
|
1894
|
+
usage?: Record<string, number>;
|
|
1895
|
+
errorInfo?: ErrorInfoPublic;
|
|
1896
|
+
createdAt?: Date;
|
|
1897
|
+
lastUpdatedAt?: Date;
|
|
1898
|
+
createdBy?: string;
|
|
1899
|
+
lastUpdatedBy?: string;
|
|
1900
|
+
feedbackScores?: FeedbackScorePublic[];
|
|
1901
|
+
totalEstimatedCost?: number;
|
|
1902
|
+
}
|
|
1903
|
+
|
|
1904
|
+
/**
|
|
1905
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1906
|
+
*/
|
|
1907
|
+
|
|
1908
|
+
interface SpanPagePublic {
|
|
1909
|
+
page?: number;
|
|
1910
|
+
size?: number;
|
|
1911
|
+
total?: number;
|
|
1912
|
+
content?: SpanPublic[];
|
|
1913
|
+
}
|
|
1914
|
+
|
|
1915
|
+
/**
|
|
1916
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1917
|
+
*/
|
|
1918
|
+
interface AvgValueStatPublic {
|
|
1919
|
+
value?: number;
|
|
1920
|
+
}
|
|
1921
|
+
|
|
1922
|
+
/**
|
|
1923
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1924
|
+
*/
|
|
1925
|
+
interface CountValueStatPublic {
|
|
1926
|
+
value?: number;
|
|
1927
|
+
}
|
|
1928
|
+
|
|
1929
|
+
/**
|
|
1930
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1931
|
+
*/
|
|
1932
|
+
|
|
1933
|
+
interface PercentageValueStatPublic {
|
|
1934
|
+
value?: PercentageValuesPublic;
|
|
1935
|
+
}
|
|
1936
|
+
|
|
1937
|
+
/**
|
|
1938
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1939
|
+
*/
|
|
1940
|
+
interface PercentageValuesPublic {
|
|
1941
|
+
p50?: number;
|
|
1942
|
+
p90?: number;
|
|
1943
|
+
p99?: number;
|
|
1944
|
+
}
|
|
1945
|
+
|
|
1946
|
+
/**
|
|
1947
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1948
|
+
*/
|
|
1949
|
+
|
|
1950
|
+
type ProjectStatItemObjectPublic = ProjectStatItemObjectPublic.Percentage | ProjectStatItemObjectPublic.Count | ProjectStatItemObjectPublic.Avg;
|
|
1951
|
+
declare namespace ProjectStatItemObjectPublic {
|
|
1952
|
+
interface Percentage extends PercentageValueStatPublic, _Base {
|
|
1953
|
+
type: "PERCENTAGE";
|
|
1954
|
+
}
|
|
1955
|
+
interface Count extends CountValueStatPublic, _Base {
|
|
1956
|
+
type: "COUNT";
|
|
1957
|
+
}
|
|
1958
|
+
interface Avg extends AvgValueStatPublic, _Base {
|
|
1959
|
+
type: "AVG";
|
|
1960
|
+
}
|
|
1961
|
+
interface _Base {
|
|
1962
|
+
name?: string;
|
|
1963
|
+
}
|
|
1964
|
+
}
|
|
1965
|
+
|
|
1966
|
+
/**
|
|
1967
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1968
|
+
*/
|
|
1969
|
+
|
|
1970
|
+
interface ProjectStatsPublic {
|
|
1971
|
+
stats?: ProjectStatItemObjectPublic[];
|
|
1972
|
+
}
|
|
1973
|
+
|
|
1974
|
+
/**
|
|
1975
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1976
|
+
*/
|
|
1977
|
+
|
|
1978
|
+
interface FeedbackScoreBatch {
|
|
1979
|
+
scores: FeedbackScoreBatchItem[];
|
|
1980
|
+
}
|
|
1981
|
+
|
|
1982
|
+
/**
|
|
1983
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1984
|
+
*/
|
|
1985
|
+
type FeedbackScoreBatchItemSource = "ui" | "sdk";
|
|
1986
|
+
declare const FeedbackScoreBatchItemSource: {
|
|
1987
|
+
readonly Ui: "ui";
|
|
1988
|
+
readonly Sdk: "sdk";
|
|
1989
|
+
};
|
|
1990
|
+
|
|
1991
|
+
/**
|
|
1992
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1993
|
+
*/
|
|
1994
|
+
|
|
1995
|
+
interface FeedbackScoreBatchItem {
|
|
1996
|
+
id: string;
|
|
1997
|
+
/** If null, the default project is used */
|
|
1998
|
+
projectName?: string;
|
|
1999
|
+
name: string;
|
|
2000
|
+
categoryName?: string;
|
|
2001
|
+
value: number;
|
|
2002
|
+
reason?: string;
|
|
2003
|
+
source: FeedbackScoreBatchItemSource;
|
|
2004
|
+
}
|
|
2005
|
+
|
|
2006
|
+
/**
|
|
2007
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2008
|
+
*/
|
|
2009
|
+
|
|
2010
|
+
interface Trace$1 {
|
|
2011
|
+
id?: string;
|
|
2012
|
+
/** If null, the default project is used */
|
|
2013
|
+
projectName?: string;
|
|
2014
|
+
projectId?: string;
|
|
2015
|
+
name: string;
|
|
2016
|
+
startTime: Date;
|
|
2017
|
+
endTime?: Date;
|
|
2018
|
+
input?: JsonNode;
|
|
2019
|
+
output?: JsonNode;
|
|
2020
|
+
metadata?: JsonNode;
|
|
2021
|
+
tags?: string[];
|
|
2022
|
+
errorInfo?: ErrorInfo;
|
|
2023
|
+
usage?: Record<string, number>;
|
|
2024
|
+
createdAt?: Date;
|
|
2025
|
+
lastUpdatedAt?: Date;
|
|
2026
|
+
createdBy?: string;
|
|
2027
|
+
lastUpdatedBy?: string;
|
|
2028
|
+
feedbackScores?: FeedbackScore[];
|
|
2029
|
+
totalEstimatedCost?: number;
|
|
2030
|
+
}
|
|
2031
|
+
|
|
2032
|
+
/**
|
|
2033
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2034
|
+
*/
|
|
2035
|
+
|
|
2036
|
+
interface TraceWrite {
|
|
2037
|
+
id?: string;
|
|
2038
|
+
/** If null, the default project is used */
|
|
2039
|
+
projectName?: string;
|
|
2040
|
+
name: string;
|
|
2041
|
+
startTime: Date;
|
|
2042
|
+
endTime?: Date;
|
|
2043
|
+
input?: JsonNodeWrite;
|
|
2044
|
+
output?: JsonNodeWrite;
|
|
2045
|
+
metadata?: JsonNodeWrite;
|
|
2046
|
+
tags?: string[];
|
|
2047
|
+
errorInfo?: ErrorInfoWrite;
|
|
2048
|
+
}
|
|
2049
|
+
|
|
2050
|
+
/**
|
|
2051
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2052
|
+
*/
|
|
2053
|
+
|
|
2054
|
+
interface TracePublic {
|
|
2055
|
+
id?: string;
|
|
2056
|
+
projectId?: string;
|
|
2057
|
+
name: string;
|
|
2058
|
+
startTime: Date;
|
|
2059
|
+
endTime?: Date;
|
|
2060
|
+
input?: JsonNodePublic;
|
|
2061
|
+
output?: JsonNodePublic;
|
|
2062
|
+
metadata?: JsonNodePublic;
|
|
2063
|
+
tags?: string[];
|
|
2064
|
+
errorInfo?: ErrorInfoPublic;
|
|
2065
|
+
usage?: Record<string, number>;
|
|
2066
|
+
createdAt?: Date;
|
|
2067
|
+
lastUpdatedAt?: Date;
|
|
2068
|
+
createdBy?: string;
|
|
2069
|
+
lastUpdatedBy?: string;
|
|
2070
|
+
feedbackScores?: FeedbackScorePublic[];
|
|
2071
|
+
totalEstimatedCost?: number;
|
|
2072
|
+
}
|
|
2073
|
+
|
|
2074
|
+
/**
|
|
2075
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2076
|
+
*/
|
|
2077
|
+
|
|
2078
|
+
interface TracePagePublic {
|
|
2079
|
+
page?: number;
|
|
2080
|
+
size?: number;
|
|
2081
|
+
total?: number;
|
|
2082
|
+
content?: TracePublic[];
|
|
2083
|
+
}
|
|
2084
|
+
|
|
2085
|
+
/**
|
|
2086
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2087
|
+
*/
|
|
2088
|
+
declare const OpikApiEnvironment: {
|
|
2089
|
+
readonly Default: "http://localhost:5173/api";
|
|
2090
|
+
};
|
|
2091
|
+
type OpikApiEnvironment = typeof OpikApiEnvironment.Default;
|
|
2092
|
+
|
|
2093
|
+
type APIResponse<Success, Failure> = SuccessfulResponse<Success> | FailedResponse<Failure>;
|
|
2094
|
+
interface SuccessfulResponse<T> {
|
|
2095
|
+
ok: true;
|
|
2096
|
+
body: T;
|
|
2097
|
+
headers?: Record<string, any>;
|
|
2098
|
+
}
|
|
2099
|
+
interface FailedResponse<T> {
|
|
2100
|
+
ok: false;
|
|
2101
|
+
error: T;
|
|
2102
|
+
}
|
|
2103
|
+
|
|
2104
|
+
type Supplier<T> = T | Promise<T> | (() => T | Promise<T>);
|
|
2105
|
+
declare const Supplier: {
|
|
2106
|
+
get: <T>(supplier: Supplier<T>) => Promise<T>;
|
|
2107
|
+
};
|
|
2108
|
+
|
|
2109
|
+
/**
|
|
2110
|
+
* APIPromise wraps a Promise that resolves with an APIResponse.
|
|
2111
|
+
* It provides convenient methods for handling both successful responses and errors.
|
|
2112
|
+
*
|
|
2113
|
+
* By default, when awaited, it will return just the response body data.
|
|
2114
|
+
* Use the `asRaw()` method to get access to both the response data and headers.
|
|
2115
|
+
*
|
|
2116
|
+
* @example
|
|
2117
|
+
* // Get just the response data
|
|
2118
|
+
* const data = await apiPromise;
|
|
2119
|
+
*
|
|
2120
|
+
* // Get response with headers
|
|
2121
|
+
* const { data, headers } = await apiPromise.asRaw();
|
|
2122
|
+
*
|
|
2123
|
+
* @template T The type of the successful response body
|
|
2124
|
+
*/
|
|
2125
|
+
declare class APIPromise<T> extends Promise<T> {
|
|
2126
|
+
private readonly responsePromise;
|
|
2127
|
+
constructor(responsePromise: Promise<APIResponse<T, unknown>>, executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void);
|
|
2128
|
+
asRaw(): Promise<{
|
|
2129
|
+
data: T;
|
|
2130
|
+
headers?: Record<string, any>;
|
|
2131
|
+
}>;
|
|
2132
|
+
static from<T>(responsePromise: Promise<APIResponse<T, unknown>>): APIPromise<T>;
|
|
2133
|
+
}
|
|
2134
|
+
|
|
2135
|
+
/**
|
|
2136
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2137
|
+
*/
|
|
2138
|
+
|
|
2139
|
+
declare namespace SystemUsage {
|
|
2140
|
+
interface Options {
|
|
2141
|
+
environment?: Supplier<OpikApiEnvironment | string>;
|
|
2142
|
+
/** Override the authorization header */
|
|
2143
|
+
authorization?: Supplier<string | undefined>;
|
|
2144
|
+
/** Override the comet-workspace header */
|
|
2145
|
+
workspaceName?: Supplier<string | undefined>;
|
|
2146
|
+
}
|
|
2147
|
+
interface RequestOptions {
|
|
2148
|
+
/** The maximum time to wait for a response in seconds. */
|
|
2149
|
+
timeoutInSeconds?: number;
|
|
2150
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
2151
|
+
maxRetries?: number;
|
|
2152
|
+
/** A hook to abort the request. */
|
|
2153
|
+
abortSignal?: AbortSignal;
|
|
2154
|
+
/** Override the authorization header */
|
|
2155
|
+
authorization?: string | undefined;
|
|
2156
|
+
/** Override the comet-workspace header */
|
|
2157
|
+
workspaceName?: string | undefined;
|
|
2158
|
+
/** Additional headers to include in the request. */
|
|
2159
|
+
headers?: Record<string, string>;
|
|
2160
|
+
}
|
|
2161
|
+
}
|
|
2162
|
+
/**
|
|
2163
|
+
* System usage related resource
|
|
2164
|
+
*/
|
|
2165
|
+
declare class SystemUsage {
|
|
2166
|
+
protected readonly _options: SystemUsage.Options;
|
|
2167
|
+
constructor(_options?: SystemUsage.Options);
|
|
2168
|
+
/**
|
|
2169
|
+
* Get datasets information for BI events per user per workspace
|
|
2170
|
+
*
|
|
2171
|
+
* @param {SystemUsage.RequestOptions} requestOptions - Request-specific configuration.
|
|
2172
|
+
*
|
|
2173
|
+
* @example
|
|
2174
|
+
* await client.systemUsage.getDatasetBiInfo()
|
|
2175
|
+
*/
|
|
2176
|
+
getDatasetBiInfo(requestOptions?: SystemUsage.RequestOptions): APIPromise<BiInformationResponse>;
|
|
2177
|
+
/**
|
|
2178
|
+
* Get experiments information for BI events per user per workspace
|
|
2179
|
+
*
|
|
2180
|
+
* @param {SystemUsage.RequestOptions} requestOptions - Request-specific configuration.
|
|
2181
|
+
*
|
|
2182
|
+
* @example
|
|
2183
|
+
* await client.systemUsage.getExperimentBiInfo()
|
|
2184
|
+
*/
|
|
2185
|
+
getExperimentBiInfo(requestOptions?: SystemUsage.RequestOptions): APIPromise<BiInformationResponse>;
|
|
2186
|
+
/**
|
|
2187
|
+
* Get traces information for BI events per user per workspace
|
|
2188
|
+
*
|
|
2189
|
+
* @param {SystemUsage.RequestOptions} requestOptions - Request-specific configuration.
|
|
2190
|
+
*
|
|
2191
|
+
* @example
|
|
2192
|
+
* await client.systemUsage.getTracesBiInfo()
|
|
2193
|
+
*/
|
|
2194
|
+
getTracesBiInfo(requestOptions?: SystemUsage.RequestOptions): APIPromise<BiInformationResponse>;
|
|
2195
|
+
/**
|
|
2196
|
+
* Get traces count on previous day for all available workspaces
|
|
2197
|
+
*
|
|
2198
|
+
* @param {SystemUsage.RequestOptions} requestOptions - Request-specific configuration.
|
|
2199
|
+
*
|
|
2200
|
+
* @example
|
|
2201
|
+
* await client.systemUsage.getTracesCountForWorkspaces()
|
|
2202
|
+
*/
|
|
2203
|
+
getTracesCountForWorkspaces(requestOptions?: SystemUsage.RequestOptions): APIPromise<TraceCountResponse>;
|
|
2204
|
+
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
2205
|
+
authorization: string | undefined;
|
|
2206
|
+
}>;
|
|
2207
|
+
}
|
|
2208
|
+
|
|
2209
|
+
/**
|
|
2210
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2211
|
+
*/
|
|
2212
|
+
|
|
2213
|
+
declare namespace Check {
|
|
2214
|
+
interface Options {
|
|
2215
|
+
environment?: Supplier<OpikApiEnvironment | string>;
|
|
2216
|
+
/** Override the authorization header */
|
|
2217
|
+
authorization?: Supplier<string | undefined>;
|
|
2218
|
+
/** Override the comet-workspace header */
|
|
2219
|
+
workspaceName?: Supplier<string | undefined>;
|
|
2220
|
+
}
|
|
2221
|
+
interface RequestOptions {
|
|
2222
|
+
/** The maximum time to wait for a response in seconds. */
|
|
2223
|
+
timeoutInSeconds?: number;
|
|
2224
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
2225
|
+
maxRetries?: number;
|
|
2226
|
+
/** A hook to abort the request. */
|
|
2227
|
+
abortSignal?: AbortSignal;
|
|
2228
|
+
/** Override the authorization header */
|
|
2229
|
+
authorization?: string | undefined;
|
|
2230
|
+
/** Override the comet-workspace header */
|
|
2231
|
+
workspaceName?: string | undefined;
|
|
2232
|
+
/** Additional headers to include in the request. */
|
|
2233
|
+
headers?: Record<string, string>;
|
|
2234
|
+
}
|
|
2235
|
+
}
|
|
2236
|
+
/**
|
|
2237
|
+
* Access check resources
|
|
2238
|
+
*/
|
|
2239
|
+
declare class Check {
|
|
2240
|
+
protected readonly _options: Check.Options;
|
|
2241
|
+
constructor(_options?: Check.Options);
|
|
2242
|
+
/**
|
|
2243
|
+
* Check user access to workspace
|
|
2244
|
+
*
|
|
2245
|
+
* @param {OpikApi.AuthDetailsHolder} request
|
|
2246
|
+
* @param {Check.RequestOptions} requestOptions - Request-specific configuration.
|
|
2247
|
+
*
|
|
2248
|
+
* @throws {@link OpikApi.UnauthorizedError}
|
|
2249
|
+
* @throws {@link OpikApi.ForbiddenError}
|
|
2250
|
+
*
|
|
2251
|
+
* @example
|
|
2252
|
+
* await client.check.access({
|
|
2253
|
+
* "key": "value"
|
|
2254
|
+
* })
|
|
2255
|
+
*/
|
|
2256
|
+
access(request: AuthDetailsHolder, requestOptions?: Check.RequestOptions): APIPromise<void>;
|
|
2257
|
+
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
2258
|
+
authorization: string | undefined;
|
|
2259
|
+
}>;
|
|
2260
|
+
}
|
|
2261
|
+
|
|
2262
|
+
/**
|
|
2263
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2264
|
+
*/
|
|
2265
|
+
|
|
2266
|
+
declare namespace ChatCompletions {
|
|
2267
|
+
interface Options {
|
|
2268
|
+
environment?: Supplier<OpikApiEnvironment | string>;
|
|
2269
|
+
/** Override the authorization header */
|
|
2270
|
+
authorization?: Supplier<string | undefined>;
|
|
2271
|
+
/** Override the comet-workspace header */
|
|
2272
|
+
workspaceName?: Supplier<string | undefined>;
|
|
2273
|
+
}
|
|
2274
|
+
interface RequestOptions {
|
|
2275
|
+
/** The maximum time to wait for a response in seconds. */
|
|
2276
|
+
timeoutInSeconds?: number;
|
|
2277
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
2278
|
+
maxRetries?: number;
|
|
2279
|
+
/** A hook to abort the request. */
|
|
2280
|
+
abortSignal?: AbortSignal;
|
|
2281
|
+
/** Override the authorization header */
|
|
2282
|
+
authorization?: string | undefined;
|
|
2283
|
+
/** Override the comet-workspace header */
|
|
2284
|
+
workspaceName?: string | undefined;
|
|
2285
|
+
/** Additional headers to include in the request. */
|
|
2286
|
+
headers?: Record<string, string>;
|
|
2287
|
+
}
|
|
2288
|
+
}
|
|
2289
|
+
/**
|
|
2290
|
+
* Chat Completions related resources
|
|
2291
|
+
*/
|
|
2292
|
+
declare class ChatCompletions {
|
|
2293
|
+
protected readonly _options: ChatCompletions.Options;
|
|
2294
|
+
constructor(_options?: ChatCompletions.Options);
|
|
2295
|
+
/**
|
|
2296
|
+
* Create chat completions
|
|
2297
|
+
*
|
|
2298
|
+
* @param {OpikApi.ChatCompletionRequest} request
|
|
2299
|
+
* @param {ChatCompletions.RequestOptions} requestOptions - Request-specific configuration.
|
|
2300
|
+
*
|
|
2301
|
+
* @example
|
|
2302
|
+
* await client.chatCompletions.createChatCompletions()
|
|
2303
|
+
*/
|
|
2304
|
+
createChatCompletions(request?: ChatCompletionRequest, requestOptions?: ChatCompletions.RequestOptions): APIPromise<ChatCompletionResponse>;
|
|
2305
|
+
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
2306
|
+
authorization: string | undefined;
|
|
2307
|
+
}>;
|
|
2308
|
+
}
|
|
2309
|
+
|
|
2310
|
+
/**
|
|
2311
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2312
|
+
*/
|
|
2313
|
+
|
|
2314
|
+
declare namespace Datasets {
|
|
2315
|
+
interface Options {
|
|
2316
|
+
environment?: Supplier<OpikApiEnvironment | string>;
|
|
2317
|
+
/** Override the authorization header */
|
|
2318
|
+
authorization?: Supplier<string | undefined>;
|
|
2319
|
+
/** Override the comet-workspace header */
|
|
2320
|
+
workspaceName?: Supplier<string | undefined>;
|
|
2321
|
+
}
|
|
2322
|
+
interface RequestOptions {
|
|
2323
|
+
/** The maximum time to wait for a response in seconds. */
|
|
2324
|
+
timeoutInSeconds?: number;
|
|
2325
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
2326
|
+
maxRetries?: number;
|
|
2327
|
+
/** A hook to abort the request. */
|
|
2328
|
+
abortSignal?: AbortSignal;
|
|
2329
|
+
/** Override the authorization header */
|
|
2330
|
+
authorization?: string | undefined;
|
|
2331
|
+
/** Override the comet-workspace header */
|
|
2332
|
+
workspaceName?: string | undefined;
|
|
2333
|
+
/** Additional headers to include in the request. */
|
|
2334
|
+
headers?: Record<string, string>;
|
|
2335
|
+
}
|
|
2336
|
+
}
|
|
2337
|
+
/**
|
|
2338
|
+
* Dataset resources
|
|
2339
|
+
*/
|
|
2340
|
+
declare class Datasets {
|
|
2341
|
+
protected readonly _options: Datasets.Options;
|
|
2342
|
+
constructor(_options?: Datasets.Options);
|
|
2343
|
+
/**
|
|
2344
|
+
* Find datasets
|
|
2345
|
+
*
|
|
2346
|
+
* @param {OpikApi.FindDatasetsRequest} request
|
|
2347
|
+
* @param {Datasets.RequestOptions} requestOptions - Request-specific configuration.
|
|
2348
|
+
*
|
|
2349
|
+
* @example
|
|
2350
|
+
* await client.datasets.findDatasets()
|
|
2351
|
+
*/
|
|
2352
|
+
findDatasets(request?: FindDatasetsRequest, requestOptions?: Datasets.RequestOptions): APIPromise<DatasetPagePublic>;
|
|
2353
|
+
/**
|
|
2354
|
+
* Create dataset
|
|
2355
|
+
*
|
|
2356
|
+
* @param {OpikApi.DatasetWrite} request
|
|
2357
|
+
* @param {Datasets.RequestOptions} requestOptions - Request-specific configuration.
|
|
2358
|
+
*
|
|
2359
|
+
* @example
|
|
2360
|
+
* await client.datasets.createDataset({
|
|
2361
|
+
* name: "name"
|
|
2362
|
+
* })
|
|
2363
|
+
*/
|
|
2364
|
+
createDataset(request: DatasetWrite, requestOptions?: Datasets.RequestOptions): APIPromise<void>;
|
|
2365
|
+
/**
|
|
2366
|
+
* Create/update dataset items based on dataset item id
|
|
2367
|
+
*
|
|
2368
|
+
* @param {OpikApi.DatasetItemBatchWrite} request
|
|
2369
|
+
* @param {Datasets.RequestOptions} requestOptions - Request-specific configuration.
|
|
2370
|
+
*
|
|
2371
|
+
* @example
|
|
2372
|
+
* await client.datasets.createOrUpdateDatasetItems({
|
|
2373
|
+
* items: [{
|
|
2374
|
+
* source: "manual"
|
|
2375
|
+
* }]
|
|
2376
|
+
* })
|
|
2377
|
+
*/
|
|
2378
|
+
createOrUpdateDatasetItems(request: DatasetItemBatchWrite, requestOptions?: Datasets.RequestOptions): APIPromise<void>;
|
|
2379
|
+
/**
|
|
2380
|
+
* Get dataset by id
|
|
2381
|
+
*
|
|
2382
|
+
* @param {string} id
|
|
2383
|
+
* @param {Datasets.RequestOptions} requestOptions - Request-specific configuration.
|
|
2384
|
+
*
|
|
2385
|
+
* @example
|
|
2386
|
+
* await client.datasets.getDatasetById("id")
|
|
2387
|
+
*/
|
|
2388
|
+
getDatasetById(id: string, requestOptions?: Datasets.RequestOptions): APIPromise<DatasetPublic>;
|
|
2389
|
+
/**
|
|
2390
|
+
* Update dataset by id
|
|
2391
|
+
*
|
|
2392
|
+
* @param {string} id
|
|
2393
|
+
* @param {OpikApi.DatasetUpdate} request
|
|
2394
|
+
* @param {Datasets.RequestOptions} requestOptions - Request-specific configuration.
|
|
2395
|
+
*
|
|
2396
|
+
* @example
|
|
2397
|
+
* await client.datasets.updateDataset("id", {
|
|
2398
|
+
* name: "name"
|
|
2399
|
+
* })
|
|
2400
|
+
*/
|
|
2401
|
+
updateDataset(id: string, request: DatasetUpdate, requestOptions?: Datasets.RequestOptions): APIPromise<void>;
|
|
2402
|
+
/**
|
|
2403
|
+
* Delete dataset by id
|
|
2404
|
+
*
|
|
2405
|
+
* @param {string} id
|
|
2406
|
+
* @param {Datasets.RequestOptions} requestOptions - Request-specific configuration.
|
|
2407
|
+
*
|
|
2408
|
+
* @example
|
|
2409
|
+
* await client.datasets.deleteDataset("id")
|
|
2410
|
+
*/
|
|
2411
|
+
deleteDataset(id: string, requestOptions?: Datasets.RequestOptions): APIPromise<void>;
|
|
2412
|
+
/**
|
|
2413
|
+
* Delete dataset by name
|
|
2414
|
+
*
|
|
2415
|
+
* @param {OpikApi.DatasetIdentifier} request
|
|
2416
|
+
* @param {Datasets.RequestOptions} requestOptions - Request-specific configuration.
|
|
2417
|
+
*
|
|
2418
|
+
* @example
|
|
2419
|
+
* await client.datasets.deleteDatasetByName({
|
|
2420
|
+
* datasetName: "dataset_name"
|
|
2421
|
+
* })
|
|
2422
|
+
*/
|
|
2423
|
+
deleteDatasetByName(request: DatasetIdentifier, requestOptions?: Datasets.RequestOptions): APIPromise<void>;
|
|
2424
|
+
/**
|
|
2425
|
+
* Delete dataset items
|
|
2426
|
+
*
|
|
2427
|
+
* @param {OpikApi.DatasetItemsDelete} request
|
|
2428
|
+
* @param {Datasets.RequestOptions} requestOptions - Request-specific configuration.
|
|
2429
|
+
*
|
|
2430
|
+
* @example
|
|
2431
|
+
* await client.datasets.deleteDatasetItems({
|
|
2432
|
+
* itemIds: ["item_ids"]
|
|
2433
|
+
* })
|
|
2434
|
+
*/
|
|
2435
|
+
deleteDatasetItems(request: DatasetItemsDelete, requestOptions?: Datasets.RequestOptions): APIPromise<void>;
|
|
2436
|
+
/**
|
|
2437
|
+
* Delete datasets batch
|
|
2438
|
+
*
|
|
2439
|
+
* @param {OpikApi.BatchDelete} request
|
|
2440
|
+
* @param {Datasets.RequestOptions} requestOptions - Request-specific configuration.
|
|
2441
|
+
*
|
|
2442
|
+
* @example
|
|
2443
|
+
* await client.datasets.deleteDatasetsBatch({
|
|
2444
|
+
* ids: ["ids"]
|
|
2445
|
+
* })
|
|
2446
|
+
*/
|
|
2447
|
+
deleteDatasetsBatch(request: BatchDelete, requestOptions?: Datasets.RequestOptions): APIPromise<void>;
|
|
2448
|
+
/**
|
|
2449
|
+
* Find dataset items with experiment items
|
|
2450
|
+
*
|
|
2451
|
+
* @param {string} id
|
|
2452
|
+
* @param {OpikApi.FindDatasetItemsWithExperimentItemsRequest} request
|
|
2453
|
+
* @param {Datasets.RequestOptions} requestOptions - Request-specific configuration.
|
|
2454
|
+
*
|
|
2455
|
+
* @example
|
|
2456
|
+
* await client.datasets.findDatasetItemsWithExperimentItems("id", {
|
|
2457
|
+
* experimentIds: "experiment_ids"
|
|
2458
|
+
* })
|
|
2459
|
+
*/
|
|
2460
|
+
findDatasetItemsWithExperimentItems(id: string, request: FindDatasetItemsWithExperimentItemsRequest, requestOptions?: Datasets.RequestOptions): APIPromise<DatasetItemPageCompare>;
|
|
2461
|
+
/**
|
|
2462
|
+
* Get dataset by name
|
|
2463
|
+
*
|
|
2464
|
+
* @param {OpikApi.DatasetIdentifierPublic} request
|
|
2465
|
+
* @param {Datasets.RequestOptions} requestOptions - Request-specific configuration.
|
|
2466
|
+
*
|
|
2467
|
+
* @example
|
|
2468
|
+
* await client.datasets.getDatasetByIdentifier({
|
|
2469
|
+
* datasetName: "dataset_name"
|
|
2470
|
+
* })
|
|
2471
|
+
*/
|
|
2472
|
+
getDatasetByIdentifier(request: DatasetIdentifierPublic, requestOptions?: Datasets.RequestOptions): APIPromise<DatasetPublic>;
|
|
2473
|
+
/**
|
|
2474
|
+
* Get dataset item by id
|
|
2475
|
+
*
|
|
2476
|
+
* @param {string} itemId
|
|
2477
|
+
* @param {Datasets.RequestOptions} requestOptions - Request-specific configuration.
|
|
2478
|
+
*
|
|
2479
|
+
* @example
|
|
2480
|
+
* await client.datasets.getDatasetItemById("itemId")
|
|
2481
|
+
*/
|
|
2482
|
+
getDatasetItemById(itemId: string, requestOptions?: Datasets.RequestOptions): APIPromise<DatasetItemPublic>;
|
|
2483
|
+
/**
|
|
2484
|
+
* Get dataset items
|
|
2485
|
+
*
|
|
2486
|
+
* @param {string} id
|
|
2487
|
+
* @param {OpikApi.GetDatasetItemsRequest} request
|
|
2488
|
+
* @param {Datasets.RequestOptions} requestOptions - Request-specific configuration.
|
|
2489
|
+
*
|
|
2490
|
+
* @example
|
|
2491
|
+
* await client.datasets.getDatasetItems("id")
|
|
2492
|
+
*/
|
|
2493
|
+
getDatasetItems(id: string, request?: GetDatasetItemsRequest, requestOptions?: Datasets.RequestOptions): APIPromise<DatasetItemPagePublic>;
|
|
2494
|
+
/**
|
|
2495
|
+
* Get dataset items output columns
|
|
2496
|
+
*
|
|
2497
|
+
* @param {string} id
|
|
2498
|
+
* @param {OpikApi.GetDatasetItemsOutputColumnsRequest} request
|
|
2499
|
+
* @param {Datasets.RequestOptions} requestOptions - Request-specific configuration.
|
|
2500
|
+
*
|
|
2501
|
+
* @example
|
|
2502
|
+
* await client.datasets.getDatasetItemsOutputColumns("id")
|
|
2503
|
+
*/
|
|
2504
|
+
getDatasetItemsOutputColumns(id: string, request?: GetDatasetItemsOutputColumnsRequest, requestOptions?: Datasets.RequestOptions): APIPromise<PageColumns>;
|
|
2505
|
+
/**
|
|
2506
|
+
* Stream dataset items
|
|
2507
|
+
*/
|
|
2508
|
+
streamDatasetItems(request: DatasetItemStreamRequest, requestOptions?: Datasets.RequestOptions): APIPromise<stream.Readable>;
|
|
2509
|
+
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
2510
|
+
authorization: string | undefined;
|
|
2511
|
+
}>;
|
|
2512
|
+
}
|
|
2513
|
+
|
|
2514
|
+
/**
|
|
2515
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2516
|
+
*/
|
|
2517
|
+
|
|
2518
|
+
declare namespace Experiments {
|
|
2519
|
+
interface Options {
|
|
2520
|
+
environment?: Supplier<OpikApiEnvironment | string>;
|
|
2521
|
+
/** Override the authorization header */
|
|
2522
|
+
authorization?: Supplier<string | undefined>;
|
|
2523
|
+
/** Override the comet-workspace header */
|
|
2524
|
+
workspaceName?: Supplier<string | undefined>;
|
|
2525
|
+
}
|
|
2526
|
+
interface RequestOptions {
|
|
2527
|
+
/** The maximum time to wait for a response in seconds. */
|
|
2528
|
+
timeoutInSeconds?: number;
|
|
2529
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
2530
|
+
maxRetries?: number;
|
|
2531
|
+
/** A hook to abort the request. */
|
|
2532
|
+
abortSignal?: AbortSignal;
|
|
2533
|
+
/** Override the authorization header */
|
|
2534
|
+
authorization?: string | undefined;
|
|
2535
|
+
/** Override the comet-workspace header */
|
|
2536
|
+
workspaceName?: string | undefined;
|
|
2537
|
+
/** Additional headers to include in the request. */
|
|
2538
|
+
headers?: Record<string, string>;
|
|
2539
|
+
}
|
|
2540
|
+
}
|
|
2541
|
+
/**
|
|
2542
|
+
* Experiment resources
|
|
2543
|
+
*/
|
|
2544
|
+
declare class Experiments {
|
|
2545
|
+
protected readonly _options: Experiments.Options;
|
|
2546
|
+
constructor(_options?: Experiments.Options);
|
|
2547
|
+
/**
|
|
2548
|
+
* Find experiments
|
|
2549
|
+
*
|
|
2550
|
+
* @param {OpikApi.FindExperimentsRequest} request
|
|
2551
|
+
* @param {Experiments.RequestOptions} requestOptions - Request-specific configuration.
|
|
2552
|
+
*
|
|
2553
|
+
* @example
|
|
2554
|
+
* await client.experiments.findExperiments()
|
|
2555
|
+
*/
|
|
2556
|
+
findExperiments(request?: FindExperimentsRequest, requestOptions?: Experiments.RequestOptions): APIPromise<ExperimentPagePublic>;
|
|
2557
|
+
/**
|
|
2558
|
+
* Create experiment
|
|
2559
|
+
*
|
|
2560
|
+
* @param {OpikApi.ExperimentWrite} request
|
|
2561
|
+
* @param {Experiments.RequestOptions} requestOptions - Request-specific configuration.
|
|
2562
|
+
*
|
|
2563
|
+
* @example
|
|
2564
|
+
* await client.experiments.createExperiment({
|
|
2565
|
+
* datasetName: "dataset_name"
|
|
2566
|
+
* })
|
|
2567
|
+
*/
|
|
2568
|
+
createExperiment(request: ExperimentWrite, requestOptions?: Experiments.RequestOptions): APIPromise<void>;
|
|
2569
|
+
/**
|
|
2570
|
+
* Create experiment items
|
|
2571
|
+
*
|
|
2572
|
+
* @param {OpikApi.ExperimentItemsBatch} request
|
|
2573
|
+
* @param {Experiments.RequestOptions} requestOptions - Request-specific configuration.
|
|
2574
|
+
*
|
|
2575
|
+
* @example
|
|
2576
|
+
* await client.experiments.createExperimentItems({
|
|
2577
|
+
* experimentItems: [{
|
|
2578
|
+
* experimentId: "experiment_id",
|
|
2579
|
+
* datasetItemId: "dataset_item_id",
|
|
2580
|
+
* traceId: "trace_id"
|
|
2581
|
+
* }]
|
|
2582
|
+
* })
|
|
2583
|
+
*/
|
|
2584
|
+
createExperimentItems(request: ExperimentItemsBatch, requestOptions?: Experiments.RequestOptions): APIPromise<void>;
|
|
2585
|
+
/**
|
|
2586
|
+
* Delete experiment items
|
|
2587
|
+
*
|
|
2588
|
+
* @param {OpikApi.ExperimentItemsDelete} request
|
|
2589
|
+
* @param {Experiments.RequestOptions} requestOptions - Request-specific configuration.
|
|
2590
|
+
*
|
|
2591
|
+
* @example
|
|
2592
|
+
* await client.experiments.deleteExperimentItems({
|
|
2593
|
+
* ids: ["ids"]
|
|
2594
|
+
* })
|
|
2595
|
+
*/
|
|
2596
|
+
deleteExperimentItems(request: ExperimentItemsDelete, requestOptions?: Experiments.RequestOptions): APIPromise<void>;
|
|
2597
|
+
/**
|
|
2598
|
+
* Delete experiments by id
|
|
2599
|
+
*
|
|
2600
|
+
* @param {OpikApi.ExperimentsDelete} request
|
|
2601
|
+
* @param {Experiments.RequestOptions} requestOptions - Request-specific configuration.
|
|
2602
|
+
*
|
|
2603
|
+
* @example
|
|
2604
|
+
* await client.experiments.deleteExperimentsById({
|
|
2605
|
+
* ids: ["ids"]
|
|
2606
|
+
* })
|
|
2607
|
+
*/
|
|
2608
|
+
deleteExperimentsById(request: ExperimentsDelete, requestOptions?: Experiments.RequestOptions): APIPromise<void>;
|
|
2609
|
+
/**
|
|
2610
|
+
* Find Feedback Score names
|
|
2611
|
+
*
|
|
2612
|
+
* @param {OpikApi.FindFeedbackScoreNamesRequest} request
|
|
2613
|
+
* @param {Experiments.RequestOptions} requestOptions - Request-specific configuration.
|
|
2614
|
+
*
|
|
2615
|
+
* @example
|
|
2616
|
+
* await client.experiments.findFeedbackScoreNames()
|
|
2617
|
+
*/
|
|
2618
|
+
findFeedbackScoreNames(request?: FindFeedbackScoreNamesRequest, requestOptions?: Experiments.RequestOptions): APIPromise<string[]>;
|
|
2619
|
+
/**
|
|
2620
|
+
* Get experiment by id
|
|
2621
|
+
*
|
|
2622
|
+
* @param {string} id
|
|
2623
|
+
* @param {Experiments.RequestOptions} requestOptions - Request-specific configuration.
|
|
2624
|
+
*
|
|
2625
|
+
* @throws {@link OpikApi.NotFoundError}
|
|
2626
|
+
*
|
|
2627
|
+
* @example
|
|
2628
|
+
* await client.experiments.getExperimentById("id")
|
|
2629
|
+
*/
|
|
2630
|
+
getExperimentById(id: string, requestOptions?: Experiments.RequestOptions): APIPromise<ExperimentPublic>;
|
|
2631
|
+
/**
|
|
2632
|
+
* Get experiment by name
|
|
2633
|
+
*
|
|
2634
|
+
* @param {OpikApi.IdentifierPublic} request
|
|
2635
|
+
* @param {Experiments.RequestOptions} requestOptions - Request-specific configuration.
|
|
2636
|
+
*
|
|
2637
|
+
* @throws {@link OpikApi.NotFoundError}
|
|
2638
|
+
*
|
|
2639
|
+
* @example
|
|
2640
|
+
* await client.experiments.getExperimentByName({
|
|
2641
|
+
* name: "name"
|
|
2642
|
+
* })
|
|
2643
|
+
*/
|
|
2644
|
+
getExperimentByName(request: IdentifierPublic, requestOptions?: Experiments.RequestOptions): APIPromise<ExperimentPublic>;
|
|
2645
|
+
/**
|
|
2646
|
+
* Get experiment item by id
|
|
2647
|
+
*
|
|
2648
|
+
* @param {string} id
|
|
2649
|
+
* @param {Experiments.RequestOptions} requestOptions - Request-specific configuration.
|
|
2650
|
+
*
|
|
2651
|
+
* @throws {@link OpikApi.NotFoundError}
|
|
2652
|
+
*
|
|
2653
|
+
* @example
|
|
2654
|
+
* await client.experiments.getExperimentItemById("id")
|
|
2655
|
+
*/
|
|
2656
|
+
getExperimentItemById(id: string, requestOptions?: Experiments.RequestOptions): APIPromise<ExperimentItemPublic>;
|
|
2657
|
+
/**
|
|
2658
|
+
* Stream experiment items
|
|
2659
|
+
*/
|
|
2660
|
+
streamExperimentItems(request: ExperimentItemStreamRequest, requestOptions?: Experiments.RequestOptions): APIPromise<stream.Readable>;
|
|
2661
|
+
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
2662
|
+
authorization: string | undefined;
|
|
2663
|
+
}>;
|
|
2664
|
+
}
|
|
2665
|
+
|
|
2666
|
+
/**
|
|
2667
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2668
|
+
*/
|
|
2669
|
+
|
|
2670
|
+
declare namespace FeedbackDefinitions {
|
|
2671
|
+
interface Options {
|
|
2672
|
+
environment?: Supplier<OpikApiEnvironment | string>;
|
|
2673
|
+
/** Override the authorization header */
|
|
2674
|
+
authorization?: Supplier<string | undefined>;
|
|
2675
|
+
/** Override the comet-workspace header */
|
|
2676
|
+
workspaceName?: Supplier<string | undefined>;
|
|
2677
|
+
}
|
|
2678
|
+
interface RequestOptions {
|
|
2679
|
+
/** The maximum time to wait for a response in seconds. */
|
|
2680
|
+
timeoutInSeconds?: number;
|
|
2681
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
2682
|
+
maxRetries?: number;
|
|
2683
|
+
/** A hook to abort the request. */
|
|
2684
|
+
abortSignal?: AbortSignal;
|
|
2685
|
+
/** Override the authorization header */
|
|
2686
|
+
authorization?: string | undefined;
|
|
2687
|
+
/** Override the comet-workspace header */
|
|
2688
|
+
workspaceName?: string | undefined;
|
|
2689
|
+
/** Additional headers to include in the request. */
|
|
2690
|
+
headers?: Record<string, string>;
|
|
2691
|
+
}
|
|
2692
|
+
}
|
|
2693
|
+
/**
|
|
2694
|
+
* Feedback definitions related resources
|
|
2695
|
+
*/
|
|
2696
|
+
declare class FeedbackDefinitions {
|
|
2697
|
+
protected readonly _options: FeedbackDefinitions.Options;
|
|
2698
|
+
constructor(_options?: FeedbackDefinitions.Options);
|
|
2699
|
+
/**
|
|
2700
|
+
* Find Feedback definitions
|
|
2701
|
+
*
|
|
2702
|
+
* @param {OpikApi.FindFeedbackDefinitionsRequest} request
|
|
2703
|
+
* @param {FeedbackDefinitions.RequestOptions} requestOptions - Request-specific configuration.
|
|
2704
|
+
*
|
|
2705
|
+
* @example
|
|
2706
|
+
* await client.feedbackDefinitions.findFeedbackDefinitions()
|
|
2707
|
+
*/
|
|
2708
|
+
findFeedbackDefinitions(request?: FindFeedbackDefinitionsRequest, requestOptions?: FeedbackDefinitions.RequestOptions): APIPromise<FeedbackDefinitionPagePublic>;
|
|
2709
|
+
/**
|
|
2710
|
+
* Get feedback definition
|
|
2711
|
+
*
|
|
2712
|
+
* @param {OpikApi.FeedbackCreate} request
|
|
2713
|
+
* @param {FeedbackDefinitions.RequestOptions} requestOptions - Request-specific configuration.
|
|
2714
|
+
*
|
|
2715
|
+
* @example
|
|
2716
|
+
* await client.feedbackDefinitions.createFeedbackDefinition({
|
|
2717
|
+
* type: "categorical"
|
|
2718
|
+
* })
|
|
2719
|
+
*/
|
|
2720
|
+
createFeedbackDefinition(request: FeedbackCreate, requestOptions?: FeedbackDefinitions.RequestOptions): APIPromise<void>;
|
|
2721
|
+
/**
|
|
2722
|
+
* Get feedback definition by id
|
|
2723
|
+
*
|
|
2724
|
+
* @param {string} id
|
|
2725
|
+
* @param {FeedbackDefinitions.RequestOptions} requestOptions - Request-specific configuration.
|
|
2726
|
+
*
|
|
2727
|
+
* @example
|
|
2728
|
+
* await client.feedbackDefinitions.getFeedbackDefinitionById("id")
|
|
2729
|
+
*/
|
|
2730
|
+
getFeedbackDefinitionById(id: string, requestOptions?: FeedbackDefinitions.RequestOptions): APIPromise<FeedbackPublic>;
|
|
2731
|
+
/**
|
|
2732
|
+
* Update feedback definition by id
|
|
2733
|
+
*
|
|
2734
|
+
* @param {string} id
|
|
2735
|
+
* @param {OpikApi.FeedbackUpdate} request
|
|
2736
|
+
* @param {FeedbackDefinitions.RequestOptions} requestOptions - Request-specific configuration.
|
|
2737
|
+
*
|
|
2738
|
+
* @example
|
|
2739
|
+
* await client.feedbackDefinitions.updateFeedbackDefinition("id", {
|
|
2740
|
+
* type: "categorical"
|
|
2741
|
+
* })
|
|
2742
|
+
*/
|
|
2743
|
+
updateFeedbackDefinition(id: string, request: FeedbackUpdate, requestOptions?: FeedbackDefinitions.RequestOptions): APIPromise<void>;
|
|
2744
|
+
/**
|
|
2745
|
+
* Delete feedback definition by id
|
|
2746
|
+
*
|
|
2747
|
+
* @param {string} id
|
|
2748
|
+
* @param {FeedbackDefinitions.RequestOptions} requestOptions - Request-specific configuration.
|
|
2749
|
+
*
|
|
2750
|
+
* @example
|
|
2751
|
+
* await client.feedbackDefinitions.deleteFeedbackDefinitionById("id")
|
|
2752
|
+
*/
|
|
2753
|
+
deleteFeedbackDefinitionById(id: string, requestOptions?: FeedbackDefinitions.RequestOptions): APIPromise<void>;
|
|
2754
|
+
/**
|
|
2755
|
+
* Delete feedback definitions batch
|
|
2756
|
+
*
|
|
2757
|
+
* @param {OpikApi.BatchDelete} request
|
|
2758
|
+
* @param {FeedbackDefinitions.RequestOptions} requestOptions - Request-specific configuration.
|
|
2759
|
+
*
|
|
2760
|
+
* @example
|
|
2761
|
+
* await client.feedbackDefinitions.deleteFeedbackDefinitionsBatch({
|
|
2762
|
+
* ids: ["ids"]
|
|
2763
|
+
* })
|
|
2764
|
+
*/
|
|
2765
|
+
deleteFeedbackDefinitionsBatch(request: BatchDelete, requestOptions?: FeedbackDefinitions.RequestOptions): APIPromise<void>;
|
|
2766
|
+
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
2767
|
+
authorization: string | undefined;
|
|
2768
|
+
}>;
|
|
2769
|
+
}
|
|
2770
|
+
|
|
2771
|
+
/**
|
|
2772
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2773
|
+
*/
|
|
2774
|
+
|
|
2775
|
+
declare namespace LlmProviderKey {
|
|
2776
|
+
interface Options {
|
|
2777
|
+
environment?: Supplier<OpikApiEnvironment | string>;
|
|
2778
|
+
/** Override the authorization header */
|
|
2779
|
+
authorization?: Supplier<string | undefined>;
|
|
2780
|
+
/** Override the comet-workspace header */
|
|
2781
|
+
workspaceName?: Supplier<string | undefined>;
|
|
2782
|
+
}
|
|
2783
|
+
interface RequestOptions {
|
|
2784
|
+
/** The maximum time to wait for a response in seconds. */
|
|
2785
|
+
timeoutInSeconds?: number;
|
|
2786
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
2787
|
+
maxRetries?: number;
|
|
2788
|
+
/** A hook to abort the request. */
|
|
2789
|
+
abortSignal?: AbortSignal;
|
|
2790
|
+
/** Override the authorization header */
|
|
2791
|
+
authorization?: string | undefined;
|
|
2792
|
+
/** Override the comet-workspace header */
|
|
2793
|
+
workspaceName?: string | undefined;
|
|
2794
|
+
/** Additional headers to include in the request. */
|
|
2795
|
+
headers?: Record<string, string>;
|
|
2796
|
+
}
|
|
2797
|
+
}
|
|
2798
|
+
/**
|
|
2799
|
+
* LLM Provider Key
|
|
2800
|
+
*/
|
|
2801
|
+
declare class LlmProviderKey {
|
|
2802
|
+
protected readonly _options: LlmProviderKey.Options;
|
|
2803
|
+
constructor(_options?: LlmProviderKey.Options);
|
|
2804
|
+
/**
|
|
2805
|
+
* Find LLM Provider's ApiKeys
|
|
2806
|
+
*
|
|
2807
|
+
* @param {LlmProviderKey.RequestOptions} requestOptions - Request-specific configuration.
|
|
2808
|
+
*
|
|
2809
|
+
* @example
|
|
2810
|
+
* await client.llmProviderKey.findLlmProviderKeys()
|
|
2811
|
+
*/
|
|
2812
|
+
findLlmProviderKeys(requestOptions?: LlmProviderKey.RequestOptions): APIPromise<ProjectPagePublic>;
|
|
2813
|
+
/**
|
|
2814
|
+
* Store LLM Provider's ApiKey
|
|
2815
|
+
*
|
|
2816
|
+
* @param {OpikApi.ProviderApiKeyWrite} request
|
|
2817
|
+
* @param {LlmProviderKey.RequestOptions} requestOptions - Request-specific configuration.
|
|
2818
|
+
*
|
|
2819
|
+
* @throws {@link OpikApi.UnauthorizedError}
|
|
2820
|
+
* @throws {@link OpikApi.ForbiddenError}
|
|
2821
|
+
*
|
|
2822
|
+
* @example
|
|
2823
|
+
* await client.llmProviderKey.storeLlmProviderApiKey({
|
|
2824
|
+
* apiKey: "api_key"
|
|
2825
|
+
* })
|
|
2826
|
+
*/
|
|
2827
|
+
storeLlmProviderApiKey(request: ProviderApiKeyWrite, requestOptions?: LlmProviderKey.RequestOptions): APIPromise<void>;
|
|
2828
|
+
/**
|
|
2829
|
+
* Get LLM Provider's ApiKey by id
|
|
2830
|
+
*
|
|
2831
|
+
* @param {string} id
|
|
2832
|
+
* @param {LlmProviderKey.RequestOptions} requestOptions - Request-specific configuration.
|
|
2833
|
+
*
|
|
2834
|
+
* @throws {@link OpikApi.NotFoundError}
|
|
2835
|
+
*
|
|
2836
|
+
* @example
|
|
2837
|
+
* await client.llmProviderKey.getLlmProviderApiKeyById("id")
|
|
2838
|
+
*/
|
|
2839
|
+
getLlmProviderApiKeyById(id: string, requestOptions?: LlmProviderKey.RequestOptions): APIPromise<ProviderApiKeyPublic>;
|
|
2840
|
+
/**
|
|
2841
|
+
* Update LLM Provider's ApiKey
|
|
2842
|
+
*
|
|
2843
|
+
* @param {string} id
|
|
2844
|
+
* @param {OpikApi.ProviderApiKeyUpdate} request
|
|
2845
|
+
* @param {LlmProviderKey.RequestOptions} requestOptions - Request-specific configuration.
|
|
2846
|
+
*
|
|
2847
|
+
* @throws {@link OpikApi.UnauthorizedError}
|
|
2848
|
+
* @throws {@link OpikApi.ForbiddenError}
|
|
2849
|
+
* @throws {@link OpikApi.NotFoundError}
|
|
2850
|
+
*
|
|
2851
|
+
* @example
|
|
2852
|
+
* await client.llmProviderKey.updateLlmProviderApiKey("id", {
|
|
2853
|
+
* apiKey: "api_key"
|
|
2854
|
+
* })
|
|
2855
|
+
*/
|
|
2856
|
+
updateLlmProviderApiKey(id: string, request: ProviderApiKeyUpdate, requestOptions?: LlmProviderKey.RequestOptions): APIPromise<void>;
|
|
2857
|
+
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
2858
|
+
authorization: string | undefined;
|
|
2859
|
+
}>;
|
|
2860
|
+
}
|
|
2861
|
+
|
|
2862
|
+
/**
|
|
2863
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
2864
|
+
*/
|
|
2865
|
+
|
|
2866
|
+
declare namespace Projects {
|
|
2867
|
+
interface Options {
|
|
2868
|
+
environment?: Supplier<OpikApiEnvironment | string>;
|
|
2869
|
+
/** Override the authorization header */
|
|
2870
|
+
authorization?: Supplier<string | undefined>;
|
|
2871
|
+
/** Override the comet-workspace header */
|
|
2872
|
+
workspaceName?: Supplier<string | undefined>;
|
|
2873
|
+
}
|
|
2874
|
+
interface RequestOptions {
|
|
2875
|
+
/** The maximum time to wait for a response in seconds. */
|
|
2876
|
+
timeoutInSeconds?: number;
|
|
2877
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
2878
|
+
maxRetries?: number;
|
|
2879
|
+
/** A hook to abort the request. */
|
|
2880
|
+
abortSignal?: AbortSignal;
|
|
2881
|
+
/** Override the authorization header */
|
|
2882
|
+
authorization?: string | undefined;
|
|
2883
|
+
/** Override the comet-workspace header */
|
|
2884
|
+
workspaceName?: string | undefined;
|
|
2885
|
+
/** Additional headers to include in the request. */
|
|
2886
|
+
headers?: Record<string, string>;
|
|
2887
|
+
}
|
|
2888
|
+
}
|
|
2889
|
+
/**
|
|
2890
|
+
* Project related resources
|
|
2891
|
+
*/
|
|
2892
|
+
declare class Projects {
|
|
2893
|
+
protected readonly _options: Projects.Options;
|
|
2894
|
+
constructor(_options?: Projects.Options);
|
|
2895
|
+
/**
|
|
2896
|
+
* Find projects
|
|
2897
|
+
*
|
|
2898
|
+
* @param {OpikApi.FindProjectsRequest} request
|
|
2899
|
+
* @param {Projects.RequestOptions} requestOptions - Request-specific configuration.
|
|
2900
|
+
*
|
|
2901
|
+
* @example
|
|
2902
|
+
* await client.projects.findProjects()
|
|
2903
|
+
*/
|
|
2904
|
+
findProjects(request?: FindProjectsRequest, requestOptions?: Projects.RequestOptions): APIPromise<ProjectPagePublic>;
|
|
2905
|
+
/**
|
|
2906
|
+
* Create project
|
|
2907
|
+
*
|
|
2908
|
+
* @param {OpikApi.ProjectWrite} request
|
|
2909
|
+
* @param {Projects.RequestOptions} requestOptions - Request-specific configuration.
|
|
2910
|
+
*
|
|
2911
|
+
* @throws {@link OpikApi.BadRequestError}
|
|
2912
|
+
* @throws {@link OpikApi.UnprocessableEntityError}
|
|
2913
|
+
*
|
|
2914
|
+
* @example
|
|
2915
|
+
* await client.projects.createProject({
|
|
2916
|
+
* name: "name"
|
|
2917
|
+
* })
|
|
2918
|
+
*/
|
|
2919
|
+
createProject(request: ProjectWrite, requestOptions?: Projects.RequestOptions): APIPromise<void>;
|
|
2920
|
+
/**
|
|
2921
|
+
* Get project by id
|
|
2922
|
+
*
|
|
2923
|
+
* @param {string} id
|
|
2924
|
+
* @param {Projects.RequestOptions} requestOptions - Request-specific configuration.
|
|
2925
|
+
*
|
|
2926
|
+
* @example
|
|
2927
|
+
* await client.projects.getProjectById("id")
|
|
2928
|
+
*/
|
|
2929
|
+
getProjectById(id: string, requestOptions?: Projects.RequestOptions): APIPromise<ProjectPublic>;
|
|
2930
|
+
/**
|
|
2931
|
+
* Delete project by id
|
|
2932
|
+
*
|
|
2933
|
+
* @param {string} id
|
|
2934
|
+
* @param {Projects.RequestOptions} requestOptions - Request-specific configuration.
|
|
2935
|
+
*
|
|
2936
|
+
* @throws {@link OpikApi.ConflictError}
|
|
2937
|
+
*
|
|
2938
|
+
* @example
|
|
2939
|
+
* await client.projects.deleteProjectById("id")
|
|
2940
|
+
*/
|
|
2941
|
+
deleteProjectById(id: string, requestOptions?: Projects.RequestOptions): APIPromise<void>;
|
|
2942
|
+
/**
|
|
2943
|
+
* Update project by id
|
|
2944
|
+
*
|
|
2945
|
+
* @param {string} id
|
|
2946
|
+
* @param {OpikApi.ProjectUpdate} request
|
|
2947
|
+
* @param {Projects.RequestOptions} requestOptions - Request-specific configuration.
|
|
2948
|
+
*
|
|
2949
|
+
* @throws {@link OpikApi.BadRequestError}
|
|
2950
|
+
* @throws {@link OpikApi.UnprocessableEntityError}
|
|
2951
|
+
*
|
|
2952
|
+
* @example
|
|
2953
|
+
* await client.projects.updateProject("id")
|
|
2954
|
+
*/
|
|
2955
|
+
updateProject(id: string, request?: ProjectUpdate, requestOptions?: Projects.RequestOptions): APIPromise<void>;
|
|
2956
|
+
/**
|
|
2957
|
+
* Delete projects batch
|
|
2958
|
+
*
|
|
2959
|
+
* @param {OpikApi.BatchDelete} request
|
|
2960
|
+
* @param {Projects.RequestOptions} requestOptions - Request-specific configuration.
|
|
2961
|
+
*
|
|
2962
|
+
* @example
|
|
2963
|
+
* await client.projects.deleteProjectsBatch({
|
|
2964
|
+
* ids: ["ids"]
|
|
2965
|
+
* })
|
|
2966
|
+
*/
|
|
2967
|
+
deleteProjectsBatch(request: BatchDelete, requestOptions?: Projects.RequestOptions): APIPromise<void>;
|
|
2968
|
+
/**
|
|
2969
|
+
* Gets specified metrics for a project
|
|
2970
|
+
*
|
|
2971
|
+
* @param {string} id
|
|
2972
|
+
* @param {OpikApi.ProjectMetricRequestPublic} request
|
|
2973
|
+
* @param {Projects.RequestOptions} requestOptions - Request-specific configuration.
|
|
2974
|
+
*
|
|
2975
|
+
* @throws {@link OpikApi.BadRequestError}
|
|
2976
|
+
* @throws {@link OpikApi.NotFoundError}
|
|
2977
|
+
*
|
|
2978
|
+
* @example
|
|
2979
|
+
* await client.projects.getProjectMetrics("id")
|
|
2980
|
+
*/
|
|
2981
|
+
getProjectMetrics(id: string, request?: ProjectMetricRequestPublic, requestOptions?: Projects.RequestOptions): APIPromise<ProjectMetricResponsePublic>;
|
|
2982
|
+
/**
|
|
2983
|
+
* Retrieve project
|
|
2984
|
+
*
|
|
2985
|
+
* @param {OpikApi.ProjectRetrievePublic} request
|
|
2986
|
+
* @param {Projects.RequestOptions} requestOptions - Request-specific configuration.
|
|
2987
|
+
*
|
|
2988
|
+
* @throws {@link OpikApi.BadRequestError}
|
|
2989
|
+
* @throws {@link OpikApi.NotFoundError}
|
|
2990
|
+
* @throws {@link OpikApi.UnprocessableEntityError}
|
|
2991
|
+
*
|
|
2992
|
+
* @example
|
|
2993
|
+
* await client.projects.retrieveProject({
|
|
2994
|
+
* name: "name"
|
|
2995
|
+
* })
|
|
2996
|
+
*/
|
|
2997
|
+
retrieveProject(request: ProjectRetrievePublic, requestOptions?: Projects.RequestOptions): APIPromise<ProjectPublic>;
|
|
2998
|
+
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
2999
|
+
authorization: string | undefined;
|
|
3000
|
+
}>;
|
|
3001
|
+
}
|
|
3002
|
+
|
|
3003
|
+
/**
|
|
3004
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3005
|
+
*/
|
|
3006
|
+
|
|
3007
|
+
declare namespace Prompts {
|
|
3008
|
+
interface Options {
|
|
3009
|
+
environment?: Supplier<OpikApiEnvironment | string>;
|
|
3010
|
+
/** Override the authorization header */
|
|
3011
|
+
authorization?: Supplier<string | undefined>;
|
|
3012
|
+
/** Override the comet-workspace header */
|
|
3013
|
+
workspaceName?: Supplier<string | undefined>;
|
|
3014
|
+
}
|
|
3015
|
+
interface RequestOptions {
|
|
3016
|
+
/** The maximum time to wait for a response in seconds. */
|
|
3017
|
+
timeoutInSeconds?: number;
|
|
3018
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
3019
|
+
maxRetries?: number;
|
|
3020
|
+
/** A hook to abort the request. */
|
|
3021
|
+
abortSignal?: AbortSignal;
|
|
3022
|
+
/** Override the authorization header */
|
|
3023
|
+
authorization?: string | undefined;
|
|
3024
|
+
/** Override the comet-workspace header */
|
|
3025
|
+
workspaceName?: string | undefined;
|
|
3026
|
+
/** Additional headers to include in the request. */
|
|
3027
|
+
headers?: Record<string, string>;
|
|
3028
|
+
}
|
|
3029
|
+
}
|
|
3030
|
+
/**
|
|
3031
|
+
* Prompt resources
|
|
3032
|
+
*/
|
|
3033
|
+
declare class Prompts {
|
|
3034
|
+
protected readonly _options: Prompts.Options;
|
|
3035
|
+
constructor(_options?: Prompts.Options);
|
|
3036
|
+
/**
|
|
3037
|
+
* Get prompts
|
|
3038
|
+
*
|
|
3039
|
+
* @param {OpikApi.GetPromptsRequest} request
|
|
3040
|
+
* @param {Prompts.RequestOptions} requestOptions - Request-specific configuration.
|
|
3041
|
+
*
|
|
3042
|
+
* @example
|
|
3043
|
+
* await client.prompts.getPrompts()
|
|
3044
|
+
*/
|
|
3045
|
+
getPrompts(request?: GetPromptsRequest, requestOptions?: Prompts.RequestOptions): APIPromise<PromptPagePublic>;
|
|
3046
|
+
/**
|
|
3047
|
+
* Create prompt
|
|
3048
|
+
*
|
|
3049
|
+
* @param {OpikApi.PromptWrite} request
|
|
3050
|
+
* @param {Prompts.RequestOptions} requestOptions - Request-specific configuration.
|
|
3051
|
+
*
|
|
3052
|
+
* @throws {@link OpikApi.BadRequestError}
|
|
3053
|
+
* @throws {@link OpikApi.ConflictError}
|
|
3054
|
+
* @throws {@link OpikApi.UnprocessableEntityError}
|
|
3055
|
+
*
|
|
3056
|
+
* @example
|
|
3057
|
+
* await client.prompts.createPrompt({
|
|
3058
|
+
* name: "name"
|
|
3059
|
+
* })
|
|
3060
|
+
*/
|
|
3061
|
+
createPrompt(request: PromptWrite, requestOptions?: Prompts.RequestOptions): APIPromise<void>;
|
|
3062
|
+
/**
|
|
3063
|
+
* Create prompt version
|
|
3064
|
+
*
|
|
3065
|
+
* @param {OpikApi.CreatePromptVersionDetail} request
|
|
3066
|
+
* @param {Prompts.RequestOptions} requestOptions - Request-specific configuration.
|
|
3067
|
+
*
|
|
3068
|
+
* @throws {@link OpikApi.BadRequestError}
|
|
3069
|
+
* @throws {@link OpikApi.ConflictError}
|
|
3070
|
+
* @throws {@link OpikApi.UnprocessableEntityError}
|
|
3071
|
+
*
|
|
3072
|
+
* @example
|
|
3073
|
+
* await client.prompts.createPromptVersion({
|
|
3074
|
+
* name: "name",
|
|
3075
|
+
* version: {
|
|
3076
|
+
* template: "template"
|
|
3077
|
+
* }
|
|
3078
|
+
* })
|
|
3079
|
+
*/
|
|
3080
|
+
createPromptVersion(request: CreatePromptVersionDetail, requestOptions?: Prompts.RequestOptions): APIPromise<PromptVersionDetail>;
|
|
3081
|
+
/**
|
|
3082
|
+
* Get prompt by id
|
|
3083
|
+
*
|
|
3084
|
+
* @param {string} id
|
|
3085
|
+
* @param {Prompts.RequestOptions} requestOptions - Request-specific configuration.
|
|
3086
|
+
*
|
|
3087
|
+
* @throws {@link OpikApi.NotFoundError}
|
|
3088
|
+
*
|
|
3089
|
+
* @example
|
|
3090
|
+
* await client.prompts.getPromptById("id")
|
|
3091
|
+
*/
|
|
3092
|
+
getPromptById(id: string, requestOptions?: Prompts.RequestOptions): APIPromise<PromptDetail>;
|
|
3093
|
+
/**
|
|
3094
|
+
* Update prompt
|
|
3095
|
+
*
|
|
3096
|
+
* @param {string} id
|
|
3097
|
+
* @param {OpikApi.PromptUpdatable} request
|
|
3098
|
+
* @param {Prompts.RequestOptions} requestOptions - Request-specific configuration.
|
|
3099
|
+
*
|
|
3100
|
+
* @throws {@link OpikApi.BadRequestError}
|
|
3101
|
+
* @throws {@link OpikApi.NotFoundError}
|
|
3102
|
+
* @throws {@link OpikApi.ConflictError}
|
|
3103
|
+
* @throws {@link OpikApi.UnprocessableEntityError}
|
|
3104
|
+
*
|
|
3105
|
+
* @example
|
|
3106
|
+
* await client.prompts.updatePrompt("id", {
|
|
3107
|
+
* name: "name"
|
|
3108
|
+
* })
|
|
3109
|
+
*/
|
|
3110
|
+
updatePrompt(id: string, request: PromptUpdatable, requestOptions?: Prompts.RequestOptions): APIPromise<void>;
|
|
3111
|
+
/**
|
|
3112
|
+
* Delete prompt
|
|
3113
|
+
*
|
|
3114
|
+
* @param {string} id
|
|
3115
|
+
* @param {Prompts.RequestOptions} requestOptions - Request-specific configuration.
|
|
3116
|
+
*
|
|
3117
|
+
* @example
|
|
3118
|
+
* await client.prompts.deletePrompt("id")
|
|
3119
|
+
*/
|
|
3120
|
+
deletePrompt(id: string, requestOptions?: Prompts.RequestOptions): APIPromise<void>;
|
|
3121
|
+
/**
|
|
3122
|
+
* Delete prompts batch
|
|
3123
|
+
*
|
|
3124
|
+
* @param {OpikApi.BatchDelete} request
|
|
3125
|
+
* @param {Prompts.RequestOptions} requestOptions - Request-specific configuration.
|
|
3126
|
+
*
|
|
3127
|
+
* @example
|
|
3128
|
+
* await client.prompts.deletePromptsBatch({
|
|
3129
|
+
* ids: ["ids"]
|
|
3130
|
+
* })
|
|
3131
|
+
*/
|
|
3132
|
+
deletePromptsBatch(request: BatchDelete, requestOptions?: Prompts.RequestOptions): APIPromise<void>;
|
|
3133
|
+
/**
|
|
3134
|
+
* Get prompt version by id
|
|
3135
|
+
*
|
|
3136
|
+
* @param {string} versionId
|
|
3137
|
+
* @param {Prompts.RequestOptions} requestOptions - Request-specific configuration.
|
|
3138
|
+
*
|
|
3139
|
+
* @throws {@link OpikApi.NotFoundError}
|
|
3140
|
+
*
|
|
3141
|
+
* @example
|
|
3142
|
+
* await client.prompts.getPromptVersionById("versionId")
|
|
3143
|
+
*/
|
|
3144
|
+
getPromptVersionById(versionId: string, requestOptions?: Prompts.RequestOptions): APIPromise<PromptVersionDetail>;
|
|
3145
|
+
/**
|
|
3146
|
+
* Get prompt versions
|
|
3147
|
+
*
|
|
3148
|
+
* @param {string} id
|
|
3149
|
+
* @param {OpikApi.GetPromptVersionsRequest} request
|
|
3150
|
+
* @param {Prompts.RequestOptions} requestOptions - Request-specific configuration.
|
|
3151
|
+
*
|
|
3152
|
+
* @example
|
|
3153
|
+
* await client.prompts.getPromptVersions("id")
|
|
3154
|
+
*/
|
|
3155
|
+
getPromptVersions(id: string, request?: GetPromptVersionsRequest, requestOptions?: Prompts.RequestOptions): APIPromise<PromptVersionPagePublic>;
|
|
3156
|
+
/**
|
|
3157
|
+
* Retrieve prompt version
|
|
3158
|
+
*
|
|
3159
|
+
* @param {OpikApi.PromptVersionRetrieveDetail} request
|
|
3160
|
+
* @param {Prompts.RequestOptions} requestOptions - Request-specific configuration.
|
|
3161
|
+
*
|
|
3162
|
+
* @throws {@link OpikApi.BadRequestError}
|
|
3163
|
+
* @throws {@link OpikApi.NotFoundError}
|
|
3164
|
+
* @throws {@link OpikApi.UnprocessableEntityError}
|
|
3165
|
+
*
|
|
3166
|
+
* @example
|
|
3167
|
+
* await client.prompts.retrievePromptVersion({
|
|
3168
|
+
* name: "name"
|
|
3169
|
+
* })
|
|
3170
|
+
*/
|
|
3171
|
+
retrievePromptVersion(request: PromptVersionRetrieveDetail, requestOptions?: Prompts.RequestOptions): APIPromise<PromptVersionDetail>;
|
|
3172
|
+
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
3173
|
+
authorization: string | undefined;
|
|
3174
|
+
}>;
|
|
3175
|
+
}
|
|
3176
|
+
|
|
3177
|
+
/**
|
|
3178
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3179
|
+
*/
|
|
3180
|
+
|
|
3181
|
+
declare namespace Spans {
|
|
3182
|
+
interface Options {
|
|
3183
|
+
environment?: Supplier<OpikApiEnvironment | string>;
|
|
3184
|
+
/** Override the authorization header */
|
|
3185
|
+
authorization?: Supplier<string | undefined>;
|
|
3186
|
+
/** Override the comet-workspace header */
|
|
3187
|
+
workspaceName?: Supplier<string | undefined>;
|
|
3188
|
+
}
|
|
3189
|
+
interface RequestOptions {
|
|
3190
|
+
/** The maximum time to wait for a response in seconds. */
|
|
3191
|
+
timeoutInSeconds?: number;
|
|
3192
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
3193
|
+
maxRetries?: number;
|
|
3194
|
+
/** A hook to abort the request. */
|
|
3195
|
+
abortSignal?: AbortSignal;
|
|
3196
|
+
/** Override the authorization header */
|
|
3197
|
+
authorization?: string | undefined;
|
|
3198
|
+
/** Override the comet-workspace header */
|
|
3199
|
+
workspaceName?: string | undefined;
|
|
3200
|
+
/** Additional headers to include in the request. */
|
|
3201
|
+
headers?: Record<string, string>;
|
|
3202
|
+
}
|
|
3203
|
+
}
|
|
3204
|
+
/**
|
|
3205
|
+
* Span related resources
|
|
3206
|
+
*/
|
|
3207
|
+
declare class Spans {
|
|
3208
|
+
protected readonly _options: Spans.Options;
|
|
3209
|
+
constructor(_options?: Spans.Options);
|
|
3210
|
+
/**
|
|
3211
|
+
* Add span feedback score
|
|
3212
|
+
*
|
|
3213
|
+
* @param {string} id
|
|
3214
|
+
* @param {OpikApi.FeedbackScore} request
|
|
3215
|
+
* @param {Spans.RequestOptions} requestOptions - Request-specific configuration.
|
|
3216
|
+
*
|
|
3217
|
+
* @example
|
|
3218
|
+
* await client.spans.addSpanFeedbackScore("id", {
|
|
3219
|
+
* name: "name",
|
|
3220
|
+
* value: 1.1,
|
|
3221
|
+
* source: "ui"
|
|
3222
|
+
* })
|
|
3223
|
+
*/
|
|
3224
|
+
addSpanFeedbackScore(id: string, request: FeedbackScore, requestOptions?: Spans.RequestOptions): APIPromise<void>;
|
|
3225
|
+
/**
|
|
3226
|
+
* Get spans by project_name or project_id and optionally by trace_id and/or type
|
|
3227
|
+
*
|
|
3228
|
+
* @param {OpikApi.GetSpansByProjectRequest} request
|
|
3229
|
+
* @param {Spans.RequestOptions} requestOptions - Request-specific configuration.
|
|
3230
|
+
*
|
|
3231
|
+
* @example
|
|
3232
|
+
* await client.spans.getSpansByProject()
|
|
3233
|
+
*/
|
|
3234
|
+
getSpansByProject(request?: GetSpansByProjectRequest, requestOptions?: Spans.RequestOptions): APIPromise<SpanPagePublic>;
|
|
3235
|
+
/**
|
|
3236
|
+
* Create span
|
|
3237
|
+
*
|
|
3238
|
+
* @param {OpikApi.SpanWrite} request
|
|
3239
|
+
* @param {Spans.RequestOptions} requestOptions - Request-specific configuration.
|
|
3240
|
+
*
|
|
3241
|
+
* @example
|
|
3242
|
+
* await client.spans.createSpan({
|
|
3243
|
+
* traceId: "trace_id",
|
|
3244
|
+
* name: "name",
|
|
3245
|
+
* type: "general",
|
|
3246
|
+
* startTime: "2024-01-15T09:30:00Z"
|
|
3247
|
+
* })
|
|
3248
|
+
*/
|
|
3249
|
+
createSpan(request: SpanWrite, requestOptions?: Spans.RequestOptions): APIPromise<void>;
|
|
3250
|
+
/**
|
|
3251
|
+
* Create spans
|
|
3252
|
+
*
|
|
3253
|
+
* @param {OpikApi.SpanBatchWrite} request
|
|
3254
|
+
* @param {Spans.RequestOptions} requestOptions - Request-specific configuration.
|
|
3255
|
+
*
|
|
3256
|
+
* @example
|
|
3257
|
+
* await client.spans.createSpans({
|
|
3258
|
+
* spans: [{
|
|
3259
|
+
* traceId: "trace_id",
|
|
3260
|
+
* name: "name",
|
|
3261
|
+
* type: "general",
|
|
3262
|
+
* startTime: "2024-01-15T09:30:00Z"
|
|
3263
|
+
* }]
|
|
3264
|
+
* })
|
|
3265
|
+
*/
|
|
3266
|
+
createSpans(request: SpanBatchWrite, requestOptions?: Spans.RequestOptions): APIPromise<void>;
|
|
3267
|
+
/**
|
|
3268
|
+
* Get span by id
|
|
3269
|
+
*
|
|
3270
|
+
* @param {string} id
|
|
3271
|
+
* @param {Spans.RequestOptions} requestOptions - Request-specific configuration.
|
|
3272
|
+
*
|
|
3273
|
+
* @throws {@link OpikApi.NotFoundError}
|
|
3274
|
+
*
|
|
3275
|
+
* @example
|
|
3276
|
+
* await client.spans.getSpanById("id")
|
|
3277
|
+
*/
|
|
3278
|
+
getSpanById(id: string, requestOptions?: Spans.RequestOptions): APIPromise<SpanPublic>;
|
|
3279
|
+
/**
|
|
3280
|
+
* Delete span by id
|
|
3281
|
+
*
|
|
3282
|
+
* @param {string} id
|
|
3283
|
+
* @param {Spans.RequestOptions} requestOptions - Request-specific configuration.
|
|
3284
|
+
*
|
|
3285
|
+
* @throws {@link OpikApi.NotImplementedError}
|
|
3286
|
+
*
|
|
3287
|
+
* @example
|
|
3288
|
+
* await client.spans.deleteSpanById("id")
|
|
3289
|
+
*/
|
|
3290
|
+
deleteSpanById(id: string, requestOptions?: Spans.RequestOptions): APIPromise<void>;
|
|
3291
|
+
/**
|
|
3292
|
+
* Update span by id
|
|
3293
|
+
*
|
|
3294
|
+
* @param {string} id
|
|
3295
|
+
* @param {OpikApi.SpanUpdate} request
|
|
3296
|
+
* @param {Spans.RequestOptions} requestOptions - Request-specific configuration.
|
|
3297
|
+
*
|
|
3298
|
+
* @throws {@link OpikApi.NotFoundError}
|
|
3299
|
+
*
|
|
3300
|
+
* @example
|
|
3301
|
+
* await client.spans.updateSpan("id", {
|
|
3302
|
+
* traceId: "trace_id"
|
|
3303
|
+
* })
|
|
3304
|
+
*/
|
|
3305
|
+
updateSpan(id: string, request: SpanUpdate, requestOptions?: Spans.RequestOptions): APIPromise<void>;
|
|
3306
|
+
/**
|
|
3307
|
+
* Delete span feedback score
|
|
3308
|
+
*
|
|
3309
|
+
* @param {string} id
|
|
3310
|
+
* @param {OpikApi.DeleteFeedbackScore} request
|
|
3311
|
+
* @param {Spans.RequestOptions} requestOptions - Request-specific configuration.
|
|
3312
|
+
*
|
|
3313
|
+
* @example
|
|
3314
|
+
* await client.spans.deleteSpanFeedbackScore("id", {
|
|
3315
|
+
* name: "name"
|
|
3316
|
+
* })
|
|
3317
|
+
*/
|
|
3318
|
+
deleteSpanFeedbackScore(id: string, request: DeleteFeedbackScore, requestOptions?: Spans.RequestOptions): APIPromise<void>;
|
|
3319
|
+
/**
|
|
3320
|
+
* Find Feedback Score names
|
|
3321
|
+
*
|
|
3322
|
+
* @param {OpikApi.FindFeedbackScoreNames1Request} request
|
|
3323
|
+
* @param {Spans.RequestOptions} requestOptions - Request-specific configuration.
|
|
3324
|
+
*
|
|
3325
|
+
* @example
|
|
3326
|
+
* await client.spans.findFeedbackScoreNames1()
|
|
3327
|
+
*/
|
|
3328
|
+
findFeedbackScoreNames1(request?: FindFeedbackScoreNames1Request, requestOptions?: Spans.RequestOptions): APIPromise<string[]>;
|
|
3329
|
+
/**
|
|
3330
|
+
* Get span stats
|
|
3331
|
+
*
|
|
3332
|
+
* @param {OpikApi.GetSpanStatsRequest} request
|
|
3333
|
+
* @param {Spans.RequestOptions} requestOptions - Request-specific configuration.
|
|
3334
|
+
*
|
|
3335
|
+
* @example
|
|
3336
|
+
* await client.spans.getSpanStats()
|
|
3337
|
+
*/
|
|
3338
|
+
getSpanStats(request?: GetSpanStatsRequest, requestOptions?: Spans.RequestOptions): APIPromise<ProjectStatsPublic>;
|
|
3339
|
+
/**
|
|
3340
|
+
* Batch feedback scoring for spans
|
|
3341
|
+
*
|
|
3342
|
+
* @param {OpikApi.FeedbackScoreBatch} request
|
|
3343
|
+
* @param {Spans.RequestOptions} requestOptions - Request-specific configuration.
|
|
3344
|
+
*
|
|
3345
|
+
* @example
|
|
3346
|
+
* await client.spans.scoreBatchOfSpans({
|
|
3347
|
+
* scores: [{
|
|
3348
|
+
* id: "id",
|
|
3349
|
+
* name: "name",
|
|
3350
|
+
* value: 1.1,
|
|
3351
|
+
* source: "ui"
|
|
3352
|
+
* }]
|
|
3353
|
+
* })
|
|
3354
|
+
*/
|
|
3355
|
+
scoreBatchOfSpans(request: FeedbackScoreBatch, requestOptions?: Spans.RequestOptions): APIPromise<void>;
|
|
3356
|
+
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
3357
|
+
authorization: string | undefined;
|
|
3358
|
+
}>;
|
|
3359
|
+
}
|
|
3360
|
+
|
|
3361
|
+
/**
|
|
3362
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3363
|
+
*/
|
|
3364
|
+
|
|
3365
|
+
declare namespace Traces {
|
|
3366
|
+
interface Options {
|
|
3367
|
+
environment?: Supplier<OpikApiEnvironment | string>;
|
|
3368
|
+
/** Override the authorization header */
|
|
3369
|
+
authorization?: Supplier<string | undefined>;
|
|
3370
|
+
/** Override the comet-workspace header */
|
|
3371
|
+
workspaceName?: Supplier<string | undefined>;
|
|
3372
|
+
}
|
|
3373
|
+
interface RequestOptions {
|
|
3374
|
+
/** The maximum time to wait for a response in seconds. */
|
|
3375
|
+
timeoutInSeconds?: number;
|
|
3376
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
3377
|
+
maxRetries?: number;
|
|
3378
|
+
/** A hook to abort the request. */
|
|
3379
|
+
abortSignal?: AbortSignal;
|
|
3380
|
+
/** Override the authorization header */
|
|
3381
|
+
authorization?: string | undefined;
|
|
3382
|
+
/** Override the comet-workspace header */
|
|
3383
|
+
workspaceName?: string | undefined;
|
|
3384
|
+
/** Additional headers to include in the request. */
|
|
3385
|
+
headers?: Record<string, string>;
|
|
3386
|
+
}
|
|
3387
|
+
}
|
|
3388
|
+
/**
|
|
3389
|
+
* Trace related resources
|
|
3390
|
+
*/
|
|
3391
|
+
declare class Traces {
|
|
3392
|
+
protected readonly _options: Traces.Options;
|
|
3393
|
+
constructor(_options?: Traces.Options);
|
|
3394
|
+
/**
|
|
3395
|
+
* Add trace feedback score
|
|
3396
|
+
*
|
|
3397
|
+
* @param {string} id
|
|
3398
|
+
* @param {OpikApi.FeedbackScore} request
|
|
3399
|
+
* @param {Traces.RequestOptions} requestOptions - Request-specific configuration.
|
|
3400
|
+
*
|
|
3401
|
+
* @example
|
|
3402
|
+
* await client.traces.addTraceFeedbackScore("id", {
|
|
3403
|
+
* name: "name",
|
|
3404
|
+
* value: 1.1,
|
|
3405
|
+
* source: "ui"
|
|
3406
|
+
* })
|
|
3407
|
+
*/
|
|
3408
|
+
addTraceFeedbackScore(id: string, request: FeedbackScore, requestOptions?: Traces.RequestOptions): APIPromise<void>;
|
|
3409
|
+
/**
|
|
3410
|
+
* Get traces by project_name or project_id
|
|
3411
|
+
*
|
|
3412
|
+
* @param {OpikApi.GetTracesByProjectRequest} request
|
|
3413
|
+
* @param {Traces.RequestOptions} requestOptions - Request-specific configuration.
|
|
3414
|
+
*
|
|
3415
|
+
* @example
|
|
3416
|
+
* await client.traces.getTracesByProject()
|
|
3417
|
+
*/
|
|
3418
|
+
getTracesByProject(request?: GetTracesByProjectRequest, requestOptions?: Traces.RequestOptions): APIPromise<TracePagePublic>;
|
|
3419
|
+
/**
|
|
3420
|
+
* Get trace
|
|
3421
|
+
*
|
|
3422
|
+
* @param {OpikApi.TraceWrite} request
|
|
3423
|
+
* @param {Traces.RequestOptions} requestOptions - Request-specific configuration.
|
|
3424
|
+
*
|
|
3425
|
+
* @example
|
|
3426
|
+
* await client.traces.createTrace({
|
|
3427
|
+
* name: "name",
|
|
3428
|
+
* startTime: "2024-01-15T09:30:00Z"
|
|
3429
|
+
* })
|
|
3430
|
+
*/
|
|
3431
|
+
createTrace(request: TraceWrite, requestOptions?: Traces.RequestOptions): APIPromise<void>;
|
|
3432
|
+
/**
|
|
3433
|
+
* Create traces
|
|
3434
|
+
*
|
|
3435
|
+
* @param {OpikApi.TraceBatchWrite} request
|
|
3436
|
+
* @param {Traces.RequestOptions} requestOptions - Request-specific configuration.
|
|
3437
|
+
*
|
|
3438
|
+
* @example
|
|
3439
|
+
* await client.traces.createTraces({
|
|
3440
|
+
* traces: [{
|
|
3441
|
+
* name: "name",
|
|
3442
|
+
* startTime: "2024-01-15T09:30:00Z"
|
|
3443
|
+
* }]
|
|
3444
|
+
* })
|
|
3445
|
+
*/
|
|
3446
|
+
createTraces(request: TraceBatchWrite, requestOptions?: Traces.RequestOptions): APIPromise<void>;
|
|
3447
|
+
/**
|
|
3448
|
+
* Get trace by id
|
|
3449
|
+
*
|
|
3450
|
+
* @param {string} id
|
|
3451
|
+
* @param {Traces.RequestOptions} requestOptions - Request-specific configuration.
|
|
3452
|
+
*
|
|
3453
|
+
* @example
|
|
3454
|
+
* await client.traces.getTraceById("id")
|
|
3455
|
+
*/
|
|
3456
|
+
getTraceById(id: string, requestOptions?: Traces.RequestOptions): APIPromise<TracePublic>;
|
|
3457
|
+
/**
|
|
3458
|
+
* Delete trace by id
|
|
3459
|
+
*
|
|
3460
|
+
* @param {string} id
|
|
3461
|
+
* @param {Traces.RequestOptions} requestOptions - Request-specific configuration.
|
|
3462
|
+
*
|
|
3463
|
+
* @example
|
|
3464
|
+
* await client.traces.deleteTraceById("id")
|
|
3465
|
+
*/
|
|
3466
|
+
deleteTraceById(id: string, requestOptions?: Traces.RequestOptions): APIPromise<void>;
|
|
3467
|
+
/**
|
|
3468
|
+
* Update trace by id
|
|
3469
|
+
*
|
|
3470
|
+
* @param {string} id
|
|
3471
|
+
* @param {OpikApi.TraceUpdate} request
|
|
3472
|
+
* @param {Traces.RequestOptions} requestOptions - Request-specific configuration.
|
|
3473
|
+
*
|
|
3474
|
+
* @example
|
|
3475
|
+
* await client.traces.updateTrace("id")
|
|
3476
|
+
*/
|
|
3477
|
+
updateTrace(id: string, request?: TraceUpdate, requestOptions?: Traces.RequestOptions): APIPromise<void>;
|
|
3478
|
+
/**
|
|
3479
|
+
* Delete trace feedback score
|
|
3480
|
+
*
|
|
3481
|
+
* @param {string} id
|
|
3482
|
+
* @param {OpikApi.DeleteFeedbackScore} request
|
|
3483
|
+
* @param {Traces.RequestOptions} requestOptions - Request-specific configuration.
|
|
3484
|
+
*
|
|
3485
|
+
* @example
|
|
3486
|
+
* await client.traces.deleteTraceFeedbackScore("id", {
|
|
3487
|
+
* name: "name"
|
|
3488
|
+
* })
|
|
3489
|
+
*/
|
|
3490
|
+
deleteTraceFeedbackScore(id: string, request: DeleteFeedbackScore, requestOptions?: Traces.RequestOptions): APIPromise<void>;
|
|
3491
|
+
/**
|
|
3492
|
+
* Delete traces
|
|
3493
|
+
*
|
|
3494
|
+
* @param {OpikApi.BatchDelete} request
|
|
3495
|
+
* @param {Traces.RequestOptions} requestOptions - Request-specific configuration.
|
|
3496
|
+
*
|
|
3497
|
+
* @example
|
|
3498
|
+
* await client.traces.deleteTraces({
|
|
3499
|
+
* ids: ["ids"]
|
|
3500
|
+
* })
|
|
3501
|
+
*/
|
|
3502
|
+
deleteTraces(request: BatchDelete, requestOptions?: Traces.RequestOptions): APIPromise<void>;
|
|
3503
|
+
/**
|
|
3504
|
+
* Find Feedback Score names
|
|
3505
|
+
*
|
|
3506
|
+
* @param {OpikApi.FindFeedbackScoreNames2Request} request
|
|
3507
|
+
* @param {Traces.RequestOptions} requestOptions - Request-specific configuration.
|
|
3508
|
+
*
|
|
3509
|
+
* @example
|
|
3510
|
+
* await client.traces.findFeedbackScoreNames2()
|
|
3511
|
+
*/
|
|
3512
|
+
findFeedbackScoreNames2(request?: FindFeedbackScoreNames2Request, requestOptions?: Traces.RequestOptions): APIPromise<string[]>;
|
|
3513
|
+
/**
|
|
3514
|
+
* Get trace stats
|
|
3515
|
+
*
|
|
3516
|
+
* @param {OpikApi.GetTraceStatsRequest} request
|
|
3517
|
+
* @param {Traces.RequestOptions} requestOptions - Request-specific configuration.
|
|
3518
|
+
*
|
|
3519
|
+
* @example
|
|
3520
|
+
* await client.traces.getTraceStats()
|
|
3521
|
+
*/
|
|
3522
|
+
getTraceStats(request?: GetTraceStatsRequest, requestOptions?: Traces.RequestOptions): APIPromise<ProjectStatsPublic>;
|
|
3523
|
+
/**
|
|
3524
|
+
* Batch feedback scoring for traces
|
|
3525
|
+
*
|
|
3526
|
+
* @param {OpikApi.FeedbackScoreBatch} request
|
|
3527
|
+
* @param {Traces.RequestOptions} requestOptions - Request-specific configuration.
|
|
3528
|
+
*
|
|
3529
|
+
* @example
|
|
3530
|
+
* await client.traces.scoreBatchOfTraces({
|
|
3531
|
+
* scores: [{
|
|
3532
|
+
* id: "id",
|
|
3533
|
+
* name: "name",
|
|
3534
|
+
* value: 1.1,
|
|
3535
|
+
* source: "ui"
|
|
3536
|
+
* }]
|
|
3537
|
+
* })
|
|
3538
|
+
*/
|
|
3539
|
+
scoreBatchOfTraces(request: FeedbackScoreBatch, requestOptions?: Traces.RequestOptions): APIPromise<void>;
|
|
3540
|
+
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
3541
|
+
authorization: string | undefined;
|
|
3542
|
+
}>;
|
|
3543
|
+
}
|
|
3544
|
+
|
|
3545
|
+
/**
|
|
3546
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3547
|
+
*/
|
|
3548
|
+
|
|
3549
|
+
declare namespace OpikApiClient {
|
|
3550
|
+
interface Options {
|
|
3551
|
+
environment?: Supplier<OpikApiEnvironment | string>;
|
|
3552
|
+
/** Override the authorization header */
|
|
3553
|
+
authorization?: Supplier<string | undefined>;
|
|
3554
|
+
/** Override the comet-workspace header */
|
|
3555
|
+
workspaceName?: Supplier<string | undefined>;
|
|
3556
|
+
}
|
|
3557
|
+
interface RequestOptions {
|
|
3558
|
+
/** The maximum time to wait for a response in seconds. */
|
|
3559
|
+
timeoutInSeconds?: number;
|
|
3560
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
3561
|
+
maxRetries?: number;
|
|
3562
|
+
/** A hook to abort the request. */
|
|
3563
|
+
abortSignal?: AbortSignal;
|
|
3564
|
+
/** Override the authorization header */
|
|
3565
|
+
authorization?: string | undefined;
|
|
3566
|
+
/** Override the comet-workspace header */
|
|
3567
|
+
workspaceName?: string | undefined;
|
|
3568
|
+
/** Additional headers to include in the request. */
|
|
3569
|
+
headers?: Record<string, string>;
|
|
3570
|
+
}
|
|
3571
|
+
}
|
|
3572
|
+
declare class OpikApiClient {
|
|
3573
|
+
protected readonly _options: OpikApiClient.Options;
|
|
3574
|
+
constructor(_options?: OpikApiClient.Options);
|
|
3575
|
+
/**
|
|
3576
|
+
* @param {OpikApiClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
3577
|
+
*
|
|
3578
|
+
* @example
|
|
3579
|
+
* await client.isAlive()
|
|
3580
|
+
*/
|
|
3581
|
+
isAlive(requestOptions?: OpikApiClient.RequestOptions): APIPromise<unknown>;
|
|
3582
|
+
/**
|
|
3583
|
+
* @param {OpikApiClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
3584
|
+
*
|
|
3585
|
+
* @example
|
|
3586
|
+
* await client.version()
|
|
3587
|
+
*/
|
|
3588
|
+
version(requestOptions?: OpikApiClient.RequestOptions): APIPromise<unknown>;
|
|
3589
|
+
protected _systemUsage: SystemUsage | undefined;
|
|
3590
|
+
get systemUsage(): SystemUsage;
|
|
3591
|
+
protected _check: Check | undefined;
|
|
3592
|
+
get check(): Check;
|
|
3593
|
+
protected _chatCompletions: ChatCompletions | undefined;
|
|
3594
|
+
get chatCompletions(): ChatCompletions;
|
|
3595
|
+
protected _datasets: Datasets | undefined;
|
|
3596
|
+
get datasets(): Datasets;
|
|
3597
|
+
protected _experiments: Experiments | undefined;
|
|
3598
|
+
get experiments(): Experiments;
|
|
3599
|
+
protected _feedbackDefinitions: FeedbackDefinitions | undefined;
|
|
3600
|
+
get feedbackDefinitions(): FeedbackDefinitions;
|
|
3601
|
+
protected _llmProviderKey: LlmProviderKey | undefined;
|
|
3602
|
+
get llmProviderKey(): LlmProviderKey;
|
|
3603
|
+
protected _projects: Projects | undefined;
|
|
3604
|
+
get projects(): Projects;
|
|
3605
|
+
protected _prompts: Prompts | undefined;
|
|
3606
|
+
get prompts(): Prompts;
|
|
3607
|
+
protected _spans: Spans | undefined;
|
|
3608
|
+
get spans(): Spans;
|
|
3609
|
+
protected _traces: Traces | undefined;
|
|
3610
|
+
get traces(): Traces;
|
|
3611
|
+
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
3612
|
+
authorization: string | undefined;
|
|
3613
|
+
}>;
|
|
3614
|
+
}
|
|
3615
|
+
|
|
3616
|
+
interface SavedSpan extends Span$1 {
|
|
3617
|
+
id: string;
|
|
3618
|
+
}
|
|
3619
|
+
declare class Span {
|
|
3620
|
+
private data;
|
|
3621
|
+
private apiClient;
|
|
3622
|
+
constructor(data: SavedSpan, apiClient: OpikApiClient);
|
|
3623
|
+
end: () => Promise<void>;
|
|
3624
|
+
update: (updates: Omit<SpanUpdate, "traceId" | "parentSpanId" | "projectId" | "projectName">) => Promise<void>;
|
|
3625
|
+
}
|
|
3626
|
+
|
|
3627
|
+
interface SavedTrace extends Trace$1 {
|
|
3628
|
+
id: string;
|
|
3629
|
+
}
|
|
3630
|
+
interface SpanData extends Omit<Span$1, "startTime" | "traceId"> {
|
|
3631
|
+
startTime?: Date;
|
|
3632
|
+
}
|
|
3633
|
+
declare class Trace {
|
|
3634
|
+
private data;
|
|
3635
|
+
private apiClient;
|
|
3636
|
+
private spans;
|
|
3637
|
+
constructor(data: SavedTrace, apiClient: OpikApiClient);
|
|
3638
|
+
end: () => Promise<void>;
|
|
3639
|
+
span: (spanData: SpanData) => Promise<Span>;
|
|
3640
|
+
update: (updates: Omit<TraceUpdate, "projectId" | "projectName">) => Promise<void>;
|
|
3641
|
+
}
|
|
3642
|
+
|
|
3643
|
+
interface TraceData extends Omit<Trace$1, "startTime"> {
|
|
3644
|
+
startTime?: Date;
|
|
3645
|
+
}
|
|
3646
|
+
declare class OpikClient {
|
|
3647
|
+
apiClient: OpikApiClient;
|
|
3648
|
+
private config;
|
|
3649
|
+
constructor(explicitConfig?: Partial<OpikConfig>);
|
|
3650
|
+
trace: (trace: TraceData) => Promise<Trace>;
|
|
3651
|
+
}
|
|
3652
|
+
|
|
3653
|
+
export { OpikClient as Opik, type OpikConfig };
|