Spaces:
No application file
No application file
remove max token limit, increase timeout, update config
Browse files- app/config.py +1 -1
- app/core/job_parser.py +0 -1
- app/core/query_gen.py +0 -1
- app/core/scoring.py +0 -1
- app/services/api_clients.py +2 -2
app/config.py
CHANGED
|
@@ -25,7 +25,7 @@ class Settings(BaseSettings):
|
|
| 25 |
|
| 26 |
api_host: str = "0.0.0.0"
|
| 27 |
api_port: int = 8000
|
| 28 |
-
debug: bool =
|
| 29 |
|
| 30 |
log_level: str = "DEBUG"
|
| 31 |
log_filename: str = "app.log"
|
|
|
|
| 25 |
|
| 26 |
api_host: str = "0.0.0.0"
|
| 27 |
api_port: int = 8000
|
| 28 |
+
debug: bool = True
|
| 29 |
|
| 30 |
log_level: str = "DEBUG"
|
| 31 |
log_filename: str = "app.log"
|
app/core/job_parser.py
CHANGED
|
@@ -41,7 +41,6 @@ Include the full original text under "description".
|
|
| 41 |
{"role": "user", "content": raw_text},
|
| 42 |
],
|
| 43 |
temperature=0.2,
|
| 44 |
-
max_tokens=500,
|
| 45 |
)
|
| 46 |
# Parse the JSON output
|
| 47 |
parsed = json.loads(response.choices[0].message.content)
|
|
|
|
| 41 |
{"role": "user", "content": raw_text},
|
| 42 |
],
|
| 43 |
temperature=0.2,
|
|
|
|
| 44 |
)
|
| 45 |
# Parse the JSON output
|
| 46 |
parsed = json.loads(response.choices[0].message.content)
|
app/core/query_gen.py
CHANGED
|
@@ -68,7 +68,6 @@ Offer Extended
|
|
| 68 |
{"role": "user", "content": job_description.strip()},
|
| 69 |
],
|
| 70 |
temperature=0.2,
|
| 71 |
-
max_tokens=300,
|
| 72 |
)
|
| 73 |
|
| 74 |
return json.loads(response.choices[0].message.content)
|
|
|
|
| 68 |
{"role": "user", "content": job_description.strip()},
|
| 69 |
],
|
| 70 |
temperature=0.2,
|
|
|
|
| 71 |
)
|
| 72 |
|
| 73 |
return json.loads(response.choices[0].message.content)
|
app/core/scoring.py
CHANGED
|
@@ -284,7 +284,6 @@ class CandidateScorer:
|
|
| 284 |
{"role": "user", "content": user_prompt.strip()},
|
| 285 |
],
|
| 286 |
temperature=0.1,
|
| 287 |
-
max_tokens=300,
|
| 288 |
)
|
| 289 |
|
| 290 |
result = asyncio.run(
|
|
|
|
| 284 |
{"role": "user", "content": user_prompt.strip()},
|
| 285 |
],
|
| 286 |
temperature=0.1,
|
|
|
|
| 287 |
)
|
| 288 |
|
| 289 |
result = asyncio.run(
|
app/services/api_clients.py
CHANGED
|
@@ -204,7 +204,7 @@ class LinkedInProfileClient:
|
|
| 204 |
"x-rapidapi-host": "fresh-linkedin-profile-data.p.rapidapi.com",
|
| 205 |
"x-rapidapi-key": settings.rapidapi_api_key,
|
| 206 |
},
|
| 207 |
-
timeout=
|
| 208 |
)
|
| 209 |
self.semaphore = asyncio.Semaphore(settings.max_concurrent_requests)
|
| 210 |
|
|
@@ -321,7 +321,7 @@ class GitHubClient:
|
|
| 321 |
"""Client for fetching GitHub profile HTML"""
|
| 322 |
|
| 323 |
def __init__(self):
|
| 324 |
-
self._client = httpx.AsyncClient(timeout=
|
| 325 |
self.semaphore = asyncio.Semaphore(settings.max_concurrent_requests)
|
| 326 |
|
| 327 |
async def __aenter__(self):
|
|
|
|
| 204 |
"x-rapidapi-host": "fresh-linkedin-profile-data.p.rapidapi.com",
|
| 205 |
"x-rapidapi-key": settings.rapidapi_api_key,
|
| 206 |
},
|
| 207 |
+
timeout=60.0,
|
| 208 |
)
|
| 209 |
self.semaphore = asyncio.Semaphore(settings.max_concurrent_requests)
|
| 210 |
|
|
|
|
| 321 |
"""Client for fetching GitHub profile HTML"""
|
| 322 |
|
| 323 |
def __init__(self):
|
| 324 |
+
self._client = httpx.AsyncClient(timeout=60.0)
|
| 325 |
self.semaphore = asyncio.Semaphore(settings.max_concurrent_requests)
|
| 326 |
|
| 327 |
async def __aenter__(self):
|