Jacksuyu commited on
Commit
fc9090a
·
1 Parent(s): 993599f

fix: trim OPENAI_API_KEY from env in workflow classifier

Browse files
src/web_user_summary/llm_requirement_filter.py CHANGED
@@ -93,7 +93,7 @@ def call_ollama_single(model: str, item: Dict) -> Dict:
93
 
94
 
95
  def call_openai(model: str, items: List[Dict]) -> Dict:
96
- api_key = os.getenv("OPENAI_API_KEY")
97
  if not api_key:
98
  raise RuntimeError("OPENAI_API_KEY is not set")
99
 
 
93
 
94
 
95
  def call_openai(model: str, items: List[Dict]) -> Dict:
96
+ api_key = (os.getenv("OPENAI_API_KEY") or "").strip().strip('"').strip("'")
97
  if not api_key:
98
  raise RuntimeError("OPENAI_API_KEY is not set")
99