fix: user_api_key capturing

This commit is contained in:
Siddhant Rai
2024-04-16 15:31:11 +05:30
parent 333b6e60e1
commit af5e73c8cb
14 changed files with 69 additions and 27 deletions

View File

@@ -20,8 +20,8 @@ class LLMCreator:
}
@classmethod
def create_llm(cls, type, api_key, *args, **kwargs):
def create_llm(cls, type, api_key, user_api_key, *args, **kwargs):
llm_class = cls.llms.get(type.lower())
if not llm_class:
raise ValueError(f"No LLM class found for type {type}")
return llm_class(api_key, *args, **kwargs)
return llm_class(api_key, user_api_key, *args, **kwargs)