You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<reference>
Below are some potentially helpful/relevant pieces of information for figuring out to respond
<title>{title}</title>
<url>{url}</url>
...
</reference>
{template}
flowchart TD
Start[开始处理消息] --> C[遍历模板中的变量]
C --> D{当前模板变量<br/>是否被用户@?}
D -->|是| E[用变量值替换模板占位符<br/>标记该变量已使用]
D -->|否| F[使用空值填充该变量]
E --> G{是否还有<br/>未处理的模板变量?}
F --> G
G -->|是| C
G -->|否| H[收集未使用的@变量]
H --> I{是否有未使用的<br/>@变量?}
I -->|是| J[构建reference标签<br/>包含未使用的变量]
I -->|否| K[跳过reference标签]
J --> L[拼接最终消息]
K --> L
L --> M[发送至LLM处理]
style Start fill:#E3F2FD,stroke:#1565C0,stroke-width:2px,color:#1565C0
style D fill:#FFE0B2,stroke:#EF6C00,stroke-width:2px,color:#EF6C00
style G fill:#FFE0B2,stroke:#EF6C00,stroke-width:2px,color:#EF6C00
style I fill:#FFE0B2,stroke:#EF6C00,stroke-width:2px,color:#EF6C00
style M fill:#E8F5E9,stroke:#2E7D32,stroke-width:2px,color:#2E7D32
// 待定{"agentId":"quote","title":"import * as vscode from 'vscode';","pageUrl":"import * as vscode from 'vscode';\nimport * as path from 'path';\nexport let doc: vscode.TextDocument;","pageTitle": "","linkText": "","linkUrl": ""}
传输协议
客户端发送的消息结构应该满足 openai 和主流接口服务商的要求,以方便用户使用自己的 API KEY。
This discussion was converted from issue #13 on November 03, 2024 15:07.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
最终拼接好的消息结构为:
定制化能力
工具中的两个核心概念:框架、内容
框架
能够包裹内容的 Prompt 模板。其中内容为用户产生,或者从浏览器页面中自动获取。
一个简单的框架结构为:
框架具备自动获取信息并填充变量的能力。当用户选择使用某个框架时,UI 中应出现框架的结构和自动获取到的变量值。
框架负责组装模版和内容。允许用户自己定义、插入变量、或者使用条件-循环等语法。
高级框架的结构如下:
内容
用户输入的文字、上传的图片、页面中的引用等都是内容。内容会有来源,如来源为「选中文字」、「页面标题」等,这些内容会被框架自动识别并填充到框架中。
内置内容如下:
传输协议
Beta Was this translation helpful? Give feedback.
All reactions