vellum-ai 0.0.42__py3-none-any.whl → 0.0.44__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- vellum/__init__.py +20 -2
- vellum/client.py +5 -1
- 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 +5 -2
- vellum/resources/documents/client.py +5 -2
- vellum/resources/model_versions/client.py +5 -2
- vellum/resources/registered_prompts/client.py +19 -4
- vellum/resources/sandboxes/client.py +5 -2
- vellum/resources/test_suites/client.py +5 -2
- vellum/types/__init__.py +20 -2
- vellum/types/api_node_result.py +5 -2
- vellum/types/api_node_result_data.py +5 -2
- 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 -4
- 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 +6 -2
- 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 +6 -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 +5 -2
- vellum/types/model_version_read.py +7 -5
- 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_error_value.py +31 -0
- vellum/types/node_input_compiled_json_value.py +5 -2
- vellum/types/node_input_compiled_number_value.py +5 -2
- 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 +5 -2
- vellum/types/prompt_template_block_properties_request.py +5 -2
- vellum/types/prompt_template_block_request.py +5 -2
- vellum/types/provider_enum.py +10 -5
- 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 +5 -2
- vellum/types/search_weights_request.py +5 -2
- 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_error_result.py +30 -0
- vellum/types/templating_node_json_result.py +5 -2
- vellum/types/templating_node_number_result.py +5 -2
- 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_error_result.py +31 -0
- vellum/types/terminal_node_json_result.py +5 -2
- vellum/types/terminal_node_number_result.py +5 -2
- 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_error.py +30 -0
- vellum/types/vellum_error_code_enum.py +31 -0
- vellum/types/vellum_variable.py +5 -2
- vellum/types/vellum_variable_type.py +5 -0
- 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_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_error.py +37 -0
- vellum/types/workflow_result_event_output_data_json.py +5 -2
- vellum/types/workflow_result_event_output_data_number.py +5 -2
- 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.42.dist-info → vellum_ai-0.0.44.dist-info}/METADATA +2 -2
- vellum_ai-0.0.44.dist-info/RECORD +180 -0
- vellum/types/model_type_deprecated.py +0 -22
- vellum_ai-0.0.42.dist-info/RECORD +0 -175
- {vellum_ai-0.0.42.dist-info → vellum_ai-0.0.44.dist-info}/WHEEL +0 -0
@@ -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 NormalizedTokenLogProbs(pydantic.BaseModel):
|
12
15
|
token: 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 .slim_document import SlimDocument
|
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 PaginatedSlimDocumentList(pydantic.BaseModel):
|
13
16
|
count: typing.Optional[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 .prompt_node_result_data import PromptNodeResultData
|
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 PromptNodeResult(pydantic.BaseModel):
|
13
16
|
data: PromptNodeResultData
|
@@ -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 PromptNodeResultData(pydantic.BaseModel):
|
12
15
|
output_id: str
|
@@ -5,11 +5,14 @@ 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 .block_type_enum import BlockTypeEnum
|
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 PromptTemplateBlock(pydantic.BaseModel):
|
15
18
|
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 .prompt_template_block import PromptTemplateBlock
|
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 PromptTemplateBlockData(pydantic.BaseModel):
|
13
16
|
version: 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 .prompt_template_block_request import PromptTemplateBlockRequest
|
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 PromptTemplateBlockDataRequest(pydantic.BaseModel):
|
13
16
|
version: int
|
@@ -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 .chat_message_role import ChatMessageRole
|
12
10
|
from .vellum_variable_type import VellumVariableType
|
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 PromptTemplateBlockProperties(pydantic.BaseModel):
|
16
19
|
chat_role: typing.Optional[ChatMessageRole]
|
@@ -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 .chat_message_role import ChatMessageRole
|
12
10
|
from .vellum_variable_type import VellumVariableType
|
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 PromptTemplateBlockPropertiesRequest(pydantic.BaseModel):
|
16
19
|
chat_role: typing.Optional[ChatMessageRole]
|
@@ -5,11 +5,14 @@ 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 .block_type_enum import BlockTypeEnum
|
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 PromptTemplateBlockRequest(pydantic.BaseModel):
|
15
18
|
id: str
|
vellum/types/provider_enum.py
CHANGED
@@ -13,8 +13,9 @@ class ProviderEnum(str, enum.Enum):
|
|
13
13
|
* `GOOGLE` - Google
|
14
14
|
* `HOSTED` - Hosted
|
15
15
|
* `MOSAICML` - MosaicML
|
16
|
-
* `MYSTIC` - Mystic
|
17
16
|
* `OPENAI` - OpenAI
|
17
|
+
* `HUGGINGFACE` - HuggingFace
|
18
|
+
* `MYSTIC` - Mystic
|
18
19
|
* `PYQ` - Pyq
|
19
20
|
"""
|
20
21
|
|
@@ -23,8 +24,9 @@ class ProviderEnum(str, enum.Enum):
|
|
23
24
|
GOOGLE = "GOOGLE"
|
24
25
|
HOSTED = "HOSTED"
|
25
26
|
MOSAICML = "MOSAICML"
|
26
|
-
MYSTIC = "MYSTIC"
|
27
27
|
OPENAI = "OPENAI"
|
28
|
+
HUGGINGFACE = "HUGGINGFACE"
|
29
|
+
MYSTIC = "MYSTIC"
|
28
30
|
PYQ = "PYQ"
|
29
31
|
|
30
32
|
def visit(
|
@@ -34,8 +36,9 @@ class ProviderEnum(str, enum.Enum):
|
|
34
36
|
google: typing.Callable[[], T_Result],
|
35
37
|
hosted: typing.Callable[[], T_Result],
|
36
38
|
mosaicml: typing.Callable[[], T_Result],
|
37
|
-
mystic: typing.Callable[[], T_Result],
|
38
39
|
openai: typing.Callable[[], T_Result],
|
40
|
+
huggingface: typing.Callable[[], T_Result],
|
41
|
+
mystic: typing.Callable[[], T_Result],
|
39
42
|
pyq: typing.Callable[[], T_Result],
|
40
43
|
) -> T_Result:
|
41
44
|
if self is ProviderEnum.ANTHROPIC:
|
@@ -48,9 +51,11 @@ class ProviderEnum(str, enum.Enum):
|
|
48
51
|
return hosted()
|
49
52
|
if self is ProviderEnum.MOSAICML:
|
50
53
|
return mosaicml()
|
51
|
-
if self is ProviderEnum.MYSTIC:
|
52
|
-
return mystic()
|
53
54
|
if self is ProviderEnum.OPENAI:
|
54
55
|
return openai()
|
56
|
+
if self is ProviderEnum.HUGGINGFACE:
|
57
|
+
return huggingface()
|
58
|
+
if self is ProviderEnum.MYSTIC:
|
59
|
+
return mystic()
|
55
60
|
if self is ProviderEnum.PYQ:
|
56
61
|
return pyq()
|
@@ -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 RegisterPromptErrorResponse(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 RegisterPromptModelParametersRequest(pydantic.BaseModel):
|
12
15
|
temperature: float
|
@@ -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 RegisterPromptPrompt(pydantic.BaseModel):
|
12
15
|
id: str = pydantic.Field(description="The ID of the generated prompt.")
|
@@ -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 .prompt_template_block_data_request import PromptTemplateBlockDataRequest
|
10
8
|
from .registered_prompt_input_variable_request import RegisteredPromptInputVariableRequest
|
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 RegisterPromptPromptInfoRequest(pydantic.BaseModel):
|
14
17
|
prompt_syntax_version: typing.Optional[int]
|
@@ -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 .register_prompt_prompt import RegisterPromptPrompt
|
10
8
|
from .registered_prompt_deployment import RegisteredPromptDeployment
|
@@ -12,6 +10,11 @@ from .registered_prompt_model_version import RegisteredPromptModelVersion
|
|
12
10
|
from .registered_prompt_sandbox import RegisteredPromptSandbox
|
13
11
|
from .registered_prompt_sandbox_snapshot import RegisteredPromptSandboxSnapshot
|
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 RegisterPromptResponse(pydantic.BaseModel):
|
17
20
|
prompt: RegisterPromptPrompt = pydantic.Field(description="Information about the generated 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 RegisteredPromptDeployment(pydantic.BaseModel):
|
12
15
|
id: str = pydantic.Field(description="The ID of the generated deployment.")
|
@@ -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 .vellum_variable_type import VellumVariableType
|
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 RegisteredPromptInputVariableRequest(pydantic.BaseModel):
|
13
16
|
key: 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 RegisteredPromptModelVersion(pydantic.BaseModel):
|
12
15
|
id: str = pydantic.Field(description="The ID of the generated 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 RegisteredPromptSandbox(pydantic.BaseModel):
|
12
15
|
id: str = pydantic.Field(description="The ID of the generated sandbox.")
|
@@ -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 RegisteredPromptSandboxSnapshot(pydantic.BaseModel):
|
12
15
|
id: str = pydantic.Field(description="The ID of the generated 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 .evaluation_params import EvaluationParams
|
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 SandboxMetricInputParams(pydantic.BaseModel):
|
13
16
|
params: typing.Optional[EvaluationParams]
|
@@ -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 .evaluation_params_request import EvaluationParamsRequest
|
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 SandboxMetricInputParamsRequest(pydantic.BaseModel):
|
13
16
|
params: typing.Optional[EvaluationParamsRequest]
|
vellum/types/sandbox_scenario.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 .sandbox_metric_input_params import SandboxMetricInputParams
|
10
8
|
from .scenario_input import ScenarioInput
|
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 SandboxScenario(pydantic.BaseModel):
|
14
17
|
label: typing.Optional[str]
|
vellum/types/scenario_input.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 .chat_message import ChatMessage
|
10
8
|
from .scenario_input_type_enum import ScenarioInputTypeEnum
|
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 ScenarioInput(pydantic.BaseModel):
|
14
17
|
key: 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
7
|
from .chat_message_request import ChatMessageRequest
|
10
8
|
from .scenario_input_type_enum import ScenarioInputTypeEnum
|
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 ScenarioInputRequest(pydantic.BaseModel):
|
14
17
|
key: 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 SearchErrorResponse(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 .metadata_filter_config_request import MetadataFilterConfigRequest
|
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 SearchFiltersRequest(pydantic.BaseModel):
|
13
16
|
external_ids: typing.Optional[typing.List[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 .search_node_result_data import SearchNodeResultData
|
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 SearchNodeResult(pydantic.BaseModel):
|
13
16
|
data: SearchNodeResultData
|
@@ -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 SearchNodeResultData(pydantic.BaseModel):
|
13
16
|
results_output_id: str
|
@@ -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 .search_filters_request import SearchFiltersRequest
|
10
8
|
from .search_result_merging_request import SearchResultMergingRequest
|
11
9
|
from .search_weights_request import SearchWeightsRequest
|
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 SearchRequestOptionsRequest(pydantic.BaseModel):
|
15
18
|
limit: typing.Optional[int] = pydantic.Field(description="The maximum number of results to return.")
|
vellum/types/search_response.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 .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 SearchResponse(pydantic.BaseModel):
|
13
16
|
results: typing.List[SearchResult] = pydantic.Field(
|
vellum/types/search_result.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 .search_result_document import SearchResultDocument
|
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 SearchResult(pydantic.BaseModel):
|
13
16
|
text: str = pydantic.Field(description="The text of the chunk that matched the search query.")
|
@@ -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 SearchResultDocument(pydantic.BaseModel):
|
12
15
|
id: str = pydantic.Field(description="The ID of the document.")
|
@@ -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 SearchResultMergingRequest(pydantic.BaseModel):
|
12
15
|
enabled: typing.Optional[bool] = pydantic.Field(description="Whether to enable merging results")
|
@@ -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 SearchWeightsRequest(pydantic.BaseModel):
|
12
15
|
semantic_similarity: typing.Optional[float] = pydantic.Field(
|