vellum-ai 0.0.41__py3-none-any.whl → 0.0.43__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- vellum/__init__.py +22 -2
- vellum/client.py +9 -5
- vellum/core/client_wrapper.py +1 -1
- vellum/core/jsonable_encoder.py +8 -6
- vellum/resources/deployments/client.py +5 -2
- vellum/resources/document_indexes/client.py +47 -2
- vellum/resources/documents/client.py +5 -2
- vellum/resources/model_versions/client.py +5 -2
- vellum/resources/registered_prompts/client.py +5 -2
- vellum/resources/sandboxes/client.py +5 -2
- vellum/resources/test_suites/client.py +5 -2
- vellum/types/__init__.py +22 -2
- vellum/types/api_node_result.py +29 -0
- vellum/types/api_node_result_data.py +34 -0
- vellum/types/chat_message.py +5 -2
- vellum/types/chat_message_request.py +5 -2
- vellum/types/conditional_node_result.py +5 -2
- vellum/types/conditional_node_result_data.py +5 -2
- vellum/types/deployment_read.py +5 -2
- vellum/types/document_document_to_document_index.py +5 -2
- vellum/types/document_index_read.py +5 -2
- vellum/types/document_read.py +5 -2
- vellum/types/enriched_normalized_completion.py +7 -4
- vellum/types/evaluation_params.py +5 -2
- vellum/types/evaluation_params_request.py +5 -2
- vellum/types/execute_workflow_stream_error_response.py +5 -2
- vellum/types/generate_error_response.py +5 -2
- vellum/types/generate_options_request.py +5 -2
- vellum/types/generate_request.py +5 -2
- vellum/types/generate_result.py +5 -2
- vellum/types/generate_result_data.py +5 -2
- vellum/types/generate_result_error.py +5 -2
- vellum/types/generate_stream_response.py +5 -2
- vellum/types/generate_stream_result.py +5 -2
- vellum/types/generate_stream_result_data.py +5 -2
- vellum/types/metadata_filter_config_request.py +5 -2
- vellum/types/metadata_filter_rule_request.py +5 -2
- vellum/types/model_version_build_config.py +5 -2
- vellum/types/model_version_compile_prompt_response.py +5 -2
- vellum/types/model_version_compiled_prompt.py +5 -2
- vellum/types/model_version_exec_config.py +5 -2
- vellum/types/model_version_exec_config_parameters.py +7 -4
- vellum/types/model_version_read.py +5 -2
- vellum/types/model_version_sandbox_snapshot.py +5 -2
- vellum/types/node_input_compiled_chat_history_value.py +5 -2
- vellum/types/node_input_compiled_json_value.py +5 -2
- vellum/types/node_input_compiled_number_value.py +30 -0
- vellum/types/node_input_compiled_search_results_value.py +5 -2
- vellum/types/node_input_compiled_string_value.py +5 -2
- vellum/types/node_input_variable_compiled_value.py +11 -0
- vellum/types/normalized_log_probs.py +5 -2
- vellum/types/normalized_token_log_probs.py +5 -2
- vellum/types/paginated_slim_document_list.py +5 -2
- vellum/types/prompt_node_result.py +5 -2
- vellum/types/prompt_node_result_data.py +5 -2
- vellum/types/prompt_template_block.py +5 -2
- vellum/types/prompt_template_block_data.py +5 -2
- vellum/types/prompt_template_block_data_request.py +5 -2
- vellum/types/prompt_template_block_properties.py +7 -4
- vellum/types/prompt_template_block_properties_request.py +7 -4
- vellum/types/prompt_template_block_request.py +5 -2
- vellum/types/register_prompt_error_response.py +5 -2
- vellum/types/register_prompt_model_parameters_request.py +5 -2
- vellum/types/register_prompt_prompt.py +5 -2
- vellum/types/register_prompt_prompt_info_request.py +5 -2
- vellum/types/register_prompt_response.py +5 -2
- vellum/types/registered_prompt_deployment.py +5 -2
- vellum/types/registered_prompt_input_variable_request.py +5 -2
- vellum/types/registered_prompt_model_version.py +5 -2
- vellum/types/registered_prompt_sandbox.py +5 -2
- vellum/types/registered_prompt_sandbox_snapshot.py +5 -2
- vellum/types/sandbox_metric_input_params.py +5 -2
- vellum/types/sandbox_metric_input_params_request.py +5 -2
- vellum/types/sandbox_scenario.py +5 -2
- vellum/types/scenario_input.py +5 -2
- vellum/types/scenario_input_request.py +5 -2
- vellum/types/search_error_response.py +5 -2
- vellum/types/search_filters_request.py +5 -2
- vellum/types/search_node_result.py +5 -2
- vellum/types/search_node_result_data.py +5 -2
- vellum/types/search_request_options_request.py +5 -2
- vellum/types/search_response.py +5 -2
- vellum/types/search_result.py +5 -2
- vellum/types/search_result_document.py +5 -2
- vellum/types/search_result_merging_request.py +6 -3
- vellum/types/search_weights_request.py +9 -4
- vellum/types/slim_document.py +5 -2
- vellum/types/submit_completion_actual_request.py +5 -2
- vellum/types/submit_completion_actuals_error_response.py +5 -2
- vellum/types/templating_node_chat_history_result.py +5 -2
- vellum/types/templating_node_json_result.py +5 -2
- vellum/types/templating_node_number_result.py +29 -0
- vellum/types/templating_node_result.py +5 -2
- vellum/types/templating_node_result_data.py +5 -2
- vellum/types/templating_node_result_output.py +11 -0
- vellum/types/templating_node_search_results_result.py +5 -2
- vellum/types/templating_node_string_result.py +5 -2
- vellum/types/terminal_node_chat_history_result.py +5 -2
- vellum/types/terminal_node_json_result.py +5 -2
- vellum/types/terminal_node_number_result.py +30 -0
- vellum/types/terminal_node_result.py +5 -2
- vellum/types/terminal_node_result_data.py +5 -2
- vellum/types/terminal_node_result_output.py +11 -0
- vellum/types/terminal_node_search_results_result.py +5 -2
- vellum/types/terminal_node_string_result.py +5 -2
- vellum/types/test_suite_test_case.py +5 -2
- vellum/types/upload_document_error_response.py +5 -2
- vellum/types/upload_document_response.py +5 -2
- vellum/types/vellum_variable.py +5 -2
- vellum/types/vellum_variable_type.py +8 -3
- vellum/types/workflow_event_error.py +5 -2
- vellum/types/workflow_execution_actual_chat_history_request.py +5 -2
- vellum/types/workflow_execution_actual_json_request.py +5 -2
- vellum/types/workflow_execution_actual_string_request.py +5 -2
- vellum/types/workflow_execution_node_result_event.py +5 -2
- vellum/types/workflow_execution_workflow_result_event.py +5 -2
- vellum/types/workflow_node_result_data.py +11 -0
- vellum/types/workflow_node_result_event.py +5 -2
- vellum/types/workflow_request_chat_history_input_request.py +5 -2
- vellum/types/workflow_request_json_input_request.py +5 -2
- vellum/types/workflow_request_string_input_request.py +5 -2
- vellum/types/workflow_result_event.py +5 -2
- vellum/types/workflow_result_event_output_data.py +11 -0
- vellum/types/workflow_result_event_output_data_chat_history.py +5 -2
- vellum/types/workflow_result_event_output_data_json.py +5 -2
- vellum/types/workflow_result_event_output_data_number.py +36 -0
- vellum/types/workflow_result_event_output_data_search_results.py +5 -2
- vellum/types/workflow_result_event_output_data_string.py +5 -2
- {vellum_ai-0.0.41.dist-info → vellum_ai-0.0.43.dist-info}/METADATA +2 -2
- vellum_ai-0.0.43.dist-info/RECORD +175 -0
- vellum/types/content_type.py +0 -22
- vellum_ai-0.0.41.dist-info/RECORD +0 -170
- {vellum_ai-0.0.41.dist-info → vellum_ai-0.0.43.dist-info}/WHEEL +0 -0
@@ -0,0 +1,34 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import datetime as dt
|
4
|
+
import typing
|
5
|
+
|
6
|
+
from ..core.datetime_utils import serialize_datetime
|
7
|
+
|
8
|
+
try:
|
9
|
+
import pydantic.v1 as pydantic # type: ignore
|
10
|
+
except ImportError:
|
11
|
+
import pydantic # type: ignore
|
12
|
+
|
13
|
+
|
14
|
+
class ApiNodeResultData(pydantic.BaseModel):
|
15
|
+
text_output_id: str
|
16
|
+
text: typing.Optional[str]
|
17
|
+
json_output_id: str
|
18
|
+
json_: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(alias="json")
|
19
|
+
status_code_output_id: str
|
20
|
+
status_code: int
|
21
|
+
|
22
|
+
def json(self, **kwargs: typing.Any) -> str:
|
23
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
24
|
+
return super().json(**kwargs_with_defaults)
|
25
|
+
|
26
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
27
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
28
|
+
return super().dict(**kwargs_with_defaults)
|
29
|
+
|
30
|
+
class Config:
|
31
|
+
frozen = True
|
32
|
+
smart_union = True
|
33
|
+
allow_population_by_field_name = True
|
34
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
vellum/types/chat_message.py
CHANGED
@@ -3,11 +3,14 @@
|
|
3
3
|
import datetime as dt
|
4
4
|
import typing
|
5
5
|
|
6
|
-
import pydantic
|
7
|
-
|
8
6
|
from ..core.datetime_utils import serialize_datetime
|
9
7
|
from .chat_message_role import ChatMessageRole
|
10
8
|
|
9
|
+
try:
|
10
|
+
import pydantic.v1 as pydantic # type: ignore
|
11
|
+
except ImportError:
|
12
|
+
import pydantic # type: ignore
|
13
|
+
|
11
14
|
|
12
15
|
class ChatMessage(pydantic.BaseModel):
|
13
16
|
text: str
|
@@ -3,11 +3,14 @@
|
|
3
3
|
import datetime as dt
|
4
4
|
import typing
|
5
5
|
|
6
|
-
import pydantic
|
7
|
-
|
8
6
|
from ..core.datetime_utils import serialize_datetime
|
9
7
|
from .chat_message_role import ChatMessageRole
|
10
8
|
|
9
|
+
try:
|
10
|
+
import pydantic.v1 as pydantic # type: ignore
|
11
|
+
except ImportError:
|
12
|
+
import pydantic # type: ignore
|
13
|
+
|
11
14
|
|
12
15
|
class ChatMessageRequest(pydantic.BaseModel):
|
13
16
|
text: str
|
@@ -3,11 +3,14 @@
|
|
3
3
|
import datetime as dt
|
4
4
|
import typing
|
5
5
|
|
6
|
-
import pydantic
|
7
|
-
|
8
6
|
from ..core.datetime_utils import serialize_datetime
|
9
7
|
from .conditional_node_result_data import ConditionalNodeResultData
|
10
8
|
|
9
|
+
try:
|
10
|
+
import pydantic.v1 as pydantic # type: ignore
|
11
|
+
except ImportError:
|
12
|
+
import pydantic # type: ignore
|
13
|
+
|
11
14
|
|
12
15
|
class ConditionalNodeResult(pydantic.BaseModel):
|
13
16
|
data: ConditionalNodeResultData
|
@@ -3,10 +3,13 @@
|
|
3
3
|
import datetime as dt
|
4
4
|
import typing
|
5
5
|
|
6
|
-
import pydantic
|
7
|
-
|
8
6
|
from ..core.datetime_utils import serialize_datetime
|
9
7
|
|
8
|
+
try:
|
9
|
+
import pydantic.v1 as pydantic # type: ignore
|
10
|
+
except ImportError:
|
11
|
+
import pydantic # type: ignore
|
12
|
+
|
10
13
|
|
11
14
|
class ConditionalNodeResultData(pydantic.BaseModel):
|
12
15
|
source_handle_id: typing.Optional[str]
|
vellum/types/deployment_read.py
CHANGED
@@ -3,14 +3,17 @@
|
|
3
3
|
import datetime as dt
|
4
4
|
import typing
|
5
5
|
|
6
|
-
import pydantic
|
7
|
-
|
8
6
|
from ..core.datetime_utils import serialize_datetime
|
9
7
|
from .deployment_status import DeploymentStatus
|
10
8
|
from .environment_enum import EnvironmentEnum
|
11
9
|
from .model_type_deprecated import ModelTypeDeprecated
|
12
10
|
from .vellum_variable import VellumVariable
|
13
11
|
|
12
|
+
try:
|
13
|
+
import pydantic.v1 as pydantic # type: ignore
|
14
|
+
except ImportError:
|
15
|
+
import pydantic # type: ignore
|
16
|
+
|
14
17
|
|
15
18
|
class DeploymentRead(pydantic.BaseModel):
|
16
19
|
id: str
|
@@ -3,11 +3,14 @@
|
|
3
3
|
import datetime as dt
|
4
4
|
import typing
|
5
5
|
|
6
|
-
import pydantic
|
7
|
-
|
8
6
|
from ..core.datetime_utils import serialize_datetime
|
9
7
|
from .indexing_state_enum import IndexingStateEnum
|
10
8
|
|
9
|
+
try:
|
10
|
+
import pydantic.v1 as pydantic # type: ignore
|
11
|
+
except ImportError:
|
12
|
+
import pydantic # type: ignore
|
13
|
+
|
11
14
|
|
12
15
|
class DocumentDocumentToDocumentIndex(pydantic.BaseModel):
|
13
16
|
id: str = pydantic.Field(description="Vellum-generated ID that uniquely identifies this link.")
|
@@ -3,12 +3,15 @@
|
|
3
3
|
import datetime as dt
|
4
4
|
import typing
|
5
5
|
|
6
|
-
import pydantic
|
7
|
-
|
8
6
|
from ..core.datetime_utils import serialize_datetime
|
9
7
|
from .document_index_status import DocumentIndexStatus
|
10
8
|
from .environment_enum import EnvironmentEnum
|
11
9
|
|
10
|
+
try:
|
11
|
+
import pydantic.v1 as pydantic # type: ignore
|
12
|
+
except ImportError:
|
13
|
+
import pydantic # type: ignore
|
14
|
+
|
12
15
|
|
13
16
|
class DocumentIndexRead(pydantic.BaseModel):
|
14
17
|
id: str
|
vellum/types/document_read.py
CHANGED
@@ -3,13 +3,16 @@
|
|
3
3
|
import datetime as dt
|
4
4
|
import typing
|
5
5
|
|
6
|
-
import pydantic
|
7
|
-
|
8
6
|
from ..core.datetime_utils import serialize_datetime
|
9
7
|
from .document_document_to_document_index import DocumentDocumentToDocumentIndex
|
10
8
|
from .document_status import DocumentStatus
|
11
9
|
from .processing_state_enum import ProcessingStateEnum
|
12
10
|
|
11
|
+
try:
|
12
|
+
import pydantic.v1 as pydantic # type: ignore
|
13
|
+
except ImportError:
|
14
|
+
import pydantic # type: ignore
|
15
|
+
|
13
16
|
|
14
17
|
class DocumentRead(pydantic.BaseModel):
|
15
18
|
id: str
|
@@ -3,12 +3,15 @@
|
|
3
3
|
import datetime as dt
|
4
4
|
import typing
|
5
5
|
|
6
|
-
import pydantic
|
7
|
-
|
8
6
|
from ..core.datetime_utils import serialize_datetime
|
9
|
-
from .content_type import ContentType
|
10
7
|
from .finish_reason_enum import FinishReasonEnum
|
11
8
|
from .normalized_log_probs import NormalizedLogProbs
|
9
|
+
from .vellum_variable_type import VellumVariableType
|
10
|
+
|
11
|
+
try:
|
12
|
+
import pydantic.v1 as pydantic # type: ignore
|
13
|
+
except ImportError:
|
14
|
+
import pydantic # type: ignore
|
12
15
|
|
13
16
|
|
14
17
|
class EnrichedNormalizedCompletion(pydantic.BaseModel):
|
@@ -30,7 +33,7 @@ class EnrichedNormalizedCompletion(pydantic.BaseModel):
|
|
30
33
|
description="The logprobs of the completion. Only present if specified in the original request options."
|
31
34
|
)
|
32
35
|
model_version_id: str = pydantic.Field(description="The ID of the model version used to generate this completion.")
|
33
|
-
type: typing.Optional[
|
36
|
+
type: typing.Optional[VellumVariableType]
|
34
37
|
|
35
38
|
def json(self, **kwargs: typing.Any) -> str:
|
36
39
|
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
@@ -3,10 +3,13 @@
|
|
3
3
|
import datetime as dt
|
4
4
|
import typing
|
5
5
|
|
6
|
-
import pydantic
|
7
|
-
|
8
6
|
from ..core.datetime_utils import serialize_datetime
|
9
7
|
|
8
|
+
try:
|
9
|
+
import pydantic.v1 as pydantic # type: ignore
|
10
|
+
except ImportError:
|
11
|
+
import pydantic # type: ignore
|
12
|
+
|
10
13
|
|
11
14
|
class EvaluationParams(pydantic.BaseModel):
|
12
15
|
target: typing.Optional[str] = pydantic.Field(
|
@@ -3,10 +3,13 @@
|
|
3
3
|
import datetime as dt
|
4
4
|
import typing
|
5
5
|
|
6
|
-
import pydantic
|
7
|
-
|
8
6
|
from ..core.datetime_utils import serialize_datetime
|
9
7
|
|
8
|
+
try:
|
9
|
+
import pydantic.v1 as pydantic # type: ignore
|
10
|
+
except ImportError:
|
11
|
+
import pydantic # type: ignore
|
12
|
+
|
10
13
|
|
11
14
|
class EvaluationParamsRequest(pydantic.BaseModel):
|
12
15
|
target: typing.Optional[str] = pydantic.Field(
|
@@ -3,10 +3,13 @@
|
|
3
3
|
import datetime as dt
|
4
4
|
import typing
|
5
5
|
|
6
|
-
import pydantic
|
7
|
-
|
8
6
|
from ..core.datetime_utils import serialize_datetime
|
9
7
|
|
8
|
+
try:
|
9
|
+
import pydantic.v1 as pydantic # type: ignore
|
10
|
+
except ImportError:
|
11
|
+
import pydantic # type: ignore
|
12
|
+
|
10
13
|
|
11
14
|
class ExecuteWorkflowStreamErrorResponse(pydantic.BaseModel):
|
12
15
|
detail: str = pydantic.Field(description="Details about why the request failed.")
|
@@ -3,10 +3,13 @@
|
|
3
3
|
import datetime as dt
|
4
4
|
import typing
|
5
5
|
|
6
|
-
import pydantic
|
7
|
-
|
8
6
|
from ..core.datetime_utils import serialize_datetime
|
9
7
|
|
8
|
+
try:
|
9
|
+
import pydantic.v1 as pydantic # type: ignore
|
10
|
+
except ImportError:
|
11
|
+
import pydantic # type: ignore
|
12
|
+
|
10
13
|
|
11
14
|
class GenerateErrorResponse(pydantic.BaseModel):
|
12
15
|
detail: str = pydantic.Field(description="Details about why the request failed.")
|
@@ -3,11 +3,14 @@
|
|
3
3
|
import datetime as dt
|
4
4
|
import typing
|
5
5
|
|
6
|
-
import pydantic
|
7
|
-
|
8
6
|
from ..core.datetime_utils import serialize_datetime
|
9
7
|
from .logprobs_enum import LogprobsEnum
|
10
8
|
|
9
|
+
try:
|
10
|
+
import pydantic.v1 as pydantic # type: ignore
|
11
|
+
except ImportError:
|
12
|
+
import pydantic # type: ignore
|
13
|
+
|
11
14
|
|
12
15
|
class GenerateOptionsRequest(pydantic.BaseModel):
|
13
16
|
logprobs: typing.Optional[LogprobsEnum] = pydantic.Field(
|
vellum/types/generate_request.py
CHANGED
@@ -3,11 +3,14 @@
|
|
3
3
|
import datetime as dt
|
4
4
|
import typing
|
5
5
|
|
6
|
-
import pydantic
|
7
|
-
|
8
6
|
from ..core.datetime_utils import serialize_datetime
|
9
7
|
from .chat_message_request import ChatMessageRequest
|
10
8
|
|
9
|
+
try:
|
10
|
+
import pydantic.v1 as pydantic # type: ignore
|
11
|
+
except ImportError:
|
12
|
+
import pydantic # type: ignore
|
13
|
+
|
11
14
|
|
12
15
|
class GenerateRequest(pydantic.BaseModel):
|
13
16
|
input_values: typing.Dict[str, typing.Any] = pydantic.Field(
|
vellum/types/generate_result.py
CHANGED
@@ -3,12 +3,15 @@
|
|
3
3
|
import datetime as dt
|
4
4
|
import typing
|
5
5
|
|
6
|
-
import pydantic
|
7
|
-
|
8
6
|
from ..core.datetime_utils import serialize_datetime
|
9
7
|
from .generate_result_data import GenerateResultData
|
10
8
|
from .generate_result_error import GenerateResultError
|
11
9
|
|
10
|
+
try:
|
11
|
+
import pydantic.v1 as pydantic # type: ignore
|
12
|
+
except ImportError:
|
13
|
+
import pydantic # type: ignore
|
14
|
+
|
12
15
|
|
13
16
|
class GenerateResult(pydantic.BaseModel):
|
14
17
|
data: typing.Optional[GenerateResultData] = pydantic.Field(
|
@@ -3,11 +3,14 @@
|
|
3
3
|
import datetime as dt
|
4
4
|
import typing
|
5
5
|
|
6
|
-
import pydantic
|
7
|
-
|
8
6
|
from ..core.datetime_utils import serialize_datetime
|
9
7
|
from .enriched_normalized_completion import EnrichedNormalizedCompletion
|
10
8
|
|
9
|
+
try:
|
10
|
+
import pydantic.v1 as pydantic # type: ignore
|
11
|
+
except ImportError:
|
12
|
+
import pydantic # type: ignore
|
13
|
+
|
11
14
|
|
12
15
|
class GenerateResultData(pydantic.BaseModel):
|
13
16
|
completions: typing.List[EnrichedNormalizedCompletion] = pydantic.Field(
|
@@ -3,10 +3,13 @@
|
|
3
3
|
import datetime as dt
|
4
4
|
import typing
|
5
5
|
|
6
|
-
import pydantic
|
7
|
-
|
8
6
|
from ..core.datetime_utils import serialize_datetime
|
9
7
|
|
8
|
+
try:
|
9
|
+
import pydantic.v1 as pydantic # type: ignore
|
10
|
+
except ImportError:
|
11
|
+
import pydantic # type: ignore
|
12
|
+
|
10
13
|
|
11
14
|
class GenerateResultError(pydantic.BaseModel):
|
12
15
|
message: str = pydantic.Field(description="The error message returned by the LLM provider.")
|
@@ -3,11 +3,14 @@
|
|
3
3
|
import datetime as dt
|
4
4
|
import typing
|
5
5
|
|
6
|
-
import pydantic
|
7
|
-
|
8
6
|
from ..core.datetime_utils import serialize_datetime
|
9
7
|
from .generate_stream_result import GenerateStreamResult
|
10
8
|
|
9
|
+
try:
|
10
|
+
import pydantic.v1 as pydantic # type: ignore
|
11
|
+
except ImportError:
|
12
|
+
import pydantic # type: ignore
|
13
|
+
|
11
14
|
|
12
15
|
class GenerateStreamResponse(pydantic.BaseModel):
|
13
16
|
delta: GenerateStreamResult
|
@@ -3,12 +3,15 @@
|
|
3
3
|
import datetime as dt
|
4
4
|
import typing
|
5
5
|
|
6
|
-
import pydantic
|
7
|
-
|
8
6
|
from ..core.datetime_utils import serialize_datetime
|
9
7
|
from .generate_result_error import GenerateResultError
|
10
8
|
from .generate_stream_result_data import GenerateStreamResultData
|
11
9
|
|
10
|
+
try:
|
11
|
+
import pydantic.v1 as pydantic # type: ignore
|
12
|
+
except ImportError:
|
13
|
+
import pydantic # type: ignore
|
14
|
+
|
12
15
|
|
13
16
|
class GenerateStreamResult(pydantic.BaseModel):
|
14
17
|
request_index: int
|
@@ -3,11 +3,14 @@
|
|
3
3
|
import datetime as dt
|
4
4
|
import typing
|
5
5
|
|
6
|
-
import pydantic
|
7
|
-
|
8
6
|
from ..core.datetime_utils import serialize_datetime
|
9
7
|
from .enriched_normalized_completion import EnrichedNormalizedCompletion
|
10
8
|
|
9
|
+
try:
|
10
|
+
import pydantic.v1 as pydantic # type: ignore
|
11
|
+
except ImportError:
|
12
|
+
import pydantic # type: ignore
|
13
|
+
|
11
14
|
|
12
15
|
class GenerateStreamResultData(pydantic.BaseModel):
|
13
16
|
completion_index: int
|
@@ -3,13 +3,16 @@
|
|
3
3
|
import datetime as dt
|
4
4
|
import typing
|
5
5
|
|
6
|
-
import pydantic
|
7
|
-
|
8
6
|
from ..core.datetime_utils import serialize_datetime
|
9
7
|
from .logical_operator import LogicalOperator
|
10
8
|
from .metadata_filter_rule_combinator import MetadataFilterRuleCombinator
|
11
9
|
from .metadata_filter_rule_request import MetadataFilterRuleRequest
|
12
10
|
|
11
|
+
try:
|
12
|
+
import pydantic.v1 as pydantic # type: ignore
|
13
|
+
except ImportError:
|
14
|
+
import pydantic # type: ignore
|
15
|
+
|
13
16
|
|
14
17
|
class MetadataFilterConfigRequest(pydantic.BaseModel):
|
15
18
|
combinator: typing.Optional[MetadataFilterRuleCombinator]
|
@@ -5,12 +5,15 @@ from __future__ import annotations
|
|
5
5
|
import datetime as dt
|
6
6
|
import typing
|
7
7
|
|
8
|
-
import pydantic
|
9
|
-
|
10
8
|
from ..core.datetime_utils import serialize_datetime
|
11
9
|
from .logical_operator import LogicalOperator
|
12
10
|
from .metadata_filter_rule_combinator import MetadataFilterRuleCombinator
|
13
11
|
|
12
|
+
try:
|
13
|
+
import pydantic.v1 as pydantic # type: ignore
|
14
|
+
except ImportError:
|
15
|
+
import pydantic # type: ignore
|
16
|
+
|
14
17
|
|
15
18
|
class MetadataFilterRuleRequest(pydantic.BaseModel):
|
16
19
|
combinator: typing.Optional[MetadataFilterRuleCombinator]
|
@@ -3,11 +3,14 @@
|
|
3
3
|
import datetime as dt
|
4
4
|
import typing
|
5
5
|
|
6
|
-
import pydantic
|
7
|
-
|
8
6
|
from ..core.datetime_utils import serialize_datetime
|
9
7
|
from .model_version_sandbox_snapshot import ModelVersionSandboxSnapshot
|
10
8
|
|
9
|
+
try:
|
10
|
+
import pydantic.v1 as pydantic # type: ignore
|
11
|
+
except ImportError:
|
12
|
+
import pydantic # type: ignore
|
13
|
+
|
11
14
|
|
12
15
|
class ModelVersionBuildConfig(pydantic.BaseModel):
|
13
16
|
base_model: str = pydantic.Field(
|
@@ -3,11 +3,14 @@
|
|
3
3
|
import datetime as dt
|
4
4
|
import typing
|
5
5
|
|
6
|
-
import pydantic
|
7
|
-
|
8
6
|
from ..core.datetime_utils import serialize_datetime
|
9
7
|
from .model_version_compiled_prompt import ModelVersionCompiledPrompt
|
10
8
|
|
9
|
+
try:
|
10
|
+
import pydantic.v1 as pydantic # type: ignore
|
11
|
+
except ImportError:
|
12
|
+
import pydantic # type: ignore
|
13
|
+
|
11
14
|
|
12
15
|
class ModelVersionCompilePromptResponse(pydantic.BaseModel):
|
13
16
|
prompt: ModelVersionCompiledPrompt = pydantic.Field(description="Information about the compiled prompt.")
|
@@ -3,10 +3,13 @@
|
|
3
3
|
import datetime as dt
|
4
4
|
import typing
|
5
5
|
|
6
|
-
import pydantic
|
7
|
-
|
8
6
|
from ..core.datetime_utils import serialize_datetime
|
9
7
|
|
8
|
+
try:
|
9
|
+
import pydantic.v1 as pydantic # type: ignore
|
10
|
+
except ImportError:
|
11
|
+
import pydantic # type: ignore
|
12
|
+
|
10
13
|
|
11
14
|
class ModelVersionCompiledPrompt(pydantic.BaseModel):
|
12
15
|
text: str = pydantic.Field(
|
@@ -3,13 +3,16 @@
|
|
3
3
|
import datetime as dt
|
4
4
|
import typing
|
5
5
|
|
6
|
-
import pydantic
|
7
|
-
|
8
6
|
from ..core.datetime_utils import serialize_datetime
|
9
7
|
from .model_version_exec_config_parameters import ModelVersionExecConfigParameters
|
10
8
|
from .prompt_template_block_data import PromptTemplateBlockData
|
11
9
|
from .vellum_variable import VellumVariable
|
12
10
|
|
11
|
+
try:
|
12
|
+
import pydantic.v1 as pydantic # type: ignore
|
13
|
+
except ImportError:
|
14
|
+
import pydantic # type: ignore
|
15
|
+
|
13
16
|
|
14
17
|
class ModelVersionExecConfig(pydantic.BaseModel):
|
15
18
|
parameters: ModelVersionExecConfigParameters = pydantic.Field(
|
@@ -3,14 +3,17 @@
|
|
3
3
|
import datetime as dt
|
4
4
|
import typing
|
5
5
|
|
6
|
-
import pydantic
|
7
|
-
|
8
6
|
from ..core.datetime_utils import serialize_datetime
|
9
7
|
|
8
|
+
try:
|
9
|
+
import pydantic.v1 as pydantic # type: ignore
|
10
|
+
except ImportError:
|
11
|
+
import pydantic # type: ignore
|
12
|
+
|
10
13
|
|
11
14
|
class ModelVersionExecConfigParameters(pydantic.BaseModel):
|
12
|
-
temperature: float
|
13
|
-
max_tokens: int
|
15
|
+
temperature: typing.Optional[float]
|
16
|
+
max_tokens: typing.Optional[int]
|
14
17
|
top_p: float
|
15
18
|
frequency_penalty: float
|
16
19
|
presence_penalty: float
|
@@ -3,8 +3,6 @@
|
|
3
3
|
import datetime as dt
|
4
4
|
import typing
|
5
5
|
|
6
|
-
import pydantic
|
7
|
-
|
8
6
|
from ..core.datetime_utils import serialize_datetime
|
9
7
|
from .model_type_deprecated import ModelTypeDeprecated
|
10
8
|
from .model_version_build_config import ModelVersionBuildConfig
|
@@ -12,6 +10,11 @@ from .model_version_exec_config import ModelVersionExecConfig
|
|
12
10
|
from .model_version_read_status_enum import ModelVersionReadStatusEnum
|
13
11
|
from .provider_enum import ProviderEnum
|
14
12
|
|
13
|
+
try:
|
14
|
+
import pydantic.v1 as pydantic # type: ignore
|
15
|
+
except ImportError:
|
16
|
+
import pydantic # type: ignore
|
17
|
+
|
15
18
|
|
16
19
|
class ModelVersionRead(pydantic.BaseModel):
|
17
20
|
id: str = pydantic.Field(description="Vellum-generated ID that uniquely identifies this model version.")
|
@@ -3,10 +3,13 @@
|
|
3
3
|
import datetime as dt
|
4
4
|
import typing
|
5
5
|
|
6
|
-
import pydantic
|
7
|
-
|
8
6
|
from ..core.datetime_utils import serialize_datetime
|
9
7
|
|
8
|
+
try:
|
9
|
+
import pydantic.v1 as pydantic # type: ignore
|
10
|
+
except ImportError:
|
11
|
+
import pydantic # type: ignore
|
12
|
+
|
10
13
|
|
11
14
|
class ModelVersionSandboxSnapshot(pydantic.BaseModel):
|
12
15
|
id: str = pydantic.Field(description="The ID of the sandbox snapshot.")
|
@@ -3,11 +3,14 @@
|
|
3
3
|
import datetime as dt
|
4
4
|
import typing
|
5
5
|
|
6
|
-
import pydantic
|
7
|
-
|
8
6
|
from ..core.datetime_utils import serialize_datetime
|
9
7
|
from .chat_message import ChatMessage
|
10
8
|
|
9
|
+
try:
|
10
|
+
import pydantic.v1 as pydantic # type: ignore
|
11
|
+
except ImportError:
|
12
|
+
import pydantic # type: ignore
|
13
|
+
|
11
14
|
|
12
15
|
class NodeInputCompiledChatHistoryValue(pydantic.BaseModel):
|
13
16
|
node_input_id: str
|
@@ -3,10 +3,13 @@
|
|
3
3
|
import datetime as dt
|
4
4
|
import typing
|
5
5
|
|
6
|
-
import pydantic
|
7
|
-
|
8
6
|
from ..core.datetime_utils import serialize_datetime
|
9
7
|
|
8
|
+
try:
|
9
|
+
import pydantic.v1 as pydantic # type: ignore
|
10
|
+
except ImportError:
|
11
|
+
import pydantic # type: ignore
|
12
|
+
|
10
13
|
|
11
14
|
class NodeInputCompiledJsonValue(pydantic.BaseModel):
|
12
15
|
node_input_id: str
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import datetime as dt
|
4
|
+
import typing
|
5
|
+
|
6
|
+
from ..core.datetime_utils import serialize_datetime
|
7
|
+
|
8
|
+
try:
|
9
|
+
import pydantic.v1 as pydantic # type: ignore
|
10
|
+
except ImportError:
|
11
|
+
import pydantic # type: ignore
|
12
|
+
|
13
|
+
|
14
|
+
class NodeInputCompiledNumberValue(pydantic.BaseModel):
|
15
|
+
node_input_id: str
|
16
|
+
key: str
|
17
|
+
value: typing.Optional[int]
|
18
|
+
|
19
|
+
def json(self, **kwargs: typing.Any) -> str:
|
20
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
21
|
+
return super().json(**kwargs_with_defaults)
|
22
|
+
|
23
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
24
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
25
|
+
return super().dict(**kwargs_with_defaults)
|
26
|
+
|
27
|
+
class Config:
|
28
|
+
frozen = True
|
29
|
+
smart_union = True
|
30
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -3,11 +3,14 @@
|
|
3
3
|
import datetime as dt
|
4
4
|
import typing
|
5
5
|
|
6
|
-
import pydantic
|
7
|
-
|
8
6
|
from ..core.datetime_utils import serialize_datetime
|
9
7
|
from .search_result import SearchResult
|
10
8
|
|
9
|
+
try:
|
10
|
+
import pydantic.v1 as pydantic # type: ignore
|
11
|
+
except ImportError:
|
12
|
+
import pydantic # type: ignore
|
13
|
+
|
11
14
|
|
12
15
|
class NodeInputCompiledSearchResultsValue(pydantic.BaseModel):
|
13
16
|
node_input_id: str
|