From dfe91685098312f3c8eb729d6ebb0c1a411e23b6 Mon Sep 17 00:00:00 2001 From: Sirui Hong <34952977+stellaHSR@users.noreply.github.com> Date: Tue, 21 Nov 2023 17:35:33 +0800 Subject: [PATCH] Update llm.py rm 'sk-' verification --- metagpt/llm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metagpt/llm.py b/metagpt/llm.py index 51ade1f7e..b653df946 100644 --- a/metagpt/llm.py +++ b/metagpt/llm.py @@ -18,7 +18,7 @@ from metagpt.provider.human_provider import HumanProvider def LLM() -> "BaseGPTAPI": """ initialize different LLM instance according to the key field existence""" # TODO a little trick, can use registry to initialize LLM instance further - if CONFIG.openai_api_key and CONFIG.openai_api_key.startswith("sk-"): + if CONFIG.openai_api_key: llm = OpenAIGPTAPI() elif CONFIG.claude_api_key: llm = Claude()