chore: replace ada-002 model default (#3140)

This commit is contained in:
cthomas
2025-07-02 16:12:08 -07:00
committed by GitHub
parent aea0d87338
commit a7dc025351
9 changed files with 34 additions and 34 deletions

View File

@@ -93,7 +93,7 @@
" ),\n",
" ]\n",
" model=\"openai/gpt-4o-mini\",\n",
" embedding=\"openai/text-embedding-ada-002\",\n",
" embedding=\"openai/text-embedding-3-small\",\n",
")"
]
},

View File

@@ -27,7 +27,7 @@ const agent = await client.agents.create({
},
],
model: 'openai/gpt-4o-mini',
embedding: 'openai/text-embedding-ada-002',
embedding: 'openai/text-embedding-3-small',
});
console.log('Created agent with name', agent.name);
@@ -100,7 +100,7 @@ console.log(
let agentCopy = await client.agents.create({
model: 'openai/gpt-4o-mini',
embedding: 'openai/text-embedding-ada-002',
embedding: 'openai/text-embedding-3-small',
});
let block = await client.agents.blocks.retrieve(agent.id, 'human');
agentCopy = await client.agents.blocks.attach(agentCopy.id, block.id);

View File

@@ -106,7 +106,7 @@
},
{
"cell_type": "code",
"execution_count": 72,
"execution_count": null,
"id": "c6d823fc-3e6e-4d32-a5a6-4c42dca60d94",
"metadata": {},
"outputs": [],
@@ -119,7 +119,7 @@
" ),\n",
" ],\n",
" model=\"openai/gpt-4\",\n",
" embedding=\"openai/text-embedding-ada-002\",\n",
" embedding=\"openai/text-embedding-3-small\",\n",
")"
]
},
@@ -274,7 +274,7 @@
},
{
"cell_type": "code",
"execution_count": 75,
"execution_count": null,
"id": "4807532e-7b13-4c77-ac6b-b89338aeb3c2",
"metadata": {},
"outputs": [
@@ -305,7 +305,7 @@
" ],\n",
" # set automatic defaults for LLM/embedding config\n",
" model=\"openai/gpt-4\",\n",
" embedding=\"openai/text-embedding-ada-002\",\n",
" embedding=\"openai/text-embedding-3-small\",\n",
")\n",
"normal_agent.tools"
]
@@ -320,7 +320,7 @@
},
{
"cell_type": "code",
"execution_count": 76,
"execution_count": null,
"id": "f1bbe4c7-d570-49f1-8c57-b39550f3ba65",
"metadata": {},
"outputs": [
@@ -345,7 +345,7 @@
" ],\n",
" # set automatic defaults for LLM/embedding config\n",
" model=\"openai/gpt-4\",\n",
" embedding=\"openai/text-embedding-ada-002\",\n",
" embedding=\"openai/text-embedding-3-small\",\n",
" tools=['send_message'], \n",
" include_base_tools=False\n",
")\n",
@@ -402,7 +402,7 @@
},
{
"cell_type": "code",
"execution_count": 79,
"execution_count": null,
"id": "77b324e9-2350-456e-8db5-3ccc8cec367f",
"metadata": {},
"outputs": [],
@@ -422,7 +422,7 @@
" ),\n",
" ],\n",
" model=\"openai/gpt-4\",\n",
" embedding=\"openai/text-embedding-ada-002\"\n",
" embedding=\"openai/text-embedding-3-small\"\n",
")"
]
},

View File

@@ -56,7 +56,7 @@ class EmbeddingConfig(BaseModel):
@classmethod
def default_config(cls, model_name: Optional[str] = None, provider: Optional[str] = None):
if model_name == "text-embedding-ada-002" or (not model_name and provider == "openai"):
if model_name == "text-embedding-ada-002" and provider == "openai":
return cls(
embedding_model="text-embedding-ada-002",
embedding_endpoint_type="openai",
@@ -64,7 +64,7 @@ class EmbeddingConfig(BaseModel):
embedding_dim=1536,
embedding_chunk_size=300,
)
if model_name == "text-embedding-3-small" and provider == "openai":
if (model_name == "text-embedding-3-small" and provider == "openai") or (not model_name and provider == "openai"):
return cls(
embedding_model="text-embedding-3-small",
embedding_endpoint_type="openai",

View File

@@ -42,7 +42,7 @@
"embedding_config": {
"embedding_endpoint_type": "openai",
"embedding_endpoint": "https://api.openai.com/v1",
"embedding_model": "text-embedding-ada-002",
"embedding_model": "text-embedding-3-small",
"embedding_dim": 1536,
"embedding_chunk_size": 300,
"handle": null,

View File

@@ -1,6 +1,6 @@
{
"embedding_endpoint_type": "azure",
"embedding_model": "text-embedding-ada-002",
"embedding_dim": 768,
"embedding_chunk_size": 300
"embedding_endpoint_type": "azure",
"embedding_model": "text-embedding-3-small",
"embedding_dim": 768,
"embedding_chunk_size": 300
}

View File

@@ -1,7 +1,7 @@
{
"embedding_endpoint_type": "openai",
"embedding_endpoint": "https://api.openai.com/v1",
"embedding_model": "text-embedding-ada-002",
"embedding_dim": 1536,
"embedding_chunk_size": 300
"embedding_endpoint_type": "openai",
"embedding_endpoint": "https://api.openai.com/v1",
"embedding_model": "text-embedding-3-small",
"embedding_dim": 1536,
"embedding_chunk_size": 300
}

View File

@@ -1,12 +1,12 @@
{
"context_window": 8192,
"model": "gpt-4",
"model_endpoint_type": "openai",
"model_endpoint": "https://api.openai.com/v1",
"model_wrapper": null,
"embedding_endpoint_type": "openai",
"embedding_endpoint": "https://api.openai.com/v1",
"embedding_model": "text-embedding-ada-002",
"embedding_dim": 1536,
"embedding_chunk_size": 300
"context_window": 8192,
"model": "gpt-4",
"model_endpoint_type": "openai",
"model_endpoint": "https://api.openai.com/v1",
"model_wrapper": null,
"embedding_endpoint_type": "openai",
"embedding_endpoint": "https://api.openai.com/v1",
"embedding_model": "text-embedding-3-small",
"embedding_dim": 1536,
"embedding_chunk_size": 300
}

View File

@@ -433,7 +433,7 @@ async def test_sleeptime_agent_new_block_attachment(server, actor):
),
],
model="anthropic/claude-3-5-sonnet-20240620",
embedding="openai/text-embedding-ada-002",
embedding="openai/text-embedding-3-small",
enable_sleeptime=True,
),
actor=actor,