updated context seeding to allow gemini 3.1 to greet the user
This commit is contained in:
@@ -70,7 +70,7 @@ fal = []
|
||||
fireworks = []
|
||||
fish = [ "ormsgpack>=1.7.0,<2", "pipecat-ai[websockets-base]" ]
|
||||
gladia = [ "pipecat-ai[websockets-base]" ]
|
||||
google = [ "google-cloud-speech>=2.33.0,<3", "google-cloud-texttospeech>=2.31.0,<3", "google-genai>=1.57.0,<2", "pipecat-ai[websockets-base]" ]
|
||||
google = [ "google-cloud-speech>=2.33.0,<3", "google-cloud-texttospeech>=2.31.0,<3", "google-genai>=1.68.0,<2", "pipecat-ai[websockets-base]" ]
|
||||
gradium = [ "pipecat-ai[websockets-base]" ]
|
||||
grok = []
|
||||
groq = [ "groq>=0.23.0,<2" ]
|
||||
|
||||
@@ -98,6 +98,7 @@ try:
|
||||
FunctionResponse,
|
||||
GenerationConfig,
|
||||
GroundingMetadata,
|
||||
HistoryConfig,
|
||||
HttpOptions,
|
||||
LiveConnectConfig,
|
||||
LiveServerMessage,
|
||||
@@ -1204,6 +1205,7 @@ class GeminiLiveLLMService(LLMService):
|
||||
input_audio_transcription=AudioTranscriptionConfig(),
|
||||
output_audio_transcription=AudioTranscriptionConfig(),
|
||||
session_resumption=SessionResumptionConfig(handle=session_resumption_handle),
|
||||
history_config=HistoryConfig(initial_history_in_client_content=True),
|
||||
)
|
||||
|
||||
# Add context window compression to configuration, if enabled
|
||||
@@ -1505,9 +1507,9 @@ class GeminiLiveLLMService(LLMService):
|
||||
await self.start_ttfb_metrics()
|
||||
|
||||
try:
|
||||
await self._session.send_client_content(
|
||||
turns=messages, turn_complete=self._inference_on_context_initialization
|
||||
)
|
||||
await self._session.send_client_content(turns=messages, turn_complete=False)
|
||||
if self._inference_on_context_initialization:
|
||||
await self._session.send_realtime_input(text=" ")
|
||||
except Exception as e:
|
||||
await self._handle_send_error(e)
|
||||
|
||||
|
||||
8
uv.lock
generated
8
uv.lock
generated
@@ -2086,7 +2086,7 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "google-genai"
|
||||
version = "1.67.0"
|
||||
version = "1.68.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "anyio" },
|
||||
@@ -2100,9 +2100,9 @@ dependencies = [
|
||||
{ name = "typing-extensions" },
|
||||
{ name = "websockets" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/a2/07/59a498f81f2c7b0649eacda2ea470b7fd8bd7149f20caba22962081bdd51/google_genai-1.67.0.tar.gz", hash = "sha256:897195a6a9742deb6de240b99227189ada8b2d901d61bdfba836c3092021eab6", size = 506972, upload-time = "2026-03-12T20:39:16.241Z" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/9c/2c/f059982dbcb658cc535c81bbcbe7e2c040d675f4b563b03cdb01018a4bc3/google_genai-1.68.0.tar.gz", hash = "sha256:ac30c0b8bc630f9372993a97e4a11dae0e36f2e10d7c55eacdca95a9fa14ca96", size = 511285, upload-time = "2026-03-18T01:03:18.243Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/6e/c2/562aa1f086e53529ffbeb5b43d5d8bc42c1b968102b5e2163fad005ce298/google_genai-1.67.0-py3-none-any.whl", hash = "sha256:58b0484ff2d4335fa53c724b489e9f807fcca8115d9cdbd8fdf341121fbd6d2d", size = 733542, upload-time = "2026-03-12T20:39:14.615Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/84/de/7d3ee9c94b74c3578ea4f88d45e8de9405902f857932334d81e89bce3dfa/google_genai-1.68.0-py3-none-any.whl", hash = "sha256:a1bc9919c0e2ea2907d1e319b65471d3d6d58c54822039a249fe1323e4178d15", size = 750912, upload-time = "2026-03-18T01:03:15.983Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -4819,7 +4819,7 @@ requires-dist = [
|
||||
{ name = "faster-whisper", marker = "extra == 'whisper'", specifier = "~=1.2.1" },
|
||||
{ name = "google-cloud-speech", marker = "extra == 'google'", specifier = ">=2.33.0,<3" },
|
||||
{ name = "google-cloud-texttospeech", marker = "extra == 'google'", specifier = ">=2.31.0,<3" },
|
||||
{ name = "google-genai", marker = "extra == 'google'", specifier = ">=1.57.0,<2" },
|
||||
{ name = "google-genai", marker = "extra == 'google'", specifier = ">=1.68.0,<2" },
|
||||
{ name = "groq", marker = "extra == 'groq'", specifier = ">=0.23.0,<2" },
|
||||
{ name = "hume", marker = "extra == 'hume'", specifier = ">=0.11.2,<1" },
|
||||
{ name = "kokoro-onnx", marker = "extra == 'kokoro'", specifier = ">=0.5.0,<1" },
|
||||
|
||||
Reference in New Issue
Block a user