Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Commit
·
5d590b7
1
Parent(s):
cfe6073
Made candidate model flexible
Browse files- tests/candidate.py +4 -5
tests/candidate.py
CHANGED
|
@@ -6,7 +6,6 @@ import time
|
|
| 6 |
|
| 7 |
from collections import defaultdict
|
| 8 |
|
| 9 |
-
from dotenv import load_dotenv
|
| 10 |
from openai import OpenAI
|
| 11 |
|
| 12 |
from api.llm import LLMManager
|
|
@@ -15,12 +14,12 @@ from resources.data import fixed_messages, topic_lists
|
|
| 15 |
from resources.prompts import prompts
|
| 16 |
from tests.testing_prompts import candidate_prompt
|
| 17 |
|
| 18 |
-
config = Config()
|
| 19 |
-
load_dotenv()
|
| 20 |
|
| 21 |
-
|
| 22 |
-
def complete_interview(interview_type, exp_name, requirements="", difficulty="", topic="", model="gpt-3.5-turbo"):
|
| 23 |
client = OpenAI(base_url="https://api.openai.com/v1")
|
|
|
|
|
|
|
|
|
|
| 24 |
llm = LLMManager(config, prompts)
|
| 25 |
llm_name = config.llm.name
|
| 26 |
print(f"Starting evaluation interviewer LLM: {llm_name}, candidate_LLM: {model} interview_type: {interview_type}")
|
|
|
|
| 6 |
|
| 7 |
from collections import defaultdict
|
| 8 |
|
|
|
|
| 9 |
from openai import OpenAI
|
| 10 |
|
| 11 |
from api.llm import LLMManager
|
|
|
|
| 14 |
from resources.prompts import prompts
|
| 15 |
from tests.testing_prompts import candidate_prompt
|
| 16 |
|
|
|
|
|
|
|
| 17 |
|
| 18 |
+
def complete_interview(interview_type, exp_name, llm_config=None, requirements="", difficulty="", topic="", model="gpt-3.5-turbo"):
|
|
|
|
| 19 |
client = OpenAI(base_url="https://api.openai.com/v1")
|
| 20 |
+
config = Config()
|
| 21 |
+
if llm_config:
|
| 22 |
+
config.llm = llm_config
|
| 23 |
llm = LLMManager(config, prompts)
|
| 24 |
llm_name = config.llm.name
|
| 25 |
print(f"Starting evaluation interviewer LLM: {llm_name}, candidate_LLM: {model} interview_type: {interview_type}")
|