Skip to content

Commit

Permalink
Fix prompt and temprature
Browse files Browse the repository at this point in the history
  • Loading branch information
shri committed Sep 5, 2024
1 parent 315b005 commit 4f67741
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/app/domain/jobs/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
model = os.environ["OPENAI_MODEL_NAME"]
client = AsyncOpenAI(api_key=os.environ["OPENAI_API_KEY"])
prompt = """
Extract the following information from the given job post in the form of HTML/JS code:
Only extract the following information directly from the given job post(which is in the form of HTML/JS code)
without adding any outside knowledge or assumptions:
- Company Name
- Company URL
- Company LinkedIn URL
Expand All @@ -36,7 +37,7 @@
tools: [ {{"name": "tool name 1", "certainty": "High"}}, {{"name": "tool name 2", "certainty": "Medium"}} ]
}}
Note: Use null if you're unable to extract any information.
Note: Do NOT include anything that's not part of the post and use null if you're unable to extract any information.
Here is the code:
{html_content}
Expand All @@ -54,6 +55,7 @@ async def extract_job_details_from_html(html_content: str) -> dict[str, Any]:
chat_response = await client.chat.completions.create(
model=model,
messages=messages,
temperature=0,
response_format={
"type": "json_object",
},
Expand Down

0 comments on commit 4f67741

Please sign in to comment.