此页面为开发者构建特定应用程序的 GPT Action 提供说明和指南。在继续之前,请务必先熟悉以下信息
这个特定的 GPT Action 概述了如何连接到 Confluence,Atlassian 的协作和文档平台。此 Action 接收用户的问题,扫描相关的 Confluence 空间和页面以收集必要的信息,然后形成响应以回答用户的问题。本操作指南不涉及直接从 ChatGPT 更新 Confluence 中的内容,但从技术上来说,通过额外的 Actions 和作用域可以实现。
价值
用户现在可以利用 ChatGPT 的自然语言能力直接连接到 Confluence,从而实现与其组织知识库的无缝交互。
示例用例
在开始之前,请查看来自应用程序的这些链接
在开始之前,请确保在您的应用程序环境中完成以下步骤
创建自定义 GPT 后,将以下文本复制到“Instructions(指令)”面板中。有问题?请查看入门示例,了解此步骤的详细工作原理。
You are a "Confluence Savant", equipped with the ability to search our company's Product Wiki in Confluence to answer product-related questions.
You must ALWAYS perform the "getAccessibleResources" Action first to get the "cloudid" value you will need in subsequent Actions.
Your job is to provide accurate and detailed responses by retrieving information from the Product Wiki. Your responses should be clear, concise, and directly address the question asked. You have the capability to execute an action named "performConfluenceSearch" that allows you to search for content within our Confluence Product Wiki using specific terms or phrases related to the user's question.
- When you receive a query about product information, use the "performConfluenceSearch" action to retrieve relevant content from the Product Wiki. Formulate your search query based on the user's question, using specific keywords or phrases to find the most pertinent information.
- Once you receive the search results, review the content to ensure it matches the user's query. If necessary, refine your search query to retrieve more accurate results.
- Provide a response that synthesizes the information from the Product Wiki, clearly answering the user's question. Your response should be easy to understand and directly related to the query.
- If the query is complex or requires clarification, ask follow-up questions to the user to refine your understanding and improve the accuracy of your search.
- If the information needed to answer the question is not available in the Product Wiki, inform the user and guide them to where they might find the answer, such as contacting a specific department or person in the company.
Here is an example of how you might respond to a query:
User: "What are the latest features of our XYZ product?"
You: "The latest features of the XYZ product, as detailed in our Product Wiki, include [feature 1], [feature 2], and [feature 3]. These features were added in the recent update to enhance [specific functionalities]. For more detailed information, you can refer to the Product Wiki page [link to the specific Confluence page]."
Remember, your goal is to provide helpful, accurate, and relevant information to the user's query by effectively leveraging the Confluence Product Wiki.
创建自定义 GPT 后,将以下文本复制到“Actions(操作)”面板中。有问题?请查看入门示例,了解此步骤的详细工作原理。
openapi: 3.1.0
info:
title: Atlassian API
description: This API provides access to Atlassian resources through OAuth token authentication.
version: 1.0.0
servers:
- url: https://api.atlassian.com
description: Main API server
paths:
/oauth/token/accessible-resources:
get:
operationId: getAccessibleResources
summary: Retrieves accessible resources for the authenticated user.
description: This endpoint retrieves a list of resources the authenticated user has access to, using an OAuth token.
security:
- bearerAuth: []
responses:
'200':
description: A JSON array of accessible resources.
content:
application/json:
schema:
$ref: '#/components/schemas/ResourceArray'
/ex/confluence/{cloudid}/wiki/rest/api/search:
get:
operationId: performConfluenceSearch
summary: Performs a search in Confluence based on a query.
description: This endpoint allows searching within Confluence using the CQL (Confluence Query Language).
parameters:
- in: query
name: cql
required: true
description: The Confluence Query Language expression to evaluate.
schema:
type: string
- in: path
name: cloudid
required: true
schema:
type: string
description: The cloudid retrieved from the getAccessibleResources Action
- in: query
name: cqlcontext
description: The context to limit the search, specified as JSON.
schema:
type: string
- in: query
name: expand
description: A comma-separated list of properties to expand on the search result.
schema:
type: string
responses:
'200':
description: A list of search results matching the query.
content:
application/json:
schema:
$ref: '#/components/schemas/SearchResults'
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
schemas:
ResourceArray:
type: array
items:
$ref: '#/components/schemas/Resource'
Resource:
type: object
required:
- id
- name
- type
properties:
id:
type: string
description: The unique identifier for the resource.
name:
type: string
description: The name of the resource.
type:
type: string
description: The type of the resource.
SearchResults:
type: object
properties:
results:
type: array
items:
$ref: '#/components/schemas/SearchResult'
SearchResult:
type: object
properties:
id:
type: string
description: The unique identifier of the content.
title:
type: string
description: The title of the content.
type:
type: string
description: The type of the content (e.g., page, blog post).
space:
type: object
properties:
id:
type: string
description: The space ID where the content is located.
name:
type: string
description: The name of the space.
以下是关于设置与此第三方应用程序进行身份验证的说明。有问题?请查看入门示例,了解此步骤的详细工作原理。
在 ChatGPT 中设置身份验证之前,请确保在 Atlassian 开发者门户中完成以下步骤以创建您的 Confluence 应用
在 ChatGPT 中,点击“Authentication(身份验证)”,然后选择 “OAuth”。输入以下信息。
在 ChatGPT 中设置身份验证后,请按照应用程序中的以下步骤完成 Action。
您希望我们优先考虑哪些集成?我们的集成中是否存在错误?在我们的 github 中提交 PR 或 issue,我们将进行查看。