vellum-ai 0.8.4__py3-none-any.whl → 0.8.6__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. vellum/__init__.py +64 -104
  2. vellum/client.py +17 -17
  3. vellum/core/client_wrapper.py +1 -1
  4. vellum/resources/__init__.py +2 -2
  5. vellum/resources/ad_hoc/client.py +372 -0
  6. vellum/types/__init__.py +62 -102
  7. vellum/types/ad_hoc_execute_prompt_event.py +14 -0
  8. vellum/types/ad_hoc_expand_meta_request.py +33 -0
  9. vellum/types/ad_hoc_fulfilled_prompt_execution_meta.py +27 -0
  10. vellum/types/{open_api_const_property_request.py → ad_hoc_initiated_prompt_execution_meta.py} +4 -6
  11. vellum/types/{open_api_boolean_property_request.py → ad_hoc_rejected_prompt_execution_meta.py} +5 -6
  12. vellum/types/{tik_token_tokenizer_config_request.py → ad_hoc_streaming_prompt_execution_meta.py} +3 -4
  13. vellum/types/{open_api_one_of_property.py → chat_message_prompt_block_properties_request.py} +10 -9
  14. vellum/types/chat_message_prompt_block_request.py +36 -0
  15. vellum/types/{ml_model_developer_enum_value_label.py → ephemeral_prompt_cache_config_request.py} +4 -5
  16. vellum/types/ephemeral_prompt_cache_config_type_enum.py +5 -0
  17. vellum/types/fulfilled_ad_hoc_execute_prompt_event.py +28 -0
  18. vellum/types/function_definition_prompt_block_properties_request.py +42 -0
  19. vellum/types/function_definition_prompt_block_request.py +30 -0
  20. vellum/types/generate_response.py +3 -20
  21. vellum/types/{hugging_face_tokenizer_config.py → initiated_ad_hoc_execute_prompt_event.py} +6 -5
  22. vellum/types/{ml_model_display_tag_enum_value_label.py → jinja_prompt_block_properties_request.py} +5 -5
  23. vellum/types/jinja_prompt_block_request.py +30 -0
  24. vellum/types/ml_model_usage.py +2 -0
  25. vellum/types/plain_text_prompt_block_request.py +29 -0
  26. vellum/types/prompt_block_request.py +19 -0
  27. vellum/types/prompt_block_state.py +5 -0
  28. vellum/types/{prompt_deployment_expand_meta_request_request.py → prompt_deployment_expand_meta_request.py} +1 -1
  29. vellum/types/prompt_parameters_request.py +27 -0
  30. vellum/types/{open_api_boolean_property.py → prompt_request_chat_history_input_request.py} +7 -7
  31. vellum/types/prompt_request_input_request.py +10 -0
  32. vellum/types/{hugging_face_tokenizer_config_request.py → prompt_request_json_input_request.py} +6 -6
  33. vellum/types/{tik_token_tokenizer_config.py → prompt_request_string_input_request.py} +6 -5
  34. vellum/types/rejected_ad_hoc_execute_prompt_event.py +28 -0
  35. vellum/types/rich_text_child_block_request.py +7 -0
  36. vellum/types/rich_text_prompt_block_request.py +30 -0
  37. vellum/types/streaming_ad_hoc_execute_prompt_event.py +33 -0
  38. vellum/types/variable_prompt_block_request.py +29 -0
  39. vellum/types/{ml_model_family_enum_value_label.py → vellum_variable_request.py} +5 -4
  40. {vellum_ai-0.8.4.dist-info → vellum_ai-0.8.6.dist-info}/METADATA +1 -1
  41. {vellum_ai-0.8.4.dist-info → vellum_ai-0.8.6.dist-info}/RECORD +44 -64
  42. vellum/resources/ml_models/client.py +0 -948
  43. vellum/types/hosted_by_enum.py +0 -26
  44. vellum/types/ml_model_developer.py +0 -27
  45. vellum/types/ml_model_display_config_labelled.py +0 -26
  46. vellum/types/ml_model_display_config_request.py +0 -26
  47. vellum/types/ml_model_display_tag.py +0 -7
  48. vellum/types/ml_model_exec_config.py +0 -34
  49. vellum/types/ml_model_exec_config_request.py +0 -34
  50. vellum/types/ml_model_family.py +0 -29
  51. vellum/types/ml_model_feature.py +0 -18
  52. vellum/types/ml_model_parameter_config.py +0 -32
  53. vellum/types/ml_model_parameter_config_request.py +0 -32
  54. vellum/types/ml_model_read.py +0 -92
  55. vellum/types/ml_model_request_authorization_config.py +0 -20
  56. vellum/types/ml_model_request_authorization_config_request.py +0 -20
  57. vellum/types/ml_model_request_authorization_config_type_enum.py +0 -5
  58. vellum/types/ml_model_request_config.py +0 -22
  59. vellum/types/ml_model_request_config_request.py +0 -22
  60. vellum/types/ml_model_response_config.py +0 -21
  61. vellum/types/ml_model_response_config_request.py +0 -21
  62. vellum/types/ml_model_tokenizer_config.py +0 -7
  63. vellum/types/ml_model_tokenizer_config_request.py +0 -7
  64. vellum/types/open_api_array_property.py +0 -41
  65. vellum/types/open_api_array_property_request.py +0 -41
  66. vellum/types/open_api_const_property.py +0 -26
  67. vellum/types/open_api_integer_property.py +0 -30
  68. vellum/types/open_api_integer_property_request.py +0 -30
  69. vellum/types/open_api_number_property.py +0 -31
  70. vellum/types/open_api_number_property_request.py +0 -31
  71. vellum/types/open_api_object_property.py +0 -40
  72. vellum/types/open_api_object_property_request.py +0 -40
  73. vellum/types/open_api_one_of_property_request.py +0 -33
  74. vellum/types/open_api_property.py +0 -27
  75. vellum/types/open_api_property_request.py +0 -27
  76. vellum/types/open_api_ref_property.py +0 -26
  77. vellum/types/open_api_ref_property_request.py +0 -26
  78. vellum/types/open_api_string_property.py +0 -30
  79. vellum/types/open_api_string_property_request.py +0 -30
  80. vellum/types/paginated_ml_model_read_list.py +0 -23
  81. vellum/types/visibility_enum.py +0 -5
  82. /vellum/resources/{ml_models → ad_hoc}/__init__.py +0 -0
  83. {vellum_ai-0.8.4.dist-info → vellum_ai-0.8.6.dist-info}/LICENSE +0 -0
  84. {vellum_ai-0.8.4.dist-info → vellum_ai-0.8.6.dist-info}/WHEEL +0 -0
@@ -1,26 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import typing
4
-
5
- HostedByEnum = typing.Union[
6
- typing.Literal[
7
- "ANTHROPIC",
8
- "AWS_BEDROCK",
9
- "AZURE_OPENAI",
10
- "COHERE",
11
- "CUSTOM",
12
- "FIREWORKS_AI",
13
- "GOOGLE",
14
- "GOOGLE_VERTEX_AI",
15
- "GROQ",
16
- "HUGGINGFACE",
17
- "IBM_WATSONX",
18
- "MOSAICML",
19
- "MYSTIC",
20
- "OPENAI",
21
- "OPENPIPE",
22
- "PYQ",
23
- "REPLICATE",
24
- ],
25
- typing.Any,
26
- ]
@@ -1,27 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import typing
4
-
5
- MlModelDeveloper = typing.Union[
6
- typing.Literal[
7
- "01_AI",
8
- "AMAZON",
9
- "ANTHROPIC",
10
- "COHERE",
11
- "ELUTHERAI",
12
- "FIREWORKS_AI",
13
- "GOOGLE",
14
- "HUGGINGFACE",
15
- "IBM",
16
- "META",
17
- "MISTRAL_AI",
18
- "MOSAICML",
19
- "NOUS_RESEARCH",
20
- "OPENAI",
21
- "OPENCHAT",
22
- "OPENPIPE",
23
- "TII",
24
- "WIZARDLM",
25
- ],
26
- typing.Any,
27
- ]
@@ -1,26 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
- import typing
5
- from .ml_model_display_tag_enum_value_label import MlModelDisplayTagEnumValueLabel
6
- import pydantic
7
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
8
-
9
-
10
- class MlModelDisplayConfigLabelled(UniversalBaseModel):
11
- label: str
12
- description: str
13
- tags: typing.List[MlModelDisplayTagEnumValueLabel]
14
- default_display_priority: typing.Optional[float] = pydantic.Field(default=None)
15
- """
16
- Can only be set when using an internal service token.
17
- """
18
-
19
- if IS_PYDANTIC_V2:
20
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
21
- else:
22
-
23
- class Config:
24
- frozen = True
25
- smart_union = True
26
- extra = pydantic.Extra.allow
@@ -1,26 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
- import typing
5
- from .ml_model_display_tag import MlModelDisplayTag
6
- import pydantic
7
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
8
-
9
-
10
- class MlModelDisplayConfigRequest(UniversalBaseModel):
11
- label: str
12
- description: str
13
- tags: typing.List[MlModelDisplayTag]
14
- default_display_priority: typing.Optional[float] = pydantic.Field(default=None)
15
- """
16
- Can only be set when using an internal service token.
17
- """
18
-
19
- if IS_PYDANTIC_V2:
20
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
21
- else:
22
-
23
- class Config:
24
- frozen = True
25
- smart_union = True
26
- extra = pydantic.Extra.allow
@@ -1,7 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import typing
4
-
5
- MlModelDisplayTag = typing.Union[
6
- typing.Literal["TEXT", "CHAT", "OPEN_SOURCE", "FINETUNED", "NEW", "ALPHA", "BETA", "DEPRECATED"], typing.Any
7
- ]
@@ -1,34 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
- import typing
5
- from .ml_model_feature import MlModelFeature
6
- import pydantic
7
- from .ml_model_tokenizer_config import MlModelTokenizerConfig
8
- from .ml_model_request_config import MlModelRequestConfig
9
- from .ml_model_response_config import MlModelResponseConfig
10
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
11
-
12
-
13
- class MlModelExecConfig(UniversalBaseModel):
14
- model_identifier: str
15
- base_url: str
16
- metadata: typing.Dict[str, typing.Optional[typing.Any]]
17
- features: typing.List[MlModelFeature]
18
- force_system_credentials: typing.Optional[bool] = pydantic.Field(default=None)
19
- """
20
- Can only be set when using an internal service token.
21
- """
22
-
23
- tokenizer_config: typing.Optional[MlModelTokenizerConfig] = None
24
- request_config: typing.Optional[MlModelRequestConfig] = None
25
- response_config: typing.Optional[MlModelResponseConfig] = None
26
-
27
- if IS_PYDANTIC_V2:
28
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
29
- else:
30
-
31
- class Config:
32
- frozen = True
33
- smart_union = True
34
- extra = pydantic.Extra.allow
@@ -1,34 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
- import typing
5
- from .ml_model_feature import MlModelFeature
6
- import pydantic
7
- from .ml_model_tokenizer_config_request import MlModelTokenizerConfigRequest
8
- from .ml_model_request_config_request import MlModelRequestConfigRequest
9
- from .ml_model_response_config_request import MlModelResponseConfigRequest
10
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
11
-
12
-
13
- class MlModelExecConfigRequest(UniversalBaseModel):
14
- model_identifier: str
15
- base_url: str
16
- metadata: typing.Dict[str, typing.Optional[typing.Any]]
17
- features: typing.List[MlModelFeature]
18
- force_system_credentials: typing.Optional[bool] = pydantic.Field(default=None)
19
- """
20
- Can only be set when using an internal service token.
21
- """
22
-
23
- tokenizer_config: typing.Optional[MlModelTokenizerConfigRequest] = None
24
- request_config: typing.Optional[MlModelRequestConfigRequest] = None
25
- response_config: typing.Optional[MlModelResponseConfigRequest] = None
26
-
27
- if IS_PYDANTIC_V2:
28
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
29
- else:
30
-
31
- class Config:
32
- frozen = True
33
- smart_union = True
34
- extra = pydantic.Extra.allow
@@ -1,29 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import typing
4
-
5
- MlModelFamily = typing.Union[
6
- typing.Literal[
7
- "CAPYBARA",
8
- "CHAT_GPT",
9
- "CLAUDE",
10
- "COHERE",
11
- "FALCON",
12
- "GEMINI",
13
- "GRANITE",
14
- "GPT3",
15
- "FIREWORKS",
16
- "LLAMA2",
17
- "LLAMA3",
18
- "MISTRAL",
19
- "MPT",
20
- "OPENCHAT",
21
- "PALM",
22
- "SOLAR",
23
- "TITAN",
24
- "WIZARD",
25
- "YI",
26
- "ZEPHYR",
27
- ],
28
- typing.Any,
29
- ]
@@ -1,18 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import typing
4
-
5
- MlModelFeature = typing.Union[
6
- typing.Literal[
7
- "TEXT",
8
- "CHAT_MESSAGE_SYSTEM",
9
- "CHAT_MESSAGE_USER",
10
- "CHAT_MESSAGE_ASSISTANT",
11
- "CHAT_MESSAGE_ASSISTANT_UNTERMINATED",
12
- "CHAT_MESSAGE_FUNCTION_CALL",
13
- "CHAT_MESSAGE_IMAGE",
14
- "FUNCTION_DEFINITION",
15
- "STREAMING_SUPPORT",
16
- ],
17
- typing.Any,
18
- ]
@@ -1,32 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
- import typing
5
- from .open_api_number_property import OpenApiNumberProperty
6
- from .open_api_integer_property import OpenApiIntegerProperty
7
- from .open_api_array_property import OpenApiArrayProperty
8
- from .open_api_object_property import OpenApiObjectProperty
9
- from .open_api_property import OpenApiProperty
10
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
11
- import pydantic
12
-
13
-
14
- class MlModelParameterConfig(UniversalBaseModel):
15
- temperature: typing.Optional[OpenApiNumberProperty] = None
16
- max_tokens: typing.Optional[OpenApiIntegerProperty] = None
17
- stop: typing.Optional[OpenApiArrayProperty] = None
18
- top_p: typing.Optional[OpenApiNumberProperty] = None
19
- top_k: typing.Optional[OpenApiIntegerProperty] = None
20
- frequency_penalty: typing.Optional[OpenApiNumberProperty] = None
21
- presence_penalty: typing.Optional[OpenApiNumberProperty] = None
22
- logit_bias: typing.Optional[OpenApiObjectProperty] = None
23
- custom_parameters: typing.Optional[typing.Dict[str, typing.Optional[OpenApiProperty]]] = None
24
-
25
- if IS_PYDANTIC_V2:
26
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
27
- else:
28
-
29
- class Config:
30
- frozen = True
31
- smart_union = True
32
- extra = pydantic.Extra.allow
@@ -1,32 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
- import typing
5
- from .open_api_number_property_request import OpenApiNumberPropertyRequest
6
- from .open_api_integer_property_request import OpenApiIntegerPropertyRequest
7
- from .open_api_array_property_request import OpenApiArrayPropertyRequest
8
- from .open_api_object_property_request import OpenApiObjectPropertyRequest
9
- from .open_api_property_request import OpenApiPropertyRequest
10
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
11
- import pydantic
12
-
13
-
14
- class MlModelParameterConfigRequest(UniversalBaseModel):
15
- temperature: typing.Optional[OpenApiNumberPropertyRequest] = None
16
- max_tokens: typing.Optional[OpenApiIntegerPropertyRequest] = None
17
- stop: typing.Optional[OpenApiArrayPropertyRequest] = None
18
- top_p: typing.Optional[OpenApiNumberPropertyRequest] = None
19
- top_k: typing.Optional[OpenApiIntegerPropertyRequest] = None
20
- frequency_penalty: typing.Optional[OpenApiNumberPropertyRequest] = None
21
- presence_penalty: typing.Optional[OpenApiNumberPropertyRequest] = None
22
- logit_bias: typing.Optional[OpenApiObjectPropertyRequest] = None
23
- custom_parameters: typing.Optional[typing.Dict[str, typing.Optional[OpenApiPropertyRequest]]] = None
24
-
25
- if IS_PYDANTIC_V2:
26
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
27
- else:
28
-
29
- class Config:
30
- frozen = True
31
- smart_union = True
32
- extra = pydantic.Extra.allow
@@ -1,92 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
- import pydantic
5
- from .ml_model_family_enum_value_label import MlModelFamilyEnumValueLabel
6
- from .hosted_by_enum import HostedByEnum
7
- from .ml_model_developer_enum_value_label import MlModelDeveloperEnumValueLabel
8
- import typing
9
- from .visibility_enum import VisibilityEnum
10
- from .ml_model_exec_config import MlModelExecConfig
11
- from .ml_model_parameter_config import MlModelParameterConfig
12
- from .ml_model_display_config_labelled import MlModelDisplayConfigLabelled
13
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
14
-
15
-
16
- class MlModelRead(UniversalBaseModel):
17
- """
18
- An ML Model that your Workspace has access to.
19
- """
20
-
21
- id: str
22
- name: str = pydantic.Field()
23
- """
24
- The unique name of the ML Model.
25
- """
26
-
27
- family: MlModelFamilyEnumValueLabel = pydantic.Field()
28
- """
29
- The family of the ML Model.
30
- """
31
-
32
- hosted_by: HostedByEnum = pydantic.Field()
33
- """
34
- The organization hosting the ML Model.
35
-
36
- - `ANTHROPIC` - Anthropic
37
- - `AWS_BEDROCK` - AWS Bedrock
38
- - `AZURE_OPENAI` - Azure OpenAI
39
- - `COHERE` - Cohere
40
- - `CUSTOM` - Custom
41
- - `FIREWORKS_AI` - Fireworks AI
42
- - `GOOGLE` - Google
43
- - `GOOGLE_VERTEX_AI` - Google Vertex AI
44
- - `GROQ` - Groq
45
- - `HUGGINGFACE` - HuggingFace
46
- - `IBM_WATSONX` - IBM WatsonX
47
- - `MOSAICML` - MosaicML
48
- - `MYSTIC` - Mystic
49
- - `OPENAI` - OpenAI
50
- - `OPENPIPE` - OpenPipe
51
- - `PYQ` - Pyq
52
- - `REPLICATE` - Replicate
53
- """
54
-
55
- developed_by: MlModelDeveloperEnumValueLabel = pydantic.Field()
56
- """
57
- The organization that developed the ML Model.
58
- """
59
-
60
- visibility: typing.Optional[VisibilityEnum] = pydantic.Field(default=None)
61
- """
62
- The visibility of the ML Model.
63
-
64
- - `DEFAULT` - Default
65
- - `PUBLIC` - Public
66
- - `PRIVATE` - Private
67
- - `DISABLED` - Disabled
68
- """
69
-
70
- exec_config: MlModelExecConfig = pydantic.Field()
71
- """
72
- Configuration for how to execute the ML Model.
73
- """
74
-
75
- parameter_config: MlModelParameterConfig = pydantic.Field()
76
- """
77
- Configuration for the ML Model's parameters.
78
- """
79
-
80
- display_config: MlModelDisplayConfigLabelled = pydantic.Field()
81
- """
82
- Configuration for how to display the ML Model.
83
- """
84
-
85
- if IS_PYDANTIC_V2:
86
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
87
- else:
88
-
89
- class Config:
90
- frozen = True
91
- smart_union = True
92
- extra = pydantic.Extra.allow
@@ -1,20 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
- from .ml_model_request_authorization_config_type_enum import MlModelRequestAuthorizationConfigTypeEnum
5
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
- import typing
7
- import pydantic
8
-
9
-
10
- class MlModelRequestAuthorizationConfig(UniversalBaseModel):
11
- type: MlModelRequestAuthorizationConfigTypeEnum
12
-
13
- if IS_PYDANTIC_V2:
14
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
15
- else:
16
-
17
- class Config:
18
- frozen = True
19
- smart_union = True
20
- extra = pydantic.Extra.allow
@@ -1,20 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
- from .ml_model_request_authorization_config_type_enum import MlModelRequestAuthorizationConfigTypeEnum
5
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
- import typing
7
- import pydantic
8
-
9
-
10
- class MlModelRequestAuthorizationConfigRequest(UniversalBaseModel):
11
- type: MlModelRequestAuthorizationConfigTypeEnum
12
-
13
- if IS_PYDANTIC_V2:
14
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
15
- else:
16
-
17
- class Config:
18
- frozen = True
19
- smart_union = True
20
- extra = pydantic.Extra.allow
@@ -1,5 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import typing
4
-
5
- MlModelRequestAuthorizationConfigTypeEnum = typing.Union[typing.Literal["BEARER_TOKEN", "API_KEY"], typing.Any]
@@ -1,22 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
- import typing
5
- from .ml_model_request_authorization_config import MlModelRequestAuthorizationConfig
6
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
- import pydantic
8
-
9
-
10
- class MlModelRequestConfig(UniversalBaseModel):
11
- headers: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None
12
- authorization: typing.Optional[MlModelRequestAuthorizationConfig] = None
13
- body_template: typing.Optional[str] = None
14
-
15
- if IS_PYDANTIC_V2:
16
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
17
- else:
18
-
19
- class Config:
20
- frozen = True
21
- smart_union = True
22
- extra = pydantic.Extra.allow
@@ -1,22 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
- import typing
5
- from .ml_model_request_authorization_config_request import MlModelRequestAuthorizationConfigRequest
6
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
- import pydantic
8
-
9
-
10
- class MlModelRequestConfigRequest(UniversalBaseModel):
11
- headers: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None
12
- authorization: typing.Optional[MlModelRequestAuthorizationConfigRequest] = None
13
- body_template: typing.Optional[str] = None
14
-
15
- if IS_PYDANTIC_V2:
16
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
17
- else:
18
-
19
- class Config:
20
- frozen = True
21
- smart_union = True
22
- extra = pydantic.Extra.allow
@@ -1,21 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
- import typing
5
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
- import pydantic
7
-
8
-
9
- class MlModelResponseConfig(UniversalBaseModel):
10
- result_path: typing.Optional[str] = None
11
- result_extraction_regex: typing.Optional[str] = None
12
- result_substitution_regexes: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None
13
-
14
- if IS_PYDANTIC_V2:
15
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
16
- else:
17
-
18
- class Config:
19
- frozen = True
20
- smart_union = True
21
- extra = pydantic.Extra.allow
@@ -1,21 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
- import typing
5
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
- import pydantic
7
-
8
-
9
- class MlModelResponseConfigRequest(UniversalBaseModel):
10
- result_path: typing.Optional[str] = None
11
- result_extraction_regex: typing.Optional[str] = None
12
- result_substitution_regexes: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None
13
-
14
- if IS_PYDANTIC_V2:
15
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
16
- else:
17
-
18
- class Config:
19
- frozen = True
20
- smart_union = True
21
- extra = pydantic.Extra.allow
@@ -1,7 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import typing
4
- from .hugging_face_tokenizer_config import HuggingFaceTokenizerConfig
5
- from .tik_token_tokenizer_config import TikTokenTokenizerConfig
6
-
7
- MlModelTokenizerConfig = typing.Union[HuggingFaceTokenizerConfig, TikTokenTokenizerConfig]
@@ -1,7 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import typing
4
- from .hugging_face_tokenizer_config_request import HuggingFaceTokenizerConfigRequest
5
- from .tik_token_tokenizer_config_request import TikTokenTokenizerConfigRequest
6
-
7
- MlModelTokenizerConfigRequest = typing.Union[HuggingFaceTokenizerConfigRequest, TikTokenTokenizerConfigRequest]
@@ -1,41 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- from __future__ import annotations
4
- from ..core.pydantic_utilities import UniversalBaseModel
5
- import typing
6
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
- import pydantic
8
- from ..core.pydantic_utilities import update_forward_refs
9
-
10
-
11
- class OpenApiArrayProperty(UniversalBaseModel):
12
- """
13
- An OpenAPI specification of a property with type 'array'
14
- """
15
-
16
- type: typing.Literal["array"] = "array"
17
- min_items: typing.Optional[int] = None
18
- max_items: typing.Optional[int] = None
19
- unique_items: typing.Optional[bool] = None
20
- items: "OpenApiProperty"
21
- prefix_items: typing.Optional[typing.List["OpenApiProperty"]] = None
22
- contains: typing.Optional["OpenApiProperty"] = None
23
- min_contains: typing.Optional[int] = None
24
- max_contains: typing.Optional[int] = None
25
- default: typing.Optional[typing.List[typing.Optional[typing.Any]]] = None
26
- title: typing.Optional[str] = None
27
- description: typing.Optional[str] = None
28
-
29
- if IS_PYDANTIC_V2:
30
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
31
- else:
32
-
33
- class Config:
34
- frozen = True
35
- smart_union = True
36
- extra = pydantic.Extra.allow
37
-
38
-
39
- from .open_api_property import OpenApiProperty # noqa: E402
40
-
41
- update_forward_refs(OpenApiArrayProperty)
@@ -1,41 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- from __future__ import annotations
4
- from ..core.pydantic_utilities import UniversalBaseModel
5
- import typing
6
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
- import pydantic
8
- from ..core.pydantic_utilities import update_forward_refs
9
-
10
-
11
- class OpenApiArrayPropertyRequest(UniversalBaseModel):
12
- """
13
- An OpenAPI specification of a property with type 'array'
14
- """
15
-
16
- type: typing.Literal["array"] = "array"
17
- min_items: typing.Optional[int] = None
18
- max_items: typing.Optional[int] = None
19
- unique_items: typing.Optional[bool] = None
20
- items: "OpenApiPropertyRequest"
21
- prefix_items: typing.Optional[typing.List["OpenApiPropertyRequest"]] = None
22
- contains: typing.Optional["OpenApiPropertyRequest"] = None
23
- min_contains: typing.Optional[int] = None
24
- max_contains: typing.Optional[int] = None
25
- default: typing.Optional[typing.List[typing.Optional[typing.Any]]] = None
26
- title: typing.Optional[str] = None
27
- description: typing.Optional[str] = None
28
-
29
- if IS_PYDANTIC_V2:
30
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
31
- else:
32
-
33
- class Config:
34
- frozen = True
35
- smart_union = True
36
- extra = pydantic.Extra.allow
37
-
38
-
39
- from .open_api_property_request import OpenApiPropertyRequest # noqa: E402
40
-
41
- update_forward_refs(OpenApiArrayPropertyRequest)
@@ -1,26 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- from ..core.pydantic_utilities import UniversalBaseModel
4
- import typing
5
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
- import pydantic
7
-
8
-
9
- class OpenApiConstProperty(UniversalBaseModel):
10
- """
11
- An OpenAPI specification of a property with type 'const'
12
- """
13
-
14
- type: typing.Literal["const"] = "const"
15
- title: typing.Optional[str] = None
16
- description: typing.Optional[str] = None
17
- const: str
18
-
19
- if IS_PYDANTIC_V2:
20
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
21
- else:
22
-
23
- class Config:
24
- frozen = True
25
- smart_union = True
26
- extra = pydantic.Extra.allow