mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-10-10 21:26:01 +02:00
Ability to provide different base URL for the open AI LLM endpoint (#475)
This commit is contained in:
@@ -24,9 +24,11 @@ class OpenAIGPT(LangChainChatLLM):
|
|||||||
# server from starting up
|
# server from starting up
|
||||||
if not api_key:
|
if not api_key:
|
||||||
api_key = os.environ.get("OPENAI_API_KEY") or "dummy_api_key"
|
api_key = os.environ.get("OPENAI_API_KEY") or "dummy_api_key"
|
||||||
|
|
||||||
self._llm = ChatOpenAI(
|
self._llm = ChatOpenAI(
|
||||||
model=model_version,
|
model=model_version,
|
||||||
openai_api_key=api_key,
|
openai_api_key=api_key,
|
||||||
|
openai_api_base=kwargs.get('endpoint', ''),
|
||||||
max_tokens=max_output_tokens,
|
max_tokens=max_output_tokens,
|
||||||
temperature=temperature,
|
temperature=temperature,
|
||||||
request_timeout=timeout,
|
request_timeout=timeout,
|
||||||
|
Reference in New Issue
Block a user