Spaces:
Configuration error
Configuration error
Fixed indentation and input variable
Browse files- functions/job_call.py +3 -3
functions/job_call.py
CHANGED
|
@@ -4,10 +4,10 @@ import os
|
|
| 4 |
from openai import OpenAI
|
| 5 |
from configuration import JOB_CALL_EXTRACTION_PROMPT
|
| 6 |
|
| 7 |
-
def summarize_job_call(job_call:
|
| 8 |
'''Extracts and summarizes key information from job call.'''
|
| 9 |
|
| 10 |
-
|
| 11 |
|
| 12 |
client.base_url = (
|
| 13 |
'https://gperdrizet--vllm-openai-compatible-summarization-serve.modal.run/v1'
|
|
@@ -20,7 +20,7 @@ def summarize_job_call(job_call: dict) -> str:
|
|
| 20 |
messages = [
|
| 21 |
{
|
| 22 |
'role': 'system',
|
| 23 |
-
'content': f'{JOB_CALL_EXTRACTION_PROMPT}{
|
| 24 |
}
|
| 25 |
]
|
| 26 |
|
|
|
|
| 4 |
from openai import OpenAI
|
| 5 |
from configuration import JOB_CALL_EXTRACTION_PROMPT
|
| 6 |
|
| 7 |
+
def summarize_job_call(job_call: str) -> str:
|
| 8 |
'''Extracts and summarizes key information from job call.'''
|
| 9 |
|
| 10 |
+
client = OpenAI(api_key=os.environ['MODAL_API_KEY'])
|
| 11 |
|
| 12 |
client.base_url = (
|
| 13 |
'https://gperdrizet--vllm-openai-compatible-summarization-serve.modal.run/v1'
|
|
|
|
| 20 |
messages = [
|
| 21 |
{
|
| 22 |
'role': 'system',
|
| 23 |
+
'content': f'{JOB_CALL_EXTRACTION_PROMPT}{job_call}'
|
| 24 |
}
|
| 25 |
]
|
| 26 |
|