feat: Change default voice sleeptime to 4.1 (#1961)

This commit is contained in:
Matthew Zhou
2025-05-01 10:07:29 -07:00
committed by GitHub
parent c4f603d7b6
commit 498b767bb8
3 changed files with 28 additions and 8 deletions

View File

@@ -164,6 +164,15 @@ class LLMConfig(BaseModel):
model_wrapper=None,
context_window=128000,
)
elif model_name == "gpt-4.1":
return cls(
model="gpt-4.1",
model_endpoint_type="openai",
model_endpoint="https://api.openai.com/v1",
model_wrapper=None,
context_window=256000,
max_tokens=8192,
)
elif model_name == "letta":
return cls(
model="memgpt-openai",

View File

@@ -859,7 +859,7 @@ class SyncServer(Server):
value=get_persona_text("voice_memory_persona"),
),
],
llm_config=main_agent.llm_config,
llm_config=LLMConfig.default_config("gpt-4.1"),
embedding_config=main_agent.embedding_config,
project_id=main_agent.project_id,
)

View File

@@ -215,6 +215,11 @@ def voice_agent(server, actor):
return main_agent
@pytest.fixture
def group_id(voice_agent):
return voice_agent.multi_agent_group.id
@pytest.fixture(scope="module")
def org_id(server):
org = server.organization_manager.create_default_organization()
@@ -279,8 +284,19 @@ async def test_voice_recall_memory(disable_e2b_api_key, client, voice_agent, mes
@pytest.mark.asyncio
@pytest.mark.parametrize("endpoint", ["v1/voice-beta"])
async def test_multiple_messages(disable_e2b_api_key, client, voice_agent, endpoint):
"""Tests chat completion streaming using the Async OpenAI client."""
async def test_trigger_summarization(disable_e2b_api_key, client, server, voice_agent, group_id, endpoint, actor):
server.group_manager.modify_group(
group_id=group_id,
group_update=GroupUpdate(
manager_config=VoiceSleeptimeManagerUpdate(
manager_type=ManagerType.voice_sleeptime,
max_message_buffer_length=6,
min_message_buffer_length=5,
)
),
actor=actor,
)
request = _get_chat_request("How are you?")
async_client = AsyncOpenAI(base_url=f"http://localhost:8283/{endpoint}/{voice_agent.id}", max_retries=0)
@@ -515,11 +531,6 @@ def _modify(group_id, server, actor, max_val, min_val):
)
@pytest.fixture
def group_id(voice_agent):
return voice_agent.multi_agent_group.id
def test_valid_buffer_lengths_above_four(group_id, server, actor):
# both > 4 and max > min
updated = _modify(group_id, server, actor, max_val=10, min_val=5)