mirror of
https://github.com/zylon-ai/private-gpt.git
synced 2025-12-22 10:45:42 +01:00
Merge branch 'feature/openailike-lmstudio' into main
This commit is contained in:
commit
e362b73d6d
3 changed files with 11 additions and 0 deletions
|
|
@ -123,6 +123,9 @@ class LLMComponent:
|
|||
max_new_tokens=settings.llm.max_new_tokens,
|
||||
messages_to_prompt=prompt_style.messages_to_prompt,
|
||||
completion_to_prompt=prompt_style.completion_to_prompt,
|
||||
tokenizer=settings.llm.tokenizer,
|
||||
timeout=openai_settings.request_timeout,
|
||||
reuse_client=False,
|
||||
)
|
||||
case "ollama":
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -205,6 +205,10 @@ class OpenAISettings(BaseModel):
|
|||
"gpt-3.5-turbo",
|
||||
description="OpenAI Model to use. Example: 'gpt-4'.",
|
||||
)
|
||||
request_timeout: float = Field(
|
||||
120.0,
|
||||
description="Time elapsed until openailike server times out the request. Default is 120s. Format is float. ",
|
||||
)
|
||||
|
||||
|
||||
class OllamaSettings(BaseModel):
|
||||
|
|
|
|||
|
|
@ -3,6 +3,9 @@ server:
|
|||
|
||||
llm:
|
||||
mode: openailike
|
||||
max_new_tokens: 512
|
||||
tokenizer: mistralai/Mistral-7B-Instruct-v0.2
|
||||
temperature: 0.1
|
||||
|
||||
embedding:
|
||||
mode: huggingface
|
||||
|
|
@ -15,3 +18,4 @@ openai:
|
|||
api_base: http://localhost:8000/v1
|
||||
api_key: EMPTY
|
||||
model: facebook/opt-125m
|
||||
request_timeout: 600.0
|
||||
Loading…
Add table
Add a link
Reference in a new issue