livekit-plugins-google 1.1.3__py3-none-any.whl → 1.1.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- livekit/plugins/google/llm.py +14 -0
- livekit/plugins/google/utils.py +7 -1
- livekit/plugins/google/version.py +1 -1
- {livekit_plugins_google-1.1.3.dist-info → livekit_plugins_google-1.1.5.dist-info}/METADATA +3 -3
- {livekit_plugins_google-1.1.3.dist-info → livekit_plugins_google-1.1.5.dist-info}/RECORD +6 -6
- {livekit_plugins_google-1.1.3.dist-info → livekit_plugins_google-1.1.5.dist-info}/WHEEL +0 -0
livekit/plugins/google/llm.py
CHANGED
@@ -59,8 +59,10 @@ class _LLMOptions:
|
|
59
59
|
presence_penalty: NotGivenOr[float]
|
60
60
|
frequency_penalty: NotGivenOr[float]
|
61
61
|
thinking_config: NotGivenOr[types.ThinkingConfigOrDict]
|
62
|
+
automatic_function_calling_config: NotGivenOr[types.AutomaticFunctionCallingConfigOrDict]
|
62
63
|
gemini_tools: NotGivenOr[list[_LLMTool]]
|
63
64
|
http_options: NotGivenOr[types.HttpOptions]
|
65
|
+
seed: NotGivenOr[int]
|
64
66
|
|
65
67
|
|
66
68
|
class LLM(llm.LLM):
|
@@ -80,8 +82,12 @@ class LLM(llm.LLM):
|
|
80
82
|
frequency_penalty: NotGivenOr[float] = NOT_GIVEN,
|
81
83
|
tool_choice: NotGivenOr[ToolChoice] = NOT_GIVEN,
|
82
84
|
thinking_config: NotGivenOr[types.ThinkingConfigOrDict] = NOT_GIVEN,
|
85
|
+
automatic_function_calling_config: NotGivenOr[
|
86
|
+
types.AutomaticFunctionCallingConfigOrDict
|
87
|
+
] = NOT_GIVEN,
|
83
88
|
gemini_tools: NotGivenOr[list[_LLMTool]] = NOT_GIVEN,
|
84
89
|
http_options: NotGivenOr[types.HttpOptions] = NOT_GIVEN,
|
90
|
+
seed: NotGivenOr[int] = NOT_GIVEN,
|
85
91
|
) -> None:
|
86
92
|
"""
|
87
93
|
Create a new instance of Google GenAI LLM.
|
@@ -107,6 +113,7 @@ class LLM(llm.LLM):
|
|
107
113
|
frequency_penalty (float, optional): Penalizes the model for repeating words. Defaults to None.
|
108
114
|
tool_choice (ToolChoice, optional): Specifies whether to use tools during response generation. Defaults to "auto".
|
109
115
|
thinking_config (ThinkingConfigOrDict, optional): The thinking configuration for response generation. Defaults to None.
|
116
|
+
automatic_function_calling_config (AutomaticFunctionCallingConfigOrDict, optional): The automatic function calling configuration for response generation. Defaults to None.
|
110
117
|
gemini_tools (list[LLMTool], optional): The Gemini-specific tools to use for the session.
|
111
118
|
http_options (HttpOptions, optional): The HTTP options to use for the session.
|
112
119
|
""" # noqa: E501
|
@@ -168,8 +175,10 @@ class LLM(llm.LLM):
|
|
168
175
|
presence_penalty=presence_penalty,
|
169
176
|
frequency_penalty=frequency_penalty,
|
170
177
|
thinking_config=thinking_config,
|
178
|
+
automatic_function_calling_config=automatic_function_calling_config,
|
171
179
|
gemini_tools=gemini_tools,
|
172
180
|
http_options=http_options,
|
181
|
+
seed=seed,
|
173
182
|
)
|
174
183
|
self._client = Client(
|
175
184
|
api_key=gemini_api_key,
|
@@ -256,11 +265,16 @@ class LLM(llm.LLM):
|
|
256
265
|
extra["presence_penalty"] = self._opts.presence_penalty
|
257
266
|
if is_given(self._opts.frequency_penalty):
|
258
267
|
extra["frequency_penalty"] = self._opts.frequency_penalty
|
268
|
+
if is_given(self._opts.seed):
|
269
|
+
extra["seed"] = self._opts.seed
|
259
270
|
|
260
271
|
# Add thinking config if thinking_budget is provided
|
261
272
|
if is_given(self._opts.thinking_config):
|
262
273
|
extra["thinking_config"] = self._opts.thinking_config
|
263
274
|
|
275
|
+
if is_given(self._opts.automatic_function_calling_config):
|
276
|
+
extra["automatic_function_calling"] = self._opts.automatic_function_calling_config
|
277
|
+
|
264
278
|
gemini_tools = gemini_tools if is_given(gemini_tools) else self._opts.gemini_tools
|
265
279
|
|
266
280
|
return LLMStream(
|
livekit/plugins/google/utils.py
CHANGED
@@ -28,7 +28,13 @@ def to_fnc_ctx(fncs: list[FunctionTool | RawFunctionTool]) -> list[types.Functio
|
|
28
28
|
for fnc in fncs:
|
29
29
|
if is_raw_function_tool(fnc):
|
30
30
|
info = get_raw_function_info(fnc)
|
31
|
-
tools.append(
|
31
|
+
tools.append(
|
32
|
+
types.FunctionDeclaration(
|
33
|
+
name=info.name,
|
34
|
+
description=info.raw_schema.get("description", ""),
|
35
|
+
parameters_json_schema=info.raw_schema.get("parameters", {}),
|
36
|
+
)
|
37
|
+
)
|
32
38
|
|
33
39
|
elif is_function_tool(fnc):
|
34
40
|
tools.append(_build_gemini_fnc(fnc))
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: livekit-plugins-google
|
3
|
-
Version: 1.1.
|
3
|
+
Version: 1.1.5
|
4
4
|
Summary: Agent Framework plugin for services from Google Cloud
|
5
5
|
Project-URL: Documentation, https://docs.livekit.io
|
6
6
|
Project-URL: Website, https://livekit.io/
|
@@ -21,8 +21,8 @@ Requires-Python: >=3.9.0
|
|
21
21
|
Requires-Dist: google-auth<3,>=2
|
22
22
|
Requires-Dist: google-cloud-speech<3,>=2
|
23
23
|
Requires-Dist: google-cloud-texttospeech<3,>=2.27
|
24
|
-
Requires-Dist: google-genai>=v1.
|
25
|
-
Requires-Dist: livekit-agents>=1.1.
|
24
|
+
Requires-Dist: google-genai>=v1.23.0
|
25
|
+
Requires-Dist: livekit-agents>=1.1.5
|
26
26
|
Description-Content-Type: text/markdown
|
27
27
|
|
28
28
|
# Google AI plugin for LiveKit Agents
|
@@ -1,17 +1,17 @@
|
|
1
1
|
livekit/plugins/google/__init__.py,sha256=XIyZ-iFnRBpaLtOJgVwojlB-a8GjdDugVFcjBpMEww8,1412
|
2
|
-
livekit/plugins/google/llm.py,sha256=
|
2
|
+
livekit/plugins/google/llm.py,sha256=PqRQk6E2XfWkTdDrtEtcHjknGZMGbkQgVLr8uTg7F-s,18960
|
3
3
|
livekit/plugins/google/log.py,sha256=GI3YWN5YzrafnUccljzPRS_ZALkMNk1i21IRnTl2vNA,69
|
4
4
|
livekit/plugins/google/models.py,sha256=hOpfbN_qdQ1ZTpCN9m9dvG2eb6WgQ3KE3WRpIeeM_T0,1569
|
5
5
|
livekit/plugins/google/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
6
|
livekit/plugins/google/stt.py,sha256=ssDMH5U1vQOLA44XMlovYWIR4UqVtZSge3YFN-zZ7Iw,24696
|
7
7
|
livekit/plugins/google/tools.py,sha256=tD5HVDHO5JfUF029Cx3axHMJec0Gxalkl7s1FDgxLzI,259
|
8
8
|
livekit/plugins/google/tts.py,sha256=YTfce55MWNJyDH4k8U1O2giOcrtccTs8vrkiW9GuBR0,15541
|
9
|
-
livekit/plugins/google/utils.py,sha256
|
10
|
-
livekit/plugins/google/version.py,sha256=
|
9
|
+
livekit/plugins/google/utils.py,sha256=6iihkKx76DDtLiHOoTU2ZXqzupBRY_gN3njpnwdmeqY,8829
|
10
|
+
livekit/plugins/google/version.py,sha256=OKtayGMVDYKyoKBO2yNM4kfRbH-PODJqECIiYhUzNWg,600
|
11
11
|
livekit/plugins/google/beta/__init__.py,sha256=5PnoG3Ux24bjzMSzmTeSVljE9EINivGcbWUEV6egGnM,216
|
12
12
|
livekit/plugins/google/beta/realtime/__init__.py,sha256=_fW2NMN22F-hnQ4xAJ_g5lPbR7CvM_xXzSWlUQY-E-U,188
|
13
13
|
livekit/plugins/google/beta/realtime/api_proto.py,sha256=NfE7xr2N3JOu7gVfWbAmDcEhs8vuZgMRu5vpScPJzsg,776
|
14
14
|
livekit/plugins/google/beta/realtime/realtime_api.py,sha256=tlAsTFsumqOavC9JT2SuQi_3eGYygZ3bbS-nEM7ea8Q,46293
|
15
|
-
livekit_plugins_google-1.1.
|
16
|
-
livekit_plugins_google-1.1.
|
17
|
-
livekit_plugins_google-1.1.
|
15
|
+
livekit_plugins_google-1.1.5.dist-info/METADATA,sha256=g6aRR1VIspmPtZ2C6VQ-cqZWx1gIpLtg4OFV1pbD01E,1907
|
16
|
+
livekit_plugins_google-1.1.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
17
|
+
livekit_plugins_google-1.1.5.dist-info/RECORD,,
|
File without changes
|