增加注入提示词功能
This commit is contained in:
parent
f193c48ce1
commit
ae059ffcb8
10 changed files with 160 additions and 20 deletions
|
|
@ -115,6 +115,24 @@
|
|||
<button class="eye" onclick="togglePwd('mKey')">👁</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>自定义指令 <span style="color:var(--muted)">(可选)</span></label>
|
||||
<div class="input-wrap"><textarea id="mInstructions" rows="5" placeholder="注入到请求中的自定义系统指令 Responses 格式 → 写入 instructions 字段(developer 级别) Chat Completions 格式 → 注入为首条 system 消息 Anthropic 格式 → 写入 system 字段" style="resize:vertical;min-height:80px"></textarea></div>
|
||||
<div class="hint">
|
||||
每个模型可单独配置。指令会被注入到发往上游的请求中,模型会无条件信任该内容。<br>
|
||||
适用场景:自定义人格、解除限制、注入 CTF 环境假设等。
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>注入位置</label>
|
||||
<div class="input-wrap">
|
||||
<select id="mInsPosition">
|
||||
<option value="prepend">前置(推荐,优先级更高)</option>
|
||||
<option value="append">后置</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="hint">前置:自定义指令放在系统提示词最前面,模型优先看到;后置:放在末尾</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-ghost" onclick="closeModal()">取消</button>
|
||||
<button class="btn btn-primary" id="modalSaveBtn" onclick="saveMapping()">保存</button>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue