|
18 | 18 | import logging
|
19 | 19 | from typing import Any, Optional, Union
|
20 | 20 | from google.genai import _common
|
| 21 | +from google.genai import types as genai_types |
21 | 22 | from pydantic import Field
|
22 | 23 | from typing_extensions import TypedDict
|
23 | 24 |
|
@@ -2084,6 +2085,48 @@ class EvaluateDatasetOperationDict(TypedDict, total=False):
|
2084 | 2085 | ]
|
2085 | 2086 |
|
2086 | 2087 |
|
| 2088 | +class PromptTemplate(_common.BaseModel): |
| 2089 | + """A prompt template for creating prompts with variables.""" |
| 2090 | + |
| 2091 | + text: Optional[str] = Field(default=None, description="""""") |
| 2092 | + |
| 2093 | + |
| 2094 | +class PromptTemplateDict(TypedDict, total=False): |
| 2095 | + """A prompt template for creating prompts with variables.""" |
| 2096 | + |
| 2097 | + text: Optional[str] |
| 2098 | + """""" |
| 2099 | + |
| 2100 | + |
| 2101 | +PromptTemplateOrDict = Union[PromptTemplate, PromptTemplateDict] |
| 2102 | + |
| 2103 | + |
| 2104 | +class EvalRunInferenceConfig(_common.BaseModel): |
| 2105 | + """Optional parameters for inference.""" |
| 2106 | + |
| 2107 | + dest: Optional[str] = Field(default=None, description="""""") |
| 2108 | + prompt_template: Optional[str] = Field(default=None, description="""""") |
| 2109 | + generate_content_config: Optional[genai_types.GenerateContentConfig] = Field( |
| 2110 | + default=None, description="""""" |
| 2111 | + ) |
| 2112 | + |
| 2113 | + |
| 2114 | +class EvalRunInferenceConfigDict(TypedDict, total=False): |
| 2115 | + """Optional parameters for inference.""" |
| 2116 | + |
| 2117 | + dest: Optional[str] |
| 2118 | + """""" |
| 2119 | + |
| 2120 | + prompt_template: Optional[str] |
| 2121 | + """""" |
| 2122 | + |
| 2123 | + generate_content_config: Optional[genai_types.GenerateContentConfig] |
| 2124 | + """""" |
| 2125 | + |
| 2126 | + |
| 2127 | +EvalRunInferenceConfigOrDict = Union[EvalRunInferenceConfig, EvalRunInferenceConfigDict] |
| 2128 | + |
| 2129 | + |
2087 | 2130 | class EvalDataset(_common.BaseModel):
|
2088 | 2131 |
|
2089 | 2132 | file: Optional[str] = Field(default=None, description="""""")
|
|
0 commit comments