mirror of
https://github.com/imartinez/privateGPT.git
synced 2025-09-05 01:01:24 +00:00
Allow setting OpenAI model in settings (#1386)
feat(settings): Allow setting openai model to be used. Default to GPT 3.5
This commit is contained in:
@@ -50,7 +50,9 @@ class LLMComponent:
|
||||
case "openai":
|
||||
from llama_index.llms import OpenAI
|
||||
|
||||
openai_settings = settings.openai.api_key
|
||||
self.llm = OpenAI(api_key=openai_settings)
|
||||
openai_settings = settings.openai
|
||||
self.llm = OpenAI(
|
||||
api_key=openai_settings.api_key, model=openai_settings.model
|
||||
)
|
||||
case "mock":
|
||||
self.llm = MockLLM()
|
||||
|
Reference in New Issue
Block a user