fix add resume

This commit is contained in:
ivankirpichnikov
2025-11-23 04:53:34 +03:00
parent 2e6214a5ec
commit 9060d23cba
3 changed files with 7 additions and 6 deletions
@@ -29,7 +29,7 @@ class MlApiGateway:
self._client = client
async def generate_embedding(self, text: str) -> list[float]:
response = await self._client.post("/get_embedding", json={"text": text})
response = await self._client.post("/get_embedding", json={"text": text}, timeout=100)
return cast(list[float], response.json()["embedding"])
async def generate_resume_prediction(
@@ -39,9 +39,9 @@ class MlApiGateway:
suituble_vacancies: Sequence[SuitableVacancyDs],
) -> GenerateResumePredictionResponse:
response = await self._client.post(
"/predict_salary",
"/predict",
json={
"resume_id": resume_id,
"resume_id": str(resume_id),
"key_skills": key_skills,
"vacancies": [
{
@@ -53,6 +53,7 @@ class MlApiGateway:
} for suituble_vacancy in suituble_vacancies
],
},
timeout=100,
)
response_json = response.json()