mirror of
https://github.com/RYDE-WORK/Langchain-Chatchat.git
synced 2026-01-26 16:53:36 +08:00
ollama兼容
This commit is contained in:
parent
0470b8ae41
commit
2bb24d8b6d
@ -31,7 +31,7 @@ ollama:
|
||||
- model: 'llama3'
|
||||
model_type: 'llm'
|
||||
model_credentials:
|
||||
base_url: 'http://172.21.80.1:11434'
|
||||
base_url: 'http://172.21.192.1:11434'
|
||||
mode: 'completion'
|
||||
|
||||
|
||||
|
||||
@ -70,7 +70,7 @@ ollama:
|
||||
- model: 'llama3'
|
||||
model_type: 'llm'
|
||||
model_credentials:
|
||||
base_url: 'http://172.21.80.1:11434/v1'
|
||||
base_url: 'http://172.21.192.1:11434/v1'
|
||||
|
||||
```
|
||||
|
||||
|
||||
@ -652,13 +652,16 @@ class OllamaLargeLanguageModel(_CommonOllama, LargeLanguageModel):
|
||||
if user:
|
||||
extra_model_kwargs["user"] = user
|
||||
|
||||
extra_body = {
|
||||
**model_parameters,
|
||||
**extra_model_kwargs,
|
||||
}
|
||||
# chat model
|
||||
response = client.chat.completions.create(
|
||||
messages=[self._convert_prompt_message_to_dict(m) for m in prompt_messages],
|
||||
model=model,
|
||||
stream=stream,
|
||||
**model_parameters,
|
||||
**extra_model_kwargs,
|
||||
extra_body=extra_body
|
||||
)
|
||||
|
||||
if stream:
|
||||
|
||||
@ -4,7 +4,7 @@ ollama:
|
||||
- model: 'llama3'
|
||||
model_type: 'llm'
|
||||
model_credentials:
|
||||
base_url: 'http://172.21.80.1:11434/v1'
|
||||
base_url: 'http://172.21.192.1:11434/v1'
|
||||
|
||||
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ ollama:
|
||||
- model: 'llama3'
|
||||
model_type: 'llm'
|
||||
model_credentials:
|
||||
openai_api_base: 'http://172.21.80.1:11434'
|
||||
openai_api_base: 'http://172.21.192.1:11434'
|
||||
|
||||
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ ollama:
|
||||
- model: 'llama3'
|
||||
model_type: 'llm'
|
||||
model_credentials:
|
||||
base_url: 'http://172.21.80.1:11434/v1'
|
||||
base_url: 'http://172.21.192.1:11434/v1'
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user