Skip to content

Commit d087b13

Browse files
Change exports
1 parent 59cdb86 commit d087b13

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

fishjam/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# pylint: disable=locally-disabled, no-name-in-module, import-error
99

1010
# Exceptions and Server Messages
11-
from fishjam import agent, errors, events, peer, room, version
11+
from fishjam import agent, errors, events, integrations, peer, room, version
1212
from fishjam._openapi_client.models import PeerMetadata
1313

1414
# API
@@ -42,6 +42,8 @@
4242
"room",
4343
"peer",
4444
"agent",
45+
"integrations",
4546
]
4647

48+
4749
__docformat__ = "restructuredtext"

fishjam/integrations/gemini.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from google.genai.client import DebugConfig
66
except ImportError:
77
raise ImportError(
8-
"To use the Fishjam Gemini integration, you need to import the `gemini` extra."
8+
"To use the Fishjam Gemini integration, you need to import the `gemini` extra. "
99
"Install it with `pip install 'fishjam-server-sdk[gemini]'`"
1010
)
1111

@@ -54,6 +54,13 @@ def create_client(
5454
debug_config: Optional[DebugConfig] = None,
5555
http_options: Optional[Union[types.HttpOptions, types.HttpOptionsDict]] = None,
5656
):
57+
"""Creates and configures a Fishjam-compatible Google GenAI Client.
58+
59+
See `genai.Client` for configuration options.
60+
61+
Returns:
62+
genai.Client: An instantiated and configured Gemini client.
63+
"""
5764
full_http_options = _add_fishjam_header(http_options)
5865

5966
return genai.Client(
@@ -68,10 +75,18 @@ def create_client(
6875

6976
@property
7077
def GeminiInputAudioSettings(self) -> AgentOutputOptions:
78+
"""Audio configuration required for Gemini input.
79+
80+
Gemini requires PCM16 audio at 16,000 Hz for correct processing.
81+
82+
Returns:
83+
AgentOutputOptions: Agent options compatible with the Gemini Live API.
84+
"""
7185
return AgentOutputOptions(
7286
audio_format="pcm16",
7387
audio_sample_rate=16_000,
7488
)
7589

7690

7791
GeminiIntegration = _GeminiIntegration()
92+
"""Integration with the Gemini Live API."""

0 commit comments

Comments
 (0)