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