Files
PromptX/protocol/application/resource.protocol.md
2025-05-15 11:45:58 +08:00

37 lines
1.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# resource 应用协议
> **TL;DR:** resource标签用于定义资源协议提供统一的引用方式。
## 🔍 基本信息
**标签名:** `<resource>`
**版本:** 1.0.0
**类别:** 资源
**状态:** 草稿
**创建日期:** 2023-06-30
### 目的与功能
resource标签用于定义特定类型的资源协议使开发者能够以标准化的方式描述如何引用和处理各种资源。通过这个标签可以明确资源的引用语法、处理规则和使用方式确保资源引用在不同环境中的一致性和可靠性。此标签是PromptX中资源引用协议RP在应用层面的具体实现方式。
## 📝 语法定义
```
<resource protocol="协议名">内容</resource>
```
## 📝 语义说明
resource标签定义资源协议使其可以使用`@协议名://路径`形式在提示词中引用。标签内容应包含协议的基本描述和用法。
## 使用示例
<resource protocol="context">
# Context 协议
## 语法
@context://[scope]/[path]
## 说明
用于引用和设置上下文环境。
</resource>