MCPcopy Index your code
hub / github.com/google/adk-python / InferenceConfig

Class InferenceConfig

src/google/adk/evaluation/base_eval_service.py:58–95  ·  view source on GitHub ↗

Contains configurations need to run inferences.

Source from the content-addressed store, hash-verified

56
57
58class InferenceConfig(BaseModel):
59 """Contains configurations need to run inferences."""
60
61 model_config = ConfigDict(
62 alias_generator=alias_generators.to_camel,
63 populate_by_name=True,
64 )
65
66 labels: Optional[dict[str, str]] = Field(
67 default=None,
68 description="""Labels with user-defined metadata to break down billed
69charges.""",
70 )
71
72 parallelism: int = Field(
73 default=4,
74 description="""Number of parallel inferences to run during an Eval. Few
75factors to consider while changing this value:
76
771) Your available quota with the model. Models tend to enforce per-minute or
78per-second SLAs. Using a larger value could result in the eval quickly consuming
79the quota.
80
812) The tools used by the Agent could also have their SLA. Using a larger value
82could also overwhelm those tools.""",
83 )
84
85 use_live: bool = Field(
86 default=False,
87 description="""Whether to use live (bidirectional streaming) mode for
88inference. This is required for Live API models (e.g., gemini-*-live-*).""",
89 )
90
91 live_timeout_seconds: int = Field(
92 default=DEFAULT_LIVE_TIMEOUT_SECONDS,
93 description="""Timeout in seconds for waiting for model turn completion in
94live mode.""",
95 )
96
97
98class InferenceRequest(BaseModel):

Calls

no outgoing calls