mirror of
https://github.com/RYDE-WORK/Langchain-Chatchat.git
synced 2026-01-19 21:37:20 +08:00
集成openai_plugins/imitater插件
This commit is contained in:
parent
c4d2075995
commit
fa4ccdb4be
@ -22,12 +22,12 @@ plugins:
|
||||
- imitater:
|
||||
name: "imitater"
|
||||
logdir: "/media/gpt4-pdf-chatbot-langchain/langchain-chatchat-archive/logs"
|
||||
worker_name: "worker1"
|
||||
worker_name: "qwen-worker1"
|
||||
run_openai_api:
|
||||
host: "127.0.0.1"
|
||||
port: 30000
|
||||
imitate_model_workers:
|
||||
- worker1:
|
||||
- qwen-worker1:
|
||||
model:
|
||||
name: "Qwen-1_8B-Chat"
|
||||
chat_model_path: "/media/checkpoint/Qwen-1_8B"
|
||||
|
||||
@ -8,13 +8,13 @@
|
||||
{%- set loop_messages = messages -%}
|
||||
{%- set system_message = 'You are a helpful assistant.' -%}
|
||||
{%- endif -%}
|
||||
{{ '<|im_start|>' + 'system' + '\\n' + system_message + '<|im_end|>' + '\\n' }}
|
||||
{{ '<|im_start|>' + 'system' + '\n' + system_message + '<|im_end|>' + '\n' }}
|
||||
{%- for message in loop_messages -%}
|
||||
{{ '<|im_start|>' + message['role'] + '\\n' + message['content']}}
|
||||
{{ '<|im_start|>' + message['role'] + '\n' + message['content']}}
|
||||
{%- if (loop.last and add_generation_prompt) or not loop.last -%}
|
||||
{{ '<|im_end|>' + '\\n' }}
|
||||
{{ '<|im_end|>' + '\n' }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- if add_generation_prompt and messages[-1]['role'] != 'assistant' -%}
|
||||
{{ '<|im_start|>' + 'assistant' + '\\n' }}
|
||||
{{ '<|im_start|>' + 'assistant' + '\n' }}
|
||||
{%- endif -%}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user