Spaces:
Running
Running
Update utils.py
Browse files
utils.py
CHANGED
@@ -12,6 +12,8 @@ import json
|
|
12 |
import re
|
13 |
import sys
|
14 |
from pydantic import HttpUrl
|
|
|
|
|
15 |
|
16 |
SysPromptOpt = """
|
17 |
**You are a professional resume optimization expert. You have been optimizing resumes for over 20 years, helping thousands of job seekers secure their dream jobs across various industries. Your expertise lies in aligning resumes perfectly with job descriptions to highlight relevant skills, experience, and accomplishments.**
|
@@ -46,12 +48,8 @@ ONLY OUTPUT THE FOLLOWING IN THE FOLLOWING FORMAT:
|
|
46 |
<changes_made>......</changes_made>
|
47 |
"""
|
48 |
|
49 |
-
OPENROUTER_API_KEY = "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" #os.environ["OPENROUTER_API_KEY"]
|
50 |
-
import json
|
51 |
-
from openai import OpenAI
|
52 |
-
|
53 |
|
54 |
-
or_client = OpenAI(api_key=
|
55 |
|
56 |
def together_response(messages,model="openai/gpt-4o-mini",SysPrompt=SysPromptOpt):
|
57 |
response = or_client.chat.completions.create(
|
|
|
12 |
import re
|
13 |
import sys
|
14 |
from pydantic import HttpUrl
|
15 |
+
import json
|
16 |
+
from openai import OpenAI
|
17 |
|
18 |
SysPromptOpt = """
|
19 |
**You are a professional resume optimization expert. You have been optimizing resumes for over 20 years, helping thousands of job seekers secure their dream jobs across various industries. Your expertise lies in aligning resumes perfectly with job descriptions to highlight relevant skills, experience, and accomplishments.**
|
|
|
48 |
<changes_made>......</changes_made>
|
49 |
"""
|
50 |
|
|
|
|
|
|
|
|
|
51 |
|
52 |
+
or_client = OpenAI(api_key=OR_API_KEY, base_url = "https://openrouter.ai/api/v1")
|
53 |
|
54 |
def together_response(messages,model="openai/gpt-4o-mini",SysPrompt=SysPromptOpt):
|
55 |
response = or_client.chat.completions.create(
|