Testing with gemini-exp-1114. Bug fix
This commit is contained in:
@@ -217,7 +217,11 @@ async def main():
|
|||||||
voice_id="79a125e8-cd45-4c13-8a67-188112f4dd22", # British Lady
|
voice_id="79a125e8-cd45-4c13-8a67-188112f4dd22", # British Lady
|
||||||
)
|
)
|
||||||
|
|
||||||
llm = GoogleLLMService(model="gemini-1.5-flash-latest", api_key=os.getenv("GOOGLE_API_KEY"))
|
llm = GoogleLLMService(
|
||||||
|
model="gemini-1.5-flash-latest",
|
||||||
|
# model="gemini-exp-1114",
|
||||||
|
api_key=os.getenv("GOOGLE_API_KEY"),
|
||||||
|
)
|
||||||
|
|
||||||
messages = [
|
messages = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -64,7 +64,11 @@ async def main():
|
|||||||
voice_id="79a125e8-cd45-4c13-8a67-188112f4dd22", # British Lady
|
voice_id="79a125e8-cd45-4c13-8a67-188112f4dd22", # British Lady
|
||||||
)
|
)
|
||||||
|
|
||||||
llm = GoogleLLMService(model="gemini-1.5-flash-latest", api_key=os.getenv("GOOGLE_API_KEY"))
|
llm = GoogleLLMService(
|
||||||
|
model="gemini-1.5-flash-latest",
|
||||||
|
# model="gemini-exp-1114",
|
||||||
|
api_key=os.getenv("GOOGLE_API_KEY"),
|
||||||
|
)
|
||||||
llm.register_function("get_weather", get_weather)
|
llm.register_function("get_weather", get_weather)
|
||||||
llm.register_function("get_image", get_image)
|
llm.register_function("get_image", get_image)
|
||||||
|
|
||||||
@@ -151,7 +155,6 @@ indicate you should use the get_image tool are:
|
|||||||
allow_interruptions=True,
|
allow_interruptions=True,
|
||||||
enable_metrics=True,
|
enable_metrics=True,
|
||||||
enable_usage_metrics=True,
|
enable_usage_metrics=True,
|
||||||
report_only_initial_ttfb=True,
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -281,9 +281,10 @@ class GoogleAssistantContextAggregator(OpenAIAssistantContextAggregator):
|
|||||||
)
|
)
|
||||||
run_llm = not bool(self._function_calls_in_progress)
|
run_llm = not bool(self._function_calls_in_progress)
|
||||||
else:
|
else:
|
||||||
self._context.add_message(
|
if aggregation.strip():
|
||||||
glm.Content(role="model", parts=[glm.Part(text=aggregation)])
|
self._context.add_message(
|
||||||
)
|
glm.Content(role="model", parts=[glm.Part(text=aggregation)])
|
||||||
|
)
|
||||||
|
|
||||||
if self._pending_image_frame_message:
|
if self._pending_image_frame_message:
|
||||||
frame = self._pending_image_frame_message
|
frame = self._pending_image_frame_message
|
||||||
|
|||||||
Reference in New Issue
Block a user