do onboarding
This commit is contained in:
parent
705f8a3235
commit
b822950a10
1 changed files with 12 additions and 10 deletions
|
|
@ -390,16 +390,15 @@ async def test_search_multi_embedding_models(
|
||||||
async with httpx.AsyncClient(transport=transport, base_url="http://testserver") as client:
|
async with httpx.AsyncClient(transport=transport, base_url="http://testserver") as client:
|
||||||
await wait_for_service_ready(client)
|
await wait_for_service_ready(client)
|
||||||
|
|
||||||
warmup_resp = await client.post(
|
onboarding_payload = {
|
||||||
"/settings",
|
"model_provider": "openai",
|
||||||
json={
|
"llm_model": "gpt-4o-mini",
|
||||||
"embedding_model": "text-embedding-3-small",
|
"sample_data": False,
|
||||||
"llm_model": "gpt-4o-mini",
|
}
|
||||||
},
|
onboarding_resp = await client.post("/onboarding", json=onboarding_payload)
|
||||||
)
|
if onboarding_resp.status_code not in (200, 204):
|
||||||
if warmup_resp.status_code not in (200, 204):
|
|
||||||
raise AssertionError(
|
raise AssertionError(
|
||||||
f"Initial settings update failed: {warmup_resp.status_code} {warmup_resp.text}"
|
f"Onboarding failed: {onboarding_resp.status_code} {onboarding_resp.text}"
|
||||||
)
|
)
|
||||||
|
|
||||||
async def _upload_doc(name: str, text: str) -> None:
|
async def _upload_doc(name: str, text: str) -> None:
|
||||||
|
|
@ -445,7 +444,10 @@ async def test_search_multi_embedding_models(
|
||||||
# Start with explicit small embedding model
|
# Start with explicit small embedding model
|
||||||
resp = await client.post(
|
resp = await client.post(
|
||||||
"/settings",
|
"/settings",
|
||||||
json={"embedding_model": "text-embedding-3-small"},
|
json={
|
||||||
|
"embedding_model": "text-embedding-3-small",
|
||||||
|
"llm_model": "gpt-4o-mini",
|
||||||
|
},
|
||||||
)
|
)
|
||||||
assert resp.status_code == 200, resp.text
|
assert resp.status_code == 200, resp.text
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue