Dagfinn1962 commited on
Commit
6dce795
1 Parent(s): 0e88e1f

Update src/llm_boilers.py

Browse files
Files changed (1) hide show
  1. src/llm_boilers.py +11 -1
src/llm_boilers.py CHANGED
@@ -56,7 +56,17 @@ def gpt_loader(model_id: str, openai_key: str):
56
  openai.api_key = openai_key # os.getenv("OPENAI_API_KEY")
57
  logging.warning(f"model id: {model_id}")
58
 
59
- return model_id
 
 
 
 
 
 
 
 
 
 
60
 
61
 
62
  LOAD_MODEL_FUNCTIONS.append(gpt_loader)
 
56
  openai.api_key = openai_key # os.getenv("OPENAI_API_KEY")
57
  logging.warning(f"model id: {model_id}")
58
 
59
+ model = openai.ChatCompletion.create(
60
+ model=model_id,
61
+ messages=[],
62
+ temperature=0.0,
63
+ max_tokens=0,
64
+ n=1,
65
+ stop=None,
66
+ log_level="info",
67
+ )
68
+
69
+ return model
70
 
71
 
72
  LOAD_MODEL_FUNCTIONS.append(gpt_loader)