Files
YouduWiki/backend/docs/swagger.yaml
2026-05-21 19:52:45 +08:00

6270 lines
139 KiB
YAML

basePath: /
definitions:
anydoc.Child:
properties:
children:
items:
$ref: '#/definitions/anydoc.Child'
type: array
value:
$ref: '#/definitions/anydoc.Value'
type: object
anydoc.DingtalkSetting:
properties:
app_id:
type: string
app_secret:
type: string
phone:
type: string
space_id:
type: string
unionid:
type: string
type: object
anydoc.FeishuSetting:
properties:
app_id:
type: string
app_secret:
type: string
space_id:
type: string
user_access_token:
type: string
type: object
anydoc.Value:
properties:
file:
type: boolean
file_type:
type: string
id:
type: string
summary:
type: string
title:
type: string
type: object
consts.AuthType:
enum:
- ""
- simple
- enterprise
type: string
x-enum-comments:
AuthTypeEnterprise: 企业认证
AuthTypeNull: 无认证
AuthTypeSimple: 简单口令
x-enum-descriptions:
- 无认证
- 简单口令
- 企业认证
x-enum-varnames:
- AuthTypeNull
- AuthTypeSimple
- AuthTypeEnterprise
consts.CopySetting:
enum:
- ""
- append
- disabled
type: string
x-enum-comments:
CopySettingAppend: 增加内容尾巴
CopySettingDisabled: 禁止复制内容
CopySettingNone: 无限制
x-enum-descriptions:
- 无限制
- 增加内容尾巴
- 禁止复制内容
x-enum-varnames:
- CopySettingNone
- CopySettingAppend
- CopySettingDisabled
consts.CrawlerSource:
enum:
- url
- rss
- sitemap
- notion
- feishu
- dingtalk
- file
- epub
- yuque
- siyuan
- mindoc
- wikijs
- confluence
type: string
x-enum-varnames:
- CrawlerSourceUrl
- CrawlerSourceRSS
- CrawlerSourceSitemap
- CrawlerSourceNotion
- CrawlerSourceFeishu
- CrawlerSourceDingtalk
- CrawlerSourceFile
- CrawlerSourceEpub
- CrawlerSourceYuque
- CrawlerSourceSiyuan
- CrawlerSourceMindoc
- CrawlerSourceWikijs
- CrawlerSourceConfluence
consts.CrawlerStatus:
enum:
- pending
- in_process
- completed
- failed
type: string
x-enum-varnames:
- CrawlerStatusPending
- CrawlerStatusInProcess
- CrawlerStatusCompleted
- CrawlerStatusFailed
consts.HomePageSetting:
enum:
- doc
- custom
type: string
x-enum-comments:
HomePageSettingCustom: 自定义首页
HomePageSettingDoc: 文档页面
x-enum-descriptions:
- 文档页面
- 自定义首页
x-enum-varnames:
- HomePageSettingDoc
- HomePageSettingCustom
consts.LicenseEdition:
enum:
- 0
- 1
- 2
- 3
format: int32
type: integer
x-enum-comments:
LicenseEditionBusiness: 商业版
LicenseEditionEnterprise: 企业版
LicenseEditionFree: 开源版
LicenseEditionProfession: 专业版
x-enum-descriptions:
- 开源版
- 专业版
- 企业版
- 商业版
x-enum-varnames:
- LicenseEditionFree
- LicenseEditionProfession
- LicenseEditionEnterprise
- LicenseEditionBusiness
consts.ModelSettingMode:
enum:
- manual
- auto
type: string
x-enum-varnames:
- ModelSettingModeManual
- ModelSettingModeAuto
consts.NodeAccessPerm:
enum:
- open
- partial
- closed
type: string
x-enum-comments:
NodeAccessPermClosed: 完全禁止
NodeAccessPermOpen: 完全开放
NodeAccessPermPartial: 部分开放
x-enum-descriptions:
- 完全开放
- 部分开放
- 完全禁止
x-enum-varnames:
- NodeAccessPermOpen
- NodeAccessPermPartial
- NodeAccessPermClosed
consts.NodePermName:
enum:
- visible
- visitable
- answerable
type: string
x-enum-comments:
NodePermNameAnswerable: 可被问答
NodePermNameVisible: 导航内可见
NodePermNameVisitable: 可被访问
x-enum-descriptions:
- 导航内可见
- 可被访问
- 可被问答
x-enum-varnames:
- NodePermNameVisible
- NodePermNameVisitable
- NodePermNameAnswerable
consts.NodeRagInfoStatus:
enum:
- PENDING
- RUNNING
- FAILED
- SUCCEEDED
- REINDEX
type: string
x-enum-comments:
NodeRagStatusFailed: 处理失败
NodeRagStatusPending: 等待处理
NodeRagStatusReindexing: 重新索引中
NodeRagStatusRunning: 正在进行处理(文本分割、向量化等)
NodeRagStatusSucceeded: 处理成功
x-enum-descriptions:
- 等待处理
- 正在进行处理(文本分割、向量化等)
- 处理失败
- 处理成功
- 重新索引中
x-enum-varnames:
- NodeRagStatusPending
- NodeRagStatusRunning
- NodeRagStatusFailed
- NodeRagStatusSucceeded
- NodeRagStatusReindexing
consts.RedeemCaptchaReq:
properties:
solutions:
items:
type: integer
type: array
token:
type: string
type: object
consts.SourceType:
enum:
- dingtalk
- feishu
- wecom
- oauth
- github
- cas
- ldap
- widget
- dingtalk_bot
- feishu_bot
- lark_bot
- wechat_bot
- wecom_ai_bot
- wechat_service_bot
- discord_bot
- wechat_official_account
- openai_api
- mcp_server
type: string
x-enum-varnames:
- SourceTypeDingTalk
- SourceTypeFeishu
- SourceTypeWeCom
- SourceTypeOAuth
- SourceTypeGitHub
- SourceTypeCAS
- SourceTypeLDAP
- SourceTypeWidget
- SourceTypeDingtalkBot
- SourceTypeFeishuBot
- SourceTypeLarkBot
- SourceTypeWechatBot
- SourceTypeWecomAIBot
- SourceTypeWechatServiceBot
- SourceTypeDiscordBot
- SourceTypeWechatOfficialAccount
- SourceTypeOpenAIAPI
- SourceTypeMcpServer
consts.StatDay:
enum:
- 1
- 7
- 30
- 90
type: integer
x-enum-varnames:
- StatDay1
- StatDay7
- StatDay30
- StatDay90
consts.UserKBPermission:
enum:
- ""
- not null
- full_control
- doc_manage
- data_operate
type: string
x-enum-comments:
UserKBPermissionDataOperate: 数据运营
UserKBPermissionDocManage: 文档管理
UserKBPermissionFullControl: 完全控制
UserKBPermissionNotNull: 有权限
UserKBPermissionNull: 无权限
x-enum-descriptions:
- 无权限
- 有权限
- 完全控制
- 文档管理
- 数据运营
x-enum-varnames:
- UserKBPermissionNull
- UserKBPermissionNotNull
- UserKBPermissionFullControl
- UserKBPermissionDocManage
- UserKBPermissionDataOperate
consts.UserRole:
enum:
- admin
- user
type: string
x-enum-comments:
UserRoleAdmin: 管理员
UserRoleUser: 普通用户
x-enum-descriptions:
- 管理员
- 普通用户
x-enum-varnames:
- UserRoleAdmin
- UserRoleUser
consts.WatermarkSetting:
enum:
- ""
- hidden
- visible
type: string
x-enum-comments:
WatermarkDisabled: 未开启水印
WatermarkHidden: 隐形水印
WatermarkVisible: 显性水印
x-enum-descriptions:
- 未开启水印
- 隐形水印
- 显性水印
x-enum-varnames:
- WatermarkDisabled
- WatermarkHidden
- WatermarkVisible
domain.AIFeedbackSettings:
properties:
ai_feedback_type:
items:
type: string
type: array
is_enabled:
type: boolean
type: object
domain.AccessSettings:
properties:
base_url:
type: string
enterprise_auth:
$ref: '#/definitions/domain.EnterpriseAuth'
hosts:
items:
type: string
type: array
is_forbidden:
description: 禁止访问
type: boolean
ports:
items:
type: integer
type: array
private_key:
type: string
public_key:
type: string
simple_auth:
$ref: '#/definitions/domain.SimpleAuth'
source_type:
allOf:
- $ref: '#/definitions/consts.SourceType'
description: 企业认证来源
ssl_ports:
items:
type: integer
type: array
trusted_proxies:
items:
type: string
type: array
type: object
domain.AnydocUploadResp:
properties:
code:
type: integer
data:
type: string
err:
type: string
type: object
domain.AppDetailResp:
properties:
id:
type: string
kb_id:
type: string
name:
type: string
recommend_nodes:
items:
$ref: '#/definitions/domain.RecommendNodeListResp'
type: array
settings:
$ref: '#/definitions/domain.AppSettingsResp'
type:
$ref: '#/definitions/domain.AppType'
type: object
domain.AppInfoResp:
properties:
base_url:
type: string
name:
type: string
recommend_nodes:
items:
$ref: '#/definitions/domain.RecommendNodeListResp'
type: array
settings:
$ref: '#/definitions/domain.AppSettingsResp'
type: object
domain.AppSettings:
properties:
ai_feedback_settings:
allOf:
- $ref: '#/definitions/domain.AIFeedbackSettings'
description: AI feedback
body_code:
type: string
btns:
items: {}
type: array
catalog_settings:
allOf:
- $ref: '#/definitions/domain.CatalogSettings'
description: catalog settings
contribute_settings:
$ref: '#/definitions/domain.ContributeSettings'
conversation_setting:
$ref: '#/definitions/domain.ConversationSetting'
copy_setting:
allOf:
- $ref: '#/definitions/consts.CopySetting'
enum:
- ""
- append
- disabled
desc:
description: seo
type: string
dingtalk_bot_client_id:
type: string
dingtalk_bot_client_secret:
type: string
dingtalk_bot_is_enabled:
description: DingTalkBot
type: boolean
dingtalk_bot_template_id:
type: string
disclaimer_settings:
allOf:
- $ref: '#/definitions/domain.DisclaimerSettings'
description: Disclaimer Settings
discord_bot_is_enabled:
description: DisCordBot
type: boolean
discord_bot_token:
type: string
document_feedback_is_enabled:
description: document feedback
type: boolean
feishu_bot_app_id:
type: string
feishu_bot_app_secret:
type: string
feishu_bot_is_enabled:
description: FeishuBot
type: boolean
footer_settings:
allOf:
- $ref: '#/definitions/domain.FooterSettings'
description: footer settings
head_code:
description: inject code
type: string
home_page_setting:
$ref: '#/definitions/consts.HomePageSetting'
icon:
type: string
keyword:
type: string
lark_bot_settings:
allOf:
- $ref: '#/definitions/domain.LarkBotSettings'
description: LarkBot
mcp_server_settings:
allOf:
- $ref: '#/definitions/domain.MCPServerSettings'
description: MCP Server Settings
openai_api_bot_settings:
allOf:
- $ref: '#/definitions/domain.OpenAIAPIBotSettings'
description: OpenAI API Bot settings
recommend_node_ids:
items:
type: string
type: array
recommend_questions:
items:
type: string
type: array
search_placeholder:
type: string
stats_setting:
$ref: '#/definitions/domain.StatsSetting'
theme_and_style:
$ref: '#/definitions/domain.ThemeAndStyle'
theme_mode:
description: theme
type: string
title:
description: nav
type: string
watermark_content:
type: string
watermark_setting:
allOf:
- $ref: '#/definitions/consts.WatermarkSetting'
enum:
- ""
- hidden
- visible
web_app_comment_settings:
allOf:
- $ref: '#/definitions/domain.WebAppCommentSettings'
description: webapp comment settings
web_app_custom_style:
allOf:
- $ref: '#/definitions/domain.WebAppCustomSettings'
description: WebAppCustomStyle
web_app_landing_configs:
description: WebAppLandingConfigs
items:
$ref: '#/definitions/domain.WebAppLandingConfig'
type: array
web_app_landing_theme:
$ref: '#/definitions/domain.WebAppLandingTheme'
wechat_app_advanced_setting:
$ref: '#/definitions/domain.WeChatAppAdvancedSetting'
wechat_app_agent_id:
type: string
wechat_app_corpid:
type: string
wechat_app_encodingaeskey:
type: string
wechat_app_is_enabled:
description: WechatAppBot 企业微信机器人
type: boolean
wechat_app_secret:
type: string
wechat_app_token:
type: string
wechat_official_account_app_id:
type: string
wechat_official_account_app_secret:
type: string
wechat_official_account_encodingaeskey:
type: string
wechat_official_account_is_enabled:
description: WechatOfficialAccount
type: boolean
wechat_official_account_token:
type: string
wechat_service_contain_keywords:
items:
type: string
type: array
wechat_service_corpid:
type: string
wechat_service_encodingaeskey:
type: string
wechat_service_equal_keywords:
items:
type: string
type: array
wechat_service_is_enabled:
description: WechatServiceBot
type: boolean
wechat_service_logo:
type: string
wechat_service_secret:
type: string
wechat_service_token:
type: string
wecom_ai_bot_settings:
allOf:
- $ref: '#/definitions/domain.WecomAIBotSettings'
description: WecomAIBotSettings 企业微信智能机器人
welcome_str:
description: welcome
type: string
widget_bot_settings:
allOf:
- $ref: '#/definitions/domain.WidgetBotSettings'
description: Widget bot settings
type: object
domain.AppSettingsResp:
properties:
ai_feedback_settings:
allOf:
- $ref: '#/definitions/domain.AIFeedbackSettings'
description: AI feedback
body_code:
type: string
btns:
items: {}
type: array
catalog_settings:
allOf:
- $ref: '#/definitions/domain.CatalogSettings'
description: catalog settings
contribute_settings:
$ref: '#/definitions/domain.ContributeSettings'
conversation_setting:
$ref: '#/definitions/domain.ConversationSetting'
copy_setting:
$ref: '#/definitions/consts.CopySetting'
desc:
description: seo
type: string
dingtalk_bot_client_id:
type: string
dingtalk_bot_client_secret:
type: string
dingtalk_bot_is_enabled:
description: DingTalkBot
type: boolean
dingtalk_bot_template_id:
type: string
disclaimer_settings:
allOf:
- $ref: '#/definitions/domain.DisclaimerSettings'
description: Disclaimer Settings
discord_bot_is_enabled:
description: DisCordBot
type: boolean
discord_bot_token:
type: string
document_feedback_is_enabled:
description: document feedback
type: boolean
feishu_bot_app_id:
type: string
feishu_bot_app_secret:
type: string
feishu_bot_is_enabled:
description: FeishuBot
type: boolean
footer_settings:
allOf:
- $ref: '#/definitions/domain.FooterSettings'
description: footer settings
head_code:
description: inject code
type: string
home_page_setting:
$ref: '#/definitions/consts.HomePageSetting'
icon:
type: string
keyword:
type: string
lark_bot_settings:
allOf:
- $ref: '#/definitions/domain.LarkBotSettings'
description: LarkBot
mcp_server_settings:
allOf:
- $ref: '#/definitions/domain.MCPServerSettings'
description: MCP Server Settings
openai_api_bot_settings:
allOf:
- $ref: '#/definitions/domain.OpenAIAPIBotSettings'
description: OpenAI API settings
recommend_node_ids:
items:
type: string
type: array
recommend_questions:
items:
type: string
type: array
search_placeholder:
type: string
stats_setting:
$ref: '#/definitions/domain.StatsSetting'
theme_and_style:
$ref: '#/definitions/domain.ThemeAndStyle'
theme_mode:
description: theme
type: string
title:
description: nav
type: string
watermark_content:
type: string
watermark_setting:
$ref: '#/definitions/consts.WatermarkSetting'
web_app_comment_settings:
allOf:
- $ref: '#/definitions/domain.WebAppCommentSettings'
description: webapp comment settings
web_app_custom_style:
allOf:
- $ref: '#/definitions/domain.WebAppCustomSettings'
description: WebAppCustomStyle
web_app_landing_configs:
description: WebApp Landing Settings
items:
$ref: '#/definitions/domain.WebAppLandingConfigResp'
type: array
web_app_landing_theme:
$ref: '#/definitions/domain.WebAppLandingTheme'
wechat_app_advanced_setting:
$ref: '#/definitions/domain.WeChatAppAdvancedSetting'
wechat_app_agent_id:
type: string
wechat_app_corpid:
type: string
wechat_app_encodingaeskey:
type: string
wechat_app_is_enabled:
description: WechatAppBot
type: boolean
wechat_app_secret:
type: string
wechat_app_token:
type: string
wechat_official_account_app_id:
type: string
wechat_official_account_app_secret:
type: string
wechat_official_account_encodingaeskey:
type: string
wechat_official_account_is_enabled:
description: WechatOfficialAccount
type: boolean
wechat_official_account_token:
type: string
wechat_service_contain_keywords:
items:
type: string
type: array
wechat_service_corpid:
type: string
wechat_service_encodingaeskey:
type: string
wechat_service_equal_keywords:
items:
type: string
type: array
wechat_service_is_enabled:
description: WechatServiceBot
type: boolean
wechat_service_logo:
type: string
wechat_service_secret:
type: string
wechat_service_token:
type: string
wecom_ai_bot_settings:
$ref: '#/definitions/domain.WecomAIBotSettings'
welcome_str:
description: welcome
type: string
widget_bot_settings:
allOf:
- $ref: '#/definitions/domain.WidgetBotSettings'
description: WidgetBot
type: object
domain.AppType:
enum:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
format: int32
type: integer
x-enum-varnames:
- AppTypeWeb
- AppTypeWidget
- AppTypeDingTalkBot
- AppTypeFeishuBot
- AppTypeWechatBot
- AppTypeWechatServiceBot
- AppTypeDisCordBot
- AppTypeWechatOfficialAccount
- AppTypeOpenAIAPI
- AppTypeWecomAIBot
- AppTypeLarkBot
- AppTypeMcpServer
domain.AuthUserInfo:
properties:
avatar_url:
type: string
email:
type: string
username:
type: string
type: object
domain.BannerConfig:
properties:
bg_url:
type: string
btns:
items:
properties:
href:
type: string
id:
type: string
text:
type: string
type:
type: string
type: object
type: array
hot_search:
items:
type: string
type: array
placeholder:
type: string
subtitle:
type: string
subtitle_color:
type: string
subtitle_font_size:
type: integer
title:
type: string
title_color:
type: string
title_font_size:
type: integer
type: object
domain.BasicDocConfig:
properties:
bg_color:
type: string
title:
type: string
title_color:
type: string
type: object
domain.BatchMoveReq:
properties:
ids:
items:
type: string
type: array
kb_id:
type: string
parent_id:
type: string
required:
- ids
- kb_id
type: object
domain.BlockGridConfig:
properties:
list:
items:
properties:
id:
type: string
name:
type: string
url:
type: string
type: object
type: array
title:
type: string
type:
type: string
type: object
domain.BrandGroup:
properties:
links:
items:
$ref: '#/definitions/domain.Link'
type: array
name:
type: string
type: object
domain.BrowserCount:
properties:
count:
type: integer
name:
type: string
type: object
domain.CarouselConfig:
properties:
bg_color:
type: string
list:
items:
properties:
desc:
type: string
id:
type: string
title:
type: string
url:
type: string
type: object
type: array
title:
type: string
type: object
domain.CaseConfig:
properties:
list:
items:
properties:
id:
type: string
link:
type: string
name:
type: string
type: object
type: array
title:
type: string
type:
type: string
type: object
domain.CatalogSettings:
properties:
catalog_folder:
description: '1: 展开, 2: 折叠, default: 1'
type: integer
catalog_visible:
description: '1: 显示, 2: 隐藏, default: 1'
type: integer
catalog_width:
description: '200 - 300, default: 260'
type: integer
type: object
domain.ChatRequest:
properties:
app_type:
allOf:
- $ref: '#/definitions/domain.AppType'
enum:
- 1
- 2
captcha_token:
type: string
conversation_id:
type: string
image_paths:
items:
type: string
maxItems: 3
type: array
message:
type: string
nonce:
type: string
required:
- app_type
type: object
domain.ChatSearchReq:
properties:
captcha_token:
type: string
message:
type: string
required:
- message
type: object
domain.ChatSearchResp:
properties:
node_result:
items:
$ref: '#/definitions/domain.NodeContentChunkSSE'
type: array
type: object
domain.CommentConfig:
properties:
list:
items:
properties:
avatar:
type: string
comment:
type: string
id:
type: string
profession:
type: string
user_name:
type: string
type: object
type: array
title:
type: string
type:
type: string
type: object
domain.CommentInfo:
properties:
auth_user_id:
type: integer
avatar:
description: avatar
type: string
email:
type: string
remote_ip:
type: string
user_name:
type: string
type: object
domain.CommentListItem:
properties:
content:
type: string
created_at:
type: string
id:
type: string
info:
$ref: '#/definitions/domain.CommentInfo'
ip_address:
allOf:
- $ref: '#/definitions/domain.IPAddress'
description: ip地址
node_id:
type: string
node_name:
description: 文档标题
type: string
node_type:
type: integer
root_id:
type: string
status:
allOf:
- $ref: '#/definitions/domain.CommentStatus'
description: 'status : -1 reject 0 pending 1 accept'
type: object
domain.CommentReq:
properties:
captcha_token:
type: string
content:
type: string
node_id:
type: string
parent_id:
type: string
pic_urls:
items:
type: string
type: array
root_id:
type: string
user_name:
type: string
required:
- content
- node_id
- pic_urls
type: object
domain.CommentStatus:
enum:
- -1
- 0
- 1
format: int32
type: integer
x-enum-varnames:
- CommentStatusReject
- CommentStatusPending
- CommentStatusAccepted
domain.CompleteReq:
properties:
prefix:
description: For FIM (Fill in Middle) style completion
type: string
suffix:
type: string
type: object
domain.ContributeSettings:
properties:
is_enable:
type: boolean
type: object
domain.ConversationDetailResp:
properties:
app_id:
type: string
created_at:
type: string
id:
type: string
ip_address:
$ref: '#/definitions/domain.IPAddress'
messages:
items:
$ref: '#/definitions/domain.ConversationMessage'
type: array
references:
items:
$ref: '#/definitions/domain.ConversationReference'
type: array
remote_ip:
type: string
subject:
type: string
type: object
domain.ConversationInfo:
properties:
user_info:
$ref: '#/definitions/domain.UserInfo'
type: object
domain.ConversationListItem:
properties:
app_name:
type: string
app_type:
$ref: '#/definitions/domain.AppType'
created_at:
type: string
feedback_info:
allOf:
- $ref: '#/definitions/domain.FeedBackInfo'
description: 用户反馈信息
id:
type: string
info:
allOf:
- $ref: '#/definitions/domain.ConversationInfo'
description: 用户信息
ip_address:
$ref: '#/definitions/domain.IPAddress'
remote_ip:
type: string
subject:
type: string
type: object
domain.ConversationMessage:
properties:
app_id:
type: string
completion_tokens:
type: integer
content:
type: string
conversation_id:
type: string
created_at:
type: string
id:
type: string
image_paths:
items:
type: string
type: array
info:
allOf:
- $ref: '#/definitions/domain.FeedBackInfo'
description: feedbackinfo
kb_id:
type: string
model:
type: string
parent_id:
description: parent_id
type: string
prompt_tokens:
type: integer
provider:
allOf:
- $ref: '#/definitions/github_com_chaitin_panda-wiki_domain.ModelProvider'
description: model
remote_ip:
description: stats
type: string
role:
$ref: '#/definitions/schema.RoleType'
total_tokens:
type: integer
type: object
domain.ConversationMessageListItem:
properties:
app_id:
type: string
app_type:
$ref: '#/definitions/domain.AppType'
conversation_id:
type: string
conversation_info:
allOf:
- $ref: '#/definitions/domain.ConversationInfo'
description: userInfo
created_at:
type: string
id:
type: string
info:
allOf:
- $ref: '#/definitions/domain.FeedBackInfo'
description: feedbackInfo
ip_address:
$ref: '#/definitions/domain.IPAddress'
question:
type: string
remote_ip:
description: stats
type: string
type: object
domain.ConversationReference:
properties:
app_id:
type: string
conversation_id:
type: string
name:
type: string
node_id:
type: string
url:
type: string
type: object
domain.ConversationSetting:
properties:
copyright_hide_enabled:
type: boolean
copyright_info:
type: string
type: object
domain.CreateKBReleaseReq:
properties:
kb_id:
type: string
message:
type: string
node_ids:
description: create release after these nodes published
items:
type: string
type: array
tag:
type: string
required:
- kb_id
- message
- tag
type: object
domain.CreateKnowledgeBaseReq:
properties:
hosts:
items:
type: string
type: array
name:
type: string
ports:
items:
type: integer
type: array
private_key:
type: string
public_key:
type: string
ssl_ports:
items:
type: integer
type: array
required:
- name
type: object
domain.CreateModelReq:
properties:
api_header:
type: string
api_key:
type: string
api_version:
description: for azure openai
type: string
base_url:
type: string
model:
type: string
parameters:
$ref: '#/definitions/github_com_chaitin_panda-wiki_domain.ModelParam'
provider:
$ref: '#/definitions/github_com_chaitin_panda-wiki_domain.ModelProvider'
type:
allOf:
- $ref: '#/definitions/domain.ModelType'
enum:
- chat
- embedding
- rerank
- analysis
- analysis-vl
required:
- base_url
- model
- provider
- type
type: object
domain.CreateNodeReq:
properties:
content:
type: string
content_type:
type: string
emoji:
type: string
kb_id:
type: string
name:
type: string
nav_id:
type: string
parent_id:
type: string
position:
type: number
summary:
type: string
type:
allOf:
- $ref: '#/definitions/domain.NodeType'
enum:
- 1
- 2
required:
- kb_id
- name
- nav_id
- type
type: object
domain.DirDocConfig:
properties:
bg_color:
type: string
title:
type: string
title_color:
type: string
type: object
domain.DisclaimerSettings:
properties:
content:
type: string
type: object
domain.EnterpriseAuth:
properties:
enabled:
type: boolean
type: object
domain.FaqConfig:
properties:
bg_color:
type: string
list:
items:
properties:
id:
type: string
link:
type: string
question:
type: string
type: object
type: array
title:
type: string
title_color:
type: string
type: object
domain.FeatureConfig:
properties:
list:
items:
properties:
desc:
type: string
id:
type: string
name:
type: string
type: object
type: array
title:
type: string
type:
type: string
type: object
domain.FeedBackInfo:
properties:
feedback_content:
type: string
feedback_type:
type: string
score:
$ref: '#/definitions/domain.ScoreType'
type: object
domain.FeedbackRequest:
properties:
conversation_id:
type: string
feedback_content:
description: 限制内容长度
maxLength: 200
type: string
message_id:
type: string
score:
allOf:
- $ref: '#/definitions/domain.ScoreType'
description: -1 踩 ,0 1 赞成
type:
description: 内容不准确,没有帮助,.......
type: string
required:
- message_id
type: object
domain.FooterSettings:
properties:
brand_desc:
type: string
brand_groups:
items:
$ref: '#/definitions/domain.BrandGroup'
type: array
brand_logo:
type: string
brand_name:
type: string
corp_name:
type: string
footer_style:
type: string
icp:
type: string
type: object
domain.GetKBReleaseListResp:
properties:
data:
items:
$ref: '#/definitions/domain.KBReleaseListItemResp'
type: array
total:
type: integer
type: object
domain.GetProviderModelListReq:
properties:
api_header:
type: string
api_key:
type: string
base_url:
type: string
provider:
type: string
type:
allOf:
- $ref: '#/definitions/domain.ModelType'
enum:
- chat
- embedding
- rerank
- analysis
- analysis-vl
required:
- base_url
- provider
- type
type: object
domain.GetProviderModelListResp:
properties:
models:
items:
$ref: '#/definitions/domain.ProviderModelListItem'
type: array
type: object
domain.HotBrowser:
properties:
browser:
items:
$ref: '#/definitions/domain.BrowserCount'
type: array
os:
items:
$ref: '#/definitions/domain.BrowserCount'
type: array
type: object
domain.HotPage:
properties:
count:
type: integer
node_id:
type: string
node_name:
type: string
scene:
$ref: '#/definitions/domain.StatPageScene'
type: object
domain.HotRefererHost:
properties:
count:
type: integer
referer_host:
type: string
type: object
domain.IPAddress:
properties:
city:
type: string
country:
type: string
ip:
type: string
province:
type: string
type: object
domain.ImgTextConfig:
properties:
item:
properties:
desc:
type: string
name:
type: string
url:
type: string
type: object
title:
type: string
type:
type: string
type: object
domain.InstantCountResp:
properties:
count:
type: integer
time:
type: string
type: object
domain.InstantPageResp:
properties:
created_at:
type: string
info:
$ref: '#/definitions/domain.AuthUserInfo'
ip:
type: string
ip_address:
$ref: '#/definitions/domain.IPAddress'
node_id:
type: string
node_name:
type: string
scene:
$ref: '#/definitions/domain.StatPageScene'
user_id:
type: integer
type: object
domain.KBReleaseListItemResp:
properties:
created_at:
type: string
id:
type: string
kb_id:
type: string
message:
type: string
publisher_account:
type: string
tag:
type: string
type: object
domain.KnowledgeBaseDetail:
properties:
access_settings:
$ref: '#/definitions/domain.AccessSettings'
created_at:
type: string
dataset_id:
type: string
id:
type: string
name:
type: string
perm:
allOf:
- $ref: '#/definitions/consts.UserKBPermission'
description: 用户对知识库的权限
updated_at:
type: string
type: object
domain.KnowledgeBaseListItem:
properties:
access_settings:
$ref: '#/definitions/domain.AccessSettings'
created_at:
type: string
dataset_id:
type: string
id:
type: string
name:
type: string
updated_at:
type: string
type: object
domain.LarkBotSettings:
properties:
app_id:
type: string
app_secret:
type: string
encrypt_key:
type: string
is_enabled:
type: boolean
verify_token:
type: string
type: object
domain.Link:
properties:
name:
type: string
url:
type: string
type: object
domain.MCPServerSettings:
properties:
docs_tool_settings:
$ref: '#/definitions/domain.MCPToolSettings'
is_enabled:
type: boolean
sample_auth:
$ref: '#/definitions/domain.SimpleAuth'
type: object
domain.MCPToolSettings:
properties:
desc:
type: string
name:
type: string
type: object
domain.MessageContent:
type: object
domain.MessageFrom:
enum:
- 1
- 2
type: integer
x-enum-varnames:
- MessageFromGroup
- MessageFromPrivate
domain.MetricsConfig:
properties:
list:
items:
properties:
id:
type: string
name:
type: string
number:
type: string
type: object
type: array
title:
type: string
type:
type: string
type: object
domain.ModelModeSetting:
properties:
auto_mode_api_key:
description: 百智云 API Key
type: string
chat_model:
description: 自定义对话模型名称
type: string
is_manual_embedding_updated:
description: 手动模式下嵌入模型是否更新
type: boolean
mode:
allOf:
- $ref: '#/definitions/consts.ModelSettingMode'
description: '模式: manual 或 auto'
type: object
domain.ModelType:
enum:
- chat
- embedding
- rerank
- analysis
- analysis-vl
type: string
x-enum-varnames:
- ModelTypeChat
- ModelTypeEmbedding
- ModelTypeRerank
- ModelTypeAnalysis
- ModelTypeAnalysisVL
domain.MoveNodeReq:
properties:
id:
type: string
kb_id:
type: string
next_id:
type: string
parent_id:
type: string
prev_id:
type: string
required:
- id
- kb_id
type: object
domain.NavDocConfig:
properties:
nav_ids:
items:
type: string
type: array
title:
type: string
type: object
domain.NodeActionReq:
properties:
action:
enum:
- delete
type: string
ids:
items:
type: string
type: array
kb_id:
type: string
required:
- action
- ids
- kb_id
type: object
domain.NodeContentChunkSSE:
properties:
emoji:
type: string
name:
type: string
node_id:
type: string
node_path_names:
items:
type: string
type: array
summary:
type: string
type: object
domain.NodeGroupDetail:
properties:
auth_group_id:
type: integer
auth_ids:
items:
type: integer
type: array
kb_id:
type: string
name:
type: string
node_id:
type: string
perm:
$ref: '#/definitions/consts.NodePermName'
type: object
domain.NodeListItemResp:
properties:
content_type:
type: string
created_at:
type: string
creator:
type: string
creator_id:
type: string
editor:
type: string
editor_id:
type: string
emoji:
type: string
id:
type: string
name:
type: string
nav_id:
type: string
parent_id:
type: string
permissions:
$ref: '#/definitions/domain.NodePermissions'
position:
type: number
publisher_id:
type: string
rag_info:
$ref: '#/definitions/domain.RagInfo'
status:
$ref: '#/definitions/domain.NodeStatus'
summary:
type: string
type:
$ref: '#/definitions/domain.NodeType'
updated_at:
type: string
type: object
domain.NodeMeta:
properties:
content_type:
type: string
emoji:
type: string
summary:
type: string
type: object
domain.NodePermissions:
properties:
answerable:
allOf:
- $ref: '#/definitions/consts.NodeAccessPerm'
description: 可被问答
visible:
allOf:
- $ref: '#/definitions/consts.NodeAccessPerm'
description: 导航内可见
visitable:
allOf:
- $ref: '#/definitions/consts.NodeAccessPerm'
description: 可被访问
type: object
domain.NodeStatus:
enum:
- 0
- 1
- 2
format: int32
type: integer
x-enum-comments:
NodeStatusDraft: 更新未发布
NodeStatusPublished: 已发布
NodeStatusUnreleased: 草稿
x-enum-descriptions:
- 草稿
- 更新未发布
- 已发布
x-enum-varnames:
- NodeStatusUnreleased
- NodeStatusDraft
- NodeStatusPublished
domain.NodeSummaryReq:
properties:
ids:
items:
type: string
type: array
kb_id:
type: string
required:
- ids
- kb_id
type: object
domain.NodeType:
enum:
- 1
- 2
format: int32
type: integer
x-enum-varnames:
- NodeTypeFolder
- NodeTypeDocument
domain.ObjectUploadResp:
properties:
filename:
type: string
key:
type: string
type: object
domain.OpenAIAPIBotSettings:
properties:
is_enabled:
type: boolean
secret_key:
type: string
type: object
domain.OpenAIChoice:
properties:
delta:
allOf:
- $ref: '#/definitions/domain.OpenAIMessage'
description: for streaming
finish_reason:
type: string
index:
type: integer
message:
$ref: '#/definitions/domain.OpenAIMessage'
type: object
domain.OpenAICompletionsRequest:
properties:
frequency_penalty:
type: number
max_tokens:
type: integer
messages:
items:
$ref: '#/definitions/domain.OpenAIMessage'
type: array
model:
type: string
presence_penalty:
type: number
response_format:
$ref: '#/definitions/domain.OpenAIResponseFormat'
stop:
items:
type: string
type: array
stream:
type: boolean
stream_options:
$ref: '#/definitions/domain.OpenAIStreamOptions'
temperature:
type: number
tool_choice:
$ref: '#/definitions/domain.OpenAIToolChoice'
tools:
items:
$ref: '#/definitions/domain.OpenAITool'
type: array
top_p:
type: number
user:
type: string
required:
- messages
- model
type: object
domain.OpenAICompletionsResponse:
properties:
choices:
items:
$ref: '#/definitions/domain.OpenAIChoice'
type: array
created:
type: integer
id:
type: string
model:
type: string
object:
type: string
usage:
$ref: '#/definitions/domain.OpenAIUsage'
type: object
domain.OpenAIError:
properties:
code:
type: string
message:
type: string
param:
type: string
type:
type: string
type: object
domain.OpenAIErrorResponse:
properties:
error:
$ref: '#/definitions/domain.OpenAIError'
type: object
domain.OpenAIFunction:
properties:
description:
type: string
name:
type: string
parameters:
additionalProperties: true
type: object
required:
- name
type: object
domain.OpenAIFunctionCall:
properties:
arguments:
type: string
name:
type: string
required:
- arguments
- name
type: object
domain.OpenAIFunctionChoice:
properties:
name:
type: string
required:
- name
type: object
domain.OpenAIMessage:
properties:
content:
$ref: '#/definitions/domain.MessageContent'
name:
type: string
role:
type: string
tool_call_id:
type: string
tool_calls:
items:
$ref: '#/definitions/domain.OpenAIToolCall'
type: array
required:
- role
type: object
domain.OpenAIResponseFormat:
properties:
type:
type: string
required:
- type
type: object
domain.OpenAIStreamOptions:
properties:
include_usage:
type: boolean
type: object
domain.OpenAITool:
properties:
function:
$ref: '#/definitions/domain.OpenAIFunction'
type:
type: string
required:
- type
type: object
domain.OpenAIToolCall:
properties:
function:
$ref: '#/definitions/domain.OpenAIFunctionCall'
id:
type: string
type:
type: string
required:
- function
- id
- type
type: object
domain.OpenAIToolChoice:
properties:
function:
$ref: '#/definitions/domain.OpenAIFunctionChoice'
type:
type: string
type: object
domain.OpenAIUsage:
properties:
completion_tokens:
type: integer
prompt_tokens:
type: integer
total_tokens:
type: integer
type: object
domain.PWResponse:
properties:
code:
type: integer
data: {}
message:
type: string
success:
type: boolean
type: object
domain.PaginatedResult-array_domain_ConversationMessageListItem:
properties:
data:
items:
$ref: '#/definitions/domain.ConversationMessageListItem'
type: array
total:
type: integer
type: object
domain.ProviderModelListItem:
properties:
model:
type: string
type: object
domain.QuestionConfig:
properties:
list:
items:
properties:
id:
type: string
question:
type: string
type: object
type: array
title:
type: string
type:
type: string
type: object
domain.RagInfo:
properties:
message:
type: string
status:
$ref: '#/definitions/consts.NodeRagInfoStatus'
synced_at:
type: string
type: object
domain.RecommendNodeListResp:
properties:
emoji:
type: string
id:
type: string
name:
type: string
nav_id:
type: string
nav_name:
type: string
parent_id:
type: string
permissions:
$ref: '#/definitions/domain.NodePermissions'
position:
type: number
recommend_nodes:
items:
$ref: '#/definitions/domain.RecommendNodeListResp'
type: array
summary:
type: string
type:
$ref: '#/definitions/domain.NodeType'
type: object
domain.Response:
properties:
data: {}
message:
type: string
success:
type: boolean
type: object
domain.ScoreType:
enum:
- 1
- -1
type: integer
x-enum-varnames:
- Like
- DisLike
domain.ShareCommentListItem:
properties:
content:
type: string
created_at:
type: string
id:
type: string
info:
$ref: '#/definitions/domain.CommentInfo'
ip_address:
allOf:
- $ref: '#/definitions/domain.IPAddress'
description: ip地址
kb_id:
type: string
node_id:
type: string
parent_id:
type: string
pic_urls:
items:
type: string
type: array
root_id:
type: string
type: object
domain.ShareConversationDetailResp:
properties:
created_at:
type: string
id:
type: string
messages:
items:
$ref: '#/definitions/domain.ShareConversationMessage'
type: array
subject:
type: string
type: object
domain.ShareConversationMessage:
properties:
content:
type: string
created_at:
type: string
image_paths:
items:
type: string
type: array
role:
$ref: '#/definitions/schema.RoleType'
type: object
domain.ShareNodeDetailItem:
properties:
children:
items:
$ref: '#/definitions/domain.ShareNodeDetailItem'
type: array
emoji:
type: string
id:
type: string
meta:
$ref: '#/definitions/domain.NodeMeta'
name:
type: string
parent_id:
type: string
permissions:
$ref: '#/definitions/domain.NodePermissions'
position:
type: number
type:
$ref: '#/definitions/domain.NodeType'
updated_at:
type: string
type: object
domain.SimpleAuth:
properties:
enabled:
type: boolean
password:
type: string
type: object
domain.SimpleDocConfig:
properties:
bg_color:
type: string
title:
type: string
title_color:
type: string
type: object
domain.SocialMediaAccount:
properties:
channel:
type: string
icon:
type: string
link:
type: string
phone:
type: string
text:
type: string
type: object
domain.StatPageReq:
properties:
node_id:
type: string
scene:
allOf:
- $ref: '#/definitions/domain.StatPageScene'
enum:
- 1
- 2
- 3
- 4
required:
- scene
type: object
domain.StatPageScene:
enum:
- 1
- 2
- 3
- 4
type: integer
x-enum-varnames:
- StatPageSceneWelcome
- StatPageSceneNodeDetail
- StatPageSceneChat
- StatPageSceneLogin
domain.StatsSetting:
properties:
pv_enable:
type: boolean
type: object
domain.SwitchModeReq:
properties:
auto_mode_api_key:
description: 百智云 API Key
type: string
chat_model:
description: 自定义对话模型名称
type: string
mode:
enum:
- manual
- auto
type: string
required:
- mode
type: object
domain.SwitchModeResp:
properties:
message:
type: string
type: object
domain.TextConfig:
properties:
title:
type: string
type:
type: string
type: object
domain.TextImgConfig:
properties:
item:
properties:
desc:
type: string
name:
type: string
url:
type: string
type: object
title:
type: string
type:
type: string
type: object
domain.TextReq:
properties:
action:
description: 'action: improve, summary, extend, shorten, etc.'
type: string
text:
type: string
required:
- text
type: object
domain.ThemeAndStyle:
properties:
bg_image:
type: string
doc_width:
type: string
type: object
domain.UpdateAppReq:
properties:
kb_id:
type: string
name:
type: string
settings:
$ref: '#/definitions/domain.AppSettings'
type: object
domain.UpdateKnowledgeBaseReq:
properties:
access_settings:
$ref: '#/definitions/domain.AccessSettings'
id:
type: string
name:
type: string
required:
- id
type: object
domain.UpdateModelReq:
properties:
api_header:
type: string
api_key:
type: string
api_version:
description: for azure openai
type: string
base_url:
type: string
id:
type: string
is_active:
type: boolean
model:
type: string
parameters:
$ref: '#/definitions/github_com_chaitin_panda-wiki_domain.ModelParam'
provider:
$ref: '#/definitions/github_com_chaitin_panda-wiki_domain.ModelProvider'
type:
allOf:
- $ref: '#/definitions/domain.ModelType'
enum:
- chat
- embedding
- rerank
- analysis
- analysis-vl
required:
- base_url
- id
- model
- provider
- type
type: object
domain.UpdateNodeReq:
properties:
content:
type: string
content_type:
type: string
emoji:
type: string
id:
type: string
kb_id:
type: string
name:
type: string
nav_id:
type: string
position:
type: number
summary:
type: string
required:
- id
- kb_id
type: object
domain.UploadByUrlReq:
properties:
kb_id:
type: string
url:
type: string
required:
- url
type: object
domain.UserInfo:
properties:
auth_user_id:
type: integer
avatar:
description: avatar
type: string
email:
type: string
from:
$ref: '#/definitions/domain.MessageFrom'
name:
type: string
real_name:
type: string
user_id:
type: string
type: object
domain.WeChatAppAdvancedSetting:
properties:
disclaimer_content:
type: string
feedback_enable:
type: boolean
feedback_type:
items:
type: string
type: array
prompt:
type: string
text_response_enable:
type: boolean
type: object
domain.WebAppCommentSettings:
properties:
is_enable:
type: boolean
moderation_enable:
type: boolean
type: object
domain.WebAppCustomSettings:
properties:
allow_theme_switching:
type: boolean
footer_show_intro:
type: boolean
header_search_placeholder:
type: string
show_brand_info:
type: boolean
social_media_accounts:
items:
$ref: '#/definitions/domain.SocialMediaAccount'
type: array
type: object
domain.WebAppLandingConfig:
properties:
banner_config:
$ref: '#/definitions/domain.BannerConfig'
basic_doc_config:
$ref: '#/definitions/domain.BasicDocConfig'
block_grid_config:
$ref: '#/definitions/domain.BlockGridConfig'
carousel_config:
$ref: '#/definitions/domain.CarouselConfig'
case_config:
$ref: '#/definitions/domain.CaseConfig'
com_config_order:
items:
type: string
type: array
comment_config:
$ref: '#/definitions/domain.CommentConfig'
dir_doc_config:
$ref: '#/definitions/domain.DirDocConfig'
faq_config:
$ref: '#/definitions/domain.FaqConfig'
feature_config:
$ref: '#/definitions/domain.FeatureConfig'
img_text_config:
$ref: '#/definitions/domain.ImgTextConfig'
metrics_config:
$ref: '#/definitions/domain.MetricsConfig'
nav_doc_config:
$ref: '#/definitions/domain.NavDocConfig'
node_ids:
items:
type: string
type: array
question_config:
$ref: '#/definitions/domain.QuestionConfig'
simple_doc_config:
$ref: '#/definitions/domain.SimpleDocConfig'
text_config:
$ref: '#/definitions/domain.TextConfig'
text_img_config:
$ref: '#/definitions/domain.TextImgConfig'
type:
type: string
type: object
domain.WebAppLandingConfigResp:
properties:
banner_config:
$ref: '#/definitions/domain.BannerConfig'
basic_doc_config:
$ref: '#/definitions/domain.BasicDocConfig'
block_grid_config:
$ref: '#/definitions/domain.BlockGridConfig'
carousel_config:
$ref: '#/definitions/domain.CarouselConfig'
case_config:
$ref: '#/definitions/domain.CaseConfig'
com_config_order:
items:
type: string
type: array
comment_config:
$ref: '#/definitions/domain.CommentConfig'
dir_doc_config:
$ref: '#/definitions/domain.DirDocConfig'
faq_config:
$ref: '#/definitions/domain.FaqConfig'
feature_config:
$ref: '#/definitions/domain.FeatureConfig'
img_text_config:
$ref: '#/definitions/domain.ImgTextConfig'
metrics_config:
$ref: '#/definitions/domain.MetricsConfig'
nav_doc_config:
$ref: '#/definitions/domain.NavDocConfig'
node_ids:
items:
type: string
type: array
nodes:
items:
$ref: '#/definitions/domain.RecommendNodeListResp'
type: array
question_config:
$ref: '#/definitions/domain.QuestionConfig'
simple_doc_config:
$ref: '#/definitions/domain.SimpleDocConfig'
text_config:
$ref: '#/definitions/domain.TextConfig'
text_img_config:
$ref: '#/definitions/domain.TextImgConfig'
type:
type: string
type: object
domain.WebAppLandingTheme:
properties:
name:
type: string
type: object
domain.WecomAIBotSettings:
properties:
encodingaeskey:
type: string
is_enabled:
type: boolean
token:
type: string
type: object
domain.WidgetBotSettings:
properties:
btn_id:
type: string
btn_logo:
type: string
btn_position:
type: string
btn_style:
type: string
btn_text:
type: string
copyright_hide_enabled:
type: boolean
copyright_info:
type: string
disclaimer:
type: string
is_open:
type: boolean
modal_position:
type: string
placeholder:
type: string
recommend_node_ids:
items:
type: string
type: array
recommend_questions:
items:
type: string
type: array
search_mode:
type: string
theme_mode:
type: string
type: object
github_com_chaitin_panda-wiki_api_auth_v1.AuthGetResp:
properties:
auths:
items:
$ref: '#/definitions/v1.AuthItem'
type: array
client_id:
type: string
client_secret:
type: string
proxy:
type: string
source_type:
$ref: '#/definitions/consts.SourceType'
type: object
github_com_chaitin_panda-wiki_api_node_v1.NodeListGroupNavResp:
properties:
count:
type: integer
is_released:
type: boolean
list:
items:
$ref: '#/definitions/domain.NodeListItemResp'
type: array
nav_id:
type: string
nav_name:
type: string
position:
type: number
type: object
github_com_chaitin_panda-wiki_api_share_v1.AuthGetResp:
properties:
auth_type:
$ref: '#/definitions/consts.AuthType'
license_edition:
$ref: '#/definitions/consts.LicenseEdition'
source_type:
$ref: '#/definitions/consts.SourceType'
type: object
github_com_chaitin_panda-wiki_api_share_v1.GitHubCallbackResp:
type: object
github_com_chaitin_panda-wiki_domain.CheckModelReq:
properties:
api_header:
type: string
api_key:
type: string
api_version:
description: for azure openai
type: string
base_url:
type: string
model:
type: string
parameters:
$ref: '#/definitions/github_com_chaitin_panda-wiki_domain.ModelParam'
provider:
$ref: '#/definitions/github_com_chaitin_panda-wiki_domain.ModelProvider'
type:
allOf:
- $ref: '#/definitions/domain.ModelType'
enum:
- chat
- embedding
- rerank
- analysis
- analysis-vl
required:
- base_url
- model
- provider
- type
type: object
github_com_chaitin_panda-wiki_domain.CheckModelResp:
properties:
content:
type: string
error:
type: string
type: object
github_com_chaitin_panda-wiki_domain.ModelListItem:
properties:
api_header:
type: string
api_key:
type: string
api_version:
description: for azure openai
type: string
base_url:
type: string
completion_tokens:
type: integer
id:
type: string
is_active:
type: boolean
model:
type: string
parameters:
$ref: '#/definitions/github_com_chaitin_panda-wiki_domain.ModelParam'
prompt_tokens:
type: integer
provider:
$ref: '#/definitions/github_com_chaitin_panda-wiki_domain.ModelProvider'
total_tokens:
type: integer
type:
$ref: '#/definitions/domain.ModelType'
type: object
github_com_chaitin_panda-wiki_domain.ModelParam:
properties:
context_window:
type: integer
max_tokens:
type: integer
r1_enabled:
type: boolean
support_computer_use:
type: boolean
support_images:
type: boolean
support_prompt_cache:
type: boolean
temperature:
type: number
type: object
github_com_chaitin_panda-wiki_domain.ModelProvider:
enum:
- BaiZhiCloud
type: string
x-enum-varnames:
- ModelProviderBrandBaiZhiCloud
gocap.ChallengeData:
properties:
challenge:
$ref: '#/definitions/gocap.ChallengeItem'
expires:
description: 过期时间,毫秒级时间戳
type: integer
token:
description: 质询令牌
type: string
type: object
gocap.ChallengeItem:
properties:
c:
description: 质询数量
type: integer
d:
description: 质询难度
type: integer
s:
description: 质询大小
type: integer
type: object
gocap.VerificationResult:
properties:
expires:
description: 过期时间,毫秒级时间戳
type: integer
message:
type: string
success:
type: boolean
token:
description: 验证令牌
type: string
type: object
schema.RoleType:
enum:
- assistant
- user
- system
- tool
type: string
x-enum-varnames:
- Assistant
- User
- System
- Tool
share.ShareCommentLists:
properties:
data:
items:
$ref: '#/definitions/domain.ShareCommentListItem'
type: array
total:
type: integer
type: object
v1.AuthGitHubReq:
properties:
kb_id:
type: string
redirect_url:
type: string
type: object
v1.AuthGitHubResp:
properties:
url:
type: string
type: object
v1.AuthItem:
properties:
avatar_url:
type: string
created_at:
type: string
id:
type: integer
ip:
type: string
last_login_time:
type: string
source_type:
$ref: '#/definitions/consts.SourceType'
username:
type: string
type: object
v1.AuthLoginSimpleReq:
properties:
password:
type: string
required:
- password
type: object
v1.AuthSetReq:
properties:
client_id:
type: string
client_secret:
type: string
kb_id:
type: string
proxy:
type: string
source_type:
allOf:
- $ref: '#/definitions/consts.SourceType'
enum:
- github
required:
- source_type
type: object
v1.CommentLists:
properties:
data:
items:
$ref: '#/definitions/domain.CommentListItem'
type: array
total:
type: integer
type: object
v1.ConversationListItems:
properties:
data:
items:
$ref: '#/definitions/domain.ConversationListItem'
type: array
total:
type: integer
type: object
v1.CrawlerExportReq:
properties:
doc_id:
type: string
file_type:
type: string
id:
type: string
kb_id:
type: string
space_id:
type: string
required:
- doc_id
- id
- kb_id
type: object
v1.CrawlerExportResp:
properties:
task_id:
type: string
type: object
v1.CrawlerParseReq:
properties:
crawler_source:
$ref: '#/definitions/consts.CrawlerSource'
dingtalk_setting:
$ref: '#/definitions/anydoc.DingtalkSetting'
feishu_setting:
$ref: '#/definitions/anydoc.FeishuSetting'
filename:
type: string
kb_id:
type: string
key:
type: string
required:
- crawler_source
- kb_id
type: object
v1.CrawlerParseResp:
properties:
docs:
$ref: '#/definitions/anydoc.Child'
id:
type: string
type: object
v1.CrawlerResultItem:
properties:
content:
type: string
status:
$ref: '#/definitions/consts.CrawlerStatus'
task_id:
type: string
type: object
v1.CrawlerResultReq:
properties:
task_id:
type: string
required:
- task_id
type: object
v1.CrawlerResultResp:
properties:
content:
type: string
status:
$ref: '#/definitions/consts.CrawlerStatus'
required:
- status
type: object
v1.CrawlerResultsReq:
properties:
task_ids:
items:
type: string
type: array
required:
- task_ids
type: object
v1.CrawlerResultsResp:
properties:
list:
items:
$ref: '#/definitions/v1.CrawlerResultItem'
type: array
status:
$ref: '#/definitions/consts.CrawlerStatus'
type: object
v1.CreateUserReq:
properties:
account:
type: string
password:
minLength: 8
type: string
role:
allOf:
- $ref: '#/definitions/consts.UserRole'
enum:
- admin
- user
required:
- account
- password
- role
type: object
v1.CreateUserResp:
properties:
id:
type: string
type: object
v1.FileUploadResp:
properties:
key:
type: string
type: object
v1.KBUserInviteReq:
properties:
kb_id:
type: string
perm:
allOf:
- $ref: '#/definitions/consts.UserKBPermission'
enum:
- full_control
- doc_manage
- data_operate
user_id:
type: string
required:
- kb_id
- perm
- user_id
type: object
v1.KBUserListItemResp:
properties:
account:
type: string
id:
type: string
perms:
$ref: '#/definitions/consts.UserKBPermission'
role:
$ref: '#/definitions/consts.UserRole'
type: object
v1.KBUserUpdateReq:
properties:
kb_id:
type: string
perm:
allOf:
- $ref: '#/definitions/consts.UserKBPermission'
enum:
- full_control
- doc_manage
- data_operate
user_id:
type: string
required:
- kb_id
- perm
- user_id
type: object
v1.LoginReq:
properties:
account:
type: string
password:
type: string
required:
- account
- password
type: object
v1.LoginResp:
properties:
token:
type: string
type: object
v1.NavAddReq:
properties:
kb_id:
type: string
name:
type: string
position:
type: number
required:
- kb_id
- name
type: object
v1.NavListResp:
properties:
created_at:
type: string
id:
type: string
name:
type: string
position:
type: number
updated_at:
type: string
type: object
v1.NavMoveReq:
properties:
id:
type: string
kb_id:
type: string
next_id:
type: string
prev_id:
type: string
required:
- id
- kb_id
type: object
v1.NavUpdateReq:
properties:
id:
type: string
kb_id:
type: string
name:
type: string
required:
- id
- kb_id
- name
type: object
v1.NodeDetailResp:
properties:
content:
type: string
created_at:
type: string
creator_account:
type: string
creator_id:
type: string
editor_account:
type: string
editor_id:
type: string
id:
type: string
kb_id:
type: string
meta:
$ref: '#/definitions/domain.NodeMeta'
name:
type: string
nav_id:
type: string
parent_id:
type: string
permissions:
$ref: '#/definitions/domain.NodePermissions'
publisher_account:
type: string
publisher_id:
type: string
pv:
type: integer
status:
$ref: '#/definitions/domain.NodeStatus'
type:
$ref: '#/definitions/domain.NodeType'
updated_at:
type: string
type: object
v1.NodeMoveNavReq:
properties:
ids:
items:
type: string
minItems: 1
type: array
kb_id:
type: string
nav_id:
type: string
required:
- ids
- kb_id
- nav_id
type: object
v1.NodePermissionEditReq:
properties:
answerable_groups:
description: 可被问答
items:
type: integer
type: array
ids:
items:
type: string
type: array
kb_id:
type: string
permissions:
$ref: '#/definitions/domain.NodePermissions'
visible_groups:
description: 导航内可见
items:
type: integer
type: array
visitable_groups:
description: 可被访问
items:
type: integer
type: array
required:
- ids
- kb_id
type: object
v1.NodePermissionEditResp:
type: object
v1.NodePermissionResp:
properties:
answerable_groups:
description: 可被问答
items:
$ref: '#/definitions/domain.NodeGroupDetail'
type: array
id:
type: string
permissions:
$ref: '#/definitions/domain.NodePermissions'
visible_groups:
description: 导航内可见
items:
$ref: '#/definitions/domain.NodeGroupDetail'
type: array
visitable_groups:
description: 可被访问
items:
$ref: '#/definitions/domain.NodeGroupDetail'
type: array
type: object
v1.NodeRestudyReq:
properties:
kb_id:
type: string
node_ids:
items:
type: string
minItems: 1
type: array
required:
- kb_id
- node_ids
type: object
v1.NodeRestudyResp:
type: object
v1.NodeStatsResp:
properties:
unpublished_count:
description: 未发布的文档数
type: integer
unreleased_nav_count:
description: 未发布目录数量
type: integer
unstudied_count:
description: 未学习的文档数
type: integer
type: object
v1.ResetPasswordReq:
properties:
id:
type: string
new_password:
minLength: 8
type: string
required:
- id
- new_password
type: object
v1.ShareFileUploadUrlReq:
properties:
captcha_token:
type: string
url:
type: string
required:
- captcha_token
- url
type: object
v1.ShareFileUploadUrlResp:
properties:
key:
type: string
type: object
v1.ShareNodeDetailResp:
properties:
content:
type: string
created_at:
type: string
creator_account:
type: string
creator_id:
type: string
editor_account:
type: string
editor_id:
type: string
id:
type: string
kb_id:
type: string
list:
items:
$ref: '#/definitions/domain.ShareNodeDetailItem'
type: array
meta:
$ref: '#/definitions/domain.NodeMeta'
name:
type: string
parent_id:
type: string
permissions:
$ref: '#/definitions/domain.NodePermissions'
publisher_account:
type: string
publisher_id:
type: string
pv:
type: integer
status:
$ref: '#/definitions/domain.NodeStatus'
type:
$ref: '#/definitions/domain.NodeType'
updated_at:
type: string
type: object
v1.StatConversationDistributionResp:
properties:
app_type:
$ref: '#/definitions/domain.AppType'
count:
type: integer
type: object
v1.StatCountResp:
properties:
conversation_count:
type: integer
ip_count:
type: integer
page_visit_count:
type: integer
session_count:
type: integer
type: object
v1.UserInfoResp:
properties:
account:
type: string
created_at:
type: string
id:
type: string
is_token:
type: boolean
last_access:
type: string
role:
$ref: '#/definitions/consts.UserRole'
type: object
v1.UserListItemResp:
properties:
account:
type: string
created_at:
type: string
id:
type: string
last_access:
type: string
role:
$ref: '#/definitions/consts.UserRole'
type: object
v1.UserListResp:
properties:
users:
items:
$ref: '#/definitions/v1.UserListItemResp'
type: array
type: object
v1.WechatAppInfoResp:
properties:
disclaimer_content:
type: string
feedback_enable:
type: boolean
feedback_type:
items:
type: string
type: array
wechat_app_is_enabled:
type: boolean
type: object
info:
contact: {}
description: panda-wiki API documentation
title: panda-wiki API
version: "1.0"
paths:
/api/v1/app:
delete:
consumes:
- application/json
description: Delete app
parameters:
- description: kb id
in: query
name: kb_id
required: true
type: string
- description: app id
in: query
name: id
required: true
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.Response'
security:
- bearerAuth: []
summary: Delete app
tags:
- app
put:
consumes:
- application/json
description: Update app
parameters:
- description: id
in: query
name: id
required: true
type: string
- description: app
in: body
name: app
required: true
schema:
$ref: '#/definitions/domain.UpdateAppReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.Response'
security:
- bearerAuth: []
summary: Update app
tags:
- app
/api/v1/app/detail:
get:
consumes:
- application/json
description: Get app detail
parameters:
- description: kb id
in: query
name: kb_id
required: true
type: string
- description: app type
in: query
name: type
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.PWResponse'
- properties:
data:
$ref: '#/definitions/domain.AppDetailResp'
type: object
security:
- bearerAuth: []
summary: Get app detail
tags:
- app
/api/v1/auth/delete:
delete:
consumes:
- application/json
description: 删除授权信息
operationId: v1-OpenAuthDelete
parameters:
- in: query
name: id
type: integer
- in: query
name: kb_id
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.Response'
security:
- bearerAuth: []
summary: 删除授权信息
tags:
- Auth
/api/v1/auth/get:
get:
consumes:
- application/json
description: 获取授权信息
operationId: v1-OpenAuthGet
parameters:
- in: query
name: kb_id
type: string
- enum:
- dingtalk
- feishu
- wecom
- oauth
- github
- cas
- ldap
- widget
- dingtalk_bot
- feishu_bot
- lark_bot
- wechat_bot
- wecom_ai_bot
- wechat_service_bot
- discord_bot
- wechat_official_account
- openai_api
- mcp_server
in: query
name: source_type
required: true
type: string
x-enum-varnames:
- SourceTypeDingTalk
- SourceTypeFeishu
- SourceTypeWeCom
- SourceTypeOAuth
- SourceTypeGitHub
- SourceTypeCAS
- SourceTypeLDAP
- SourceTypeWidget
- SourceTypeDingtalkBot
- SourceTypeFeishuBot
- SourceTypeLarkBot
- SourceTypeWechatBot
- SourceTypeWecomAIBot
- SourceTypeWechatServiceBot
- SourceTypeDiscordBot
- SourceTypeWechatOfficialAccount
- SourceTypeOpenAIAPI
- SourceTypeMcpServer
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.PWResponse'
- properties:
data:
$ref: '#/definitions/github_com_chaitin_panda-wiki_api_auth_v1.AuthGetResp'
type: object
security:
- bearerAuth: []
summary: 获取授权信息
tags:
- Auth
/api/v1/auth/set:
post:
consumes:
- application/json
description: 设置授权信息
operationId: v1-OpenAuthSet
parameters:
- description: para
in: body
name: param
required: true
schema:
$ref: '#/definitions/v1.AuthSetReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.Response'
security:
- bearerAuth: []
summary: 设置授权信息
tags:
- Auth
/api/v1/comment:
get:
consumes:
- application/json
description: GetCommentModeratedList
parameters:
- in: query
name: kb_id
required: true
type: string
- in: query
minimum: 1
name: page
required: true
type: integer
- in: query
minimum: 1
name: per_page
required: true
type: integer
- enum:
- -1
- 0
- 1
format: int32
in: query
name: status
type: integer
x-enum-varnames:
- CommentStatusReject
- CommentStatusPending
- CommentStatusAccepted
produces:
- application/json
responses:
"200":
description: conversationList
schema:
allOf:
- $ref: '#/definitions/domain.PWResponse'
- properties:
data:
$ref: '#/definitions/v1.CommentLists'
type: object
summary: GetCommentModeratedList
tags:
- comment
/api/v1/comment/list:
delete:
consumes:
- application/json
description: DeleteCommentList
parameters:
- collectionFormat: csv
in: query
items:
type: string
name: ids
type: array
produces:
- application/json
responses:
"200":
description: total
schema:
$ref: '#/definitions/domain.Response'
summary: DeleteCommentList
tags:
- comment
/api/v1/conversation:
get:
consumes:
- application/json
description: get conversation list
parameters:
- in: query
name: app_id
type: string
- in: query
name: kb_id
required: true
type: string
- in: query
minimum: 1
name: page
required: true
type: integer
- in: query
minimum: 1
name: per_page
required: true
type: integer
- in: query
name: remote_ip
type: string
- in: query
name: subject
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.PWResponse'
- properties:
data:
$ref: '#/definitions/v1.ConversationListItems'
type: object
summary: get conversation list
tags:
- conversation
/api/v1/conversation/detail:
get:
consumes:
- application/json
description: get conversation detail
parameters:
- in: query
name: id
required: true
type: string
- in: query
name: kb_id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.PWResponse'
- properties:
data:
$ref: '#/definitions/domain.ConversationDetailResp'
type: object
summary: get conversation detail
tags:
- conversation
/api/v1/conversation/message/detail:
get:
consumes:
- application/json
description: Get message detail
parameters:
- in: query
name: id
required: true
type: string
- in: query
name: kb_id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.PWResponse'
- properties:
data:
$ref: '#/definitions/domain.ConversationMessage'
type: object
summary: Get message detail
tags:
- Message
/api/v1/conversation/message/list:
get:
consumes:
- application/json
description: GetMessageFeedBackList
parameters:
- in: query
name: kb_id
required: true
type: string
- in: query
minimum: 1
name: page
required: true
type: integer
- in: query
minimum: 1
name: per_page
required: true
type: integer
produces:
- application/json
responses:
"200":
description: MessageList
schema:
allOf:
- $ref: '#/definitions/domain.PWResponse'
- properties:
data:
$ref: '#/definitions/domain.PaginatedResult-array_domain_ConversationMessageListItem'
type: object
summary: GetMessageFeedBackList
tags:
- Message
/api/v1/crawler/export:
post:
consumes:
- application/json
description: CrawlerExport
parameters:
- description: Scrape
in: body
name: body
required: true
schema:
$ref: '#/definitions/v1.CrawlerExportReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.PWResponse'
- properties:
data:
$ref: '#/definitions/v1.CrawlerExportResp'
type: object
summary: CrawlerExport
tags:
- crawler
/api/v1/crawler/parse:
post:
consumes:
- application/json
description: 解析文档树
parameters:
- description: Scrape
in: body
name: body
required: true
schema:
$ref: '#/definitions/v1.CrawlerParseReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.PWResponse'
- properties:
data:
$ref: '#/definitions/v1.CrawlerParseResp'
type: object
summary: 解析文档树
tags:
- crawler
/api/v1/crawler/result:
get:
consumes:
- application/json
description: Retrieve the result of a previously started scraping task
parameters:
- description: Crawler Result Request
in: body
name: body
required: true
schema:
$ref: '#/definitions/v1.CrawlerResultReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.PWResponse'
- properties:
data:
$ref: '#/definitions/v1.CrawlerResultResp'
type: object
summary: Get Crawler Result
tags:
- crawler
/api/v1/crawler/results:
post:
consumes:
- application/json
description: Retrieve the results of a previously started scraping task
parameters:
- description: Crawler Results Request
in: body
name: param
required: true
schema:
$ref: '#/definitions/v1.CrawlerResultsReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.PWResponse'
- properties:
data:
$ref: '#/definitions/v1.CrawlerResultsResp'
type: object
summary: Get Crawler Results
tags:
- crawler
/api/v1/creation/tab-complete:
post:
consumes:
- application/json
description: Tab-based document completion similar to AI coding's FIM (Fill
in Middle)
parameters:
- description: tab completion request
in: body
name: body
required: true
schema:
$ref: '#/definitions/domain.CompleteReq'
produces:
- application/json
responses:
"200":
description: success
schema:
type: string
summary: Tab-based document completion
tags:
- creation
/api/v1/creation/text:
post:
consumes:
- application/json
description: Text creation
parameters:
- description: text creation request
in: body
name: body
required: true
schema:
$ref: '#/definitions/domain.TextReq'
produces:
- application/json
responses:
"200":
description: success
schema:
type: string
summary: Text creation
tags:
- creation
/api/v1/file/upload:
post:
consumes:
- multipart/form-data
description: Upload File
parameters:
- description: File
in: formData
name: file
required: true
type: file
- description: Knowledge Base ID
in: formData
name: kb_id
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.ObjectUploadResp'
summary: Upload File
tags:
- file
/api/v1/file/upload/anydoc:
post:
consumes:
- multipart/form-data
description: Upload Anydoc File
parameters:
- description: File
in: formData
name: file
required: true
type: file
- description: File Path
in: formData
name: path
required: true
type: string
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.AnydocUploadResp'
summary: Upload Anydoc File
tags:
- file
/api/v1/file/upload/url:
post:
consumes:
- application/json
description: Upload File By Url
parameters:
- description: Request Body
in: body
name: body
required: true
schema:
$ref: '#/definitions/domain.UploadByUrlReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.Response'
- properties:
data:
$ref: '#/definitions/domain.ObjectUploadResp'
type: object
summary: Upload File By Url
tags:
- file
/api/v1/knowledge_base:
post:
consumes:
- application/json
description: CreateKnowledgeBase
parameters:
- description: CreateKnowledgeBase Request
in: body
name: body
required: true
schema:
$ref: '#/definitions/domain.CreateKnowledgeBaseReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.Response'
summary: CreateKnowledgeBase
tags:
- knowledge_base
/api/v1/knowledge_base/detail:
delete:
consumes:
- application/json
description: DeleteKnowledgeBase
parameters:
- description: Knowledge Base ID
in: query
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.Response'
summary: DeleteKnowledgeBase
tags:
- knowledge_base
get:
consumes:
- application/json
description: GetKnowledgeBaseDetail
parameters:
- description: Knowledge Base ID
in: query
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.PWResponse'
- properties:
data:
$ref: '#/definitions/domain.KnowledgeBaseDetail'
type: object
security:
- bearerAuth: []
summary: GetKnowledgeBaseDetail
tags:
- knowledge_base
put:
consumes:
- application/json
description: UpdateKnowledgeBase
parameters:
- description: UpdateKnowledgeBase Request
in: body
name: body
required: true
schema:
$ref: '#/definitions/domain.UpdateKnowledgeBaseReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.Response'
summary: UpdateKnowledgeBase
tags:
- knowledge_base
/api/v1/knowledge_base/list:
get:
consumes:
- application/json
description: GetKnowledgeBaseList
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.PWResponse'
- properties:
data:
items:
$ref: '#/definitions/domain.KnowledgeBaseListItem'
type: array
type: object
summary: GetKnowledgeBaseList
tags:
- knowledge_base
/api/v1/knowledge_base/release:
post:
consumes:
- application/json
description: CreateKBRelease
parameters:
- description: CreateKBRelease Request
in: body
name: body
required: true
schema:
$ref: '#/definitions/domain.CreateKBReleaseReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.Response'
summary: CreateKBRelease
tags:
- knowledge_base
/api/v1/knowledge_base/release/list:
get:
consumes:
- application/json
description: GetKBReleaseList
parameters:
- description: Knowledge Base ID
in: query
name: kb_id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.PWResponse'
- properties:
data:
$ref: '#/definitions/domain.GetKBReleaseListResp'
type: object
summary: GetKBReleaseList
tags:
- knowledge_base
/api/v1/knowledge_base/user/delete:
delete:
consumes:
- application/json
description: Remove user from knowledge base
parameters:
- in: query
name: kb_id
required: true
type: string
- in: query
name: user_id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.Response'
security:
- bearerAuth: []
summary: KBUserDelete
tags:
- knowledge_base
/api/v1/knowledge_base/user/invite:
post:
consumes:
- application/json
description: Invite user to knowledge base
parameters:
- description: Invite User Request
in: body
name: param
required: true
schema:
$ref: '#/definitions/v1.KBUserInviteReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.Response'
security:
- bearerAuth: []
summary: KBUserInvite
tags:
- knowledge_base
/api/v1/knowledge_base/user/list:
get:
consumes:
- application/json
description: KBUserList
parameters:
- description: Knowledge Base ID
in: query
name: kb_id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.PWResponse'
- properties:
data:
items:
$ref: '#/definitions/v1.KBUserListItemResp'
type: array
type: object
security:
- bearerAuth: []
summary: KBUserList
tags:
- knowledge_base
/api/v1/knowledge_base/user/update:
patch:
consumes:
- application/json
description: Update user permission in knowledge base
parameters:
- description: Update User Permission Request
in: body
name: param
required: true
schema:
$ref: '#/definitions/v1.KBUserUpdateReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.Response'
security:
- bearerAuth: []
summary: KBUserUpdate
tags:
- knowledge_base
/api/v1/model:
post:
consumes:
- application/json
description: create model
parameters:
- description: create model request
in: body
name: model
required: true
schema:
$ref: '#/definitions/domain.CreateModelReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.Response'
summary: create model
tags:
- model
put:
consumes:
- application/json
description: update model
parameters:
- description: update model request
in: body
name: model
required: true
schema:
$ref: '#/definitions/domain.UpdateModelReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.Response'
tags:
- model
/api/v1/model/check:
post:
consumes:
- application/json
description: check model
parameters:
- description: check model request
in: body
name: model
required: true
schema:
$ref: '#/definitions/github_com_chaitin_panda-wiki_domain.CheckModelReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.Response'
- properties:
data:
$ref: '#/definitions/github_com_chaitin_panda-wiki_domain.CheckModelResp'
type: object
summary: check model
tags:
- model
/api/v1/model/list:
get:
consumes:
- application/json
description: get model list
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.PWResponse'
- properties:
data:
$ref: '#/definitions/github_com_chaitin_panda-wiki_domain.ModelListItem'
type: object
summary: get model list
tags:
- model
/api/v1/model/mode-setting:
get:
consumes:
- application/json
description: get current model mode setting including mode, API key and chat
model
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.Response'
- properties:
data:
$ref: '#/definitions/domain.ModelModeSetting'
type: object
summary: get model mode setting
tags:
- model
/api/v1/model/provider/supported:
post:
consumes:
- application/json
description: get provider supported model list
parameters:
- description: get supported model list request
in: body
name: params
required: true
schema:
$ref: '#/definitions/domain.GetProviderModelListReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.PWResponse'
- properties:
data:
$ref: '#/definitions/domain.GetProviderModelListResp'
type: object
summary: get provider supported model list
tags:
- model
/api/v1/model/switch-mode:
post:
consumes:
- application/json
description: switch model mode between manual and auto
parameters:
- description: switch mode request
in: body
name: request
required: true
schema:
$ref: '#/definitions/domain.SwitchModeReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.Response'
- properties:
data:
$ref: '#/definitions/domain.SwitchModeResp'
type: object
summary: switch mode
tags:
- model
/api/v1/nav/add:
post:
consumes:
- application/json
description: Add Nav
parameters:
- description: Params
in: body
name: body
required: true
schema:
$ref: '#/definitions/v1.NavAddReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.PWResponse'
security:
- bearerAuth: []
summary: 添加分栏
tags:
- Nav
/api/v1/nav/delete:
delete:
consumes:
- application/json
description: DeleteNav Nav
parameters:
- in: query
name: id
required: true
type: string
- in: query
name: kb_id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.PWResponse'
security:
- bearerAuth: []
summary: 删除栏目
tags:
- Nav
/api/v1/nav/list:
get:
consumes:
- application/json
description: Get Nav List
parameters:
- in: query
name: kb_id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.PWResponse'
- properties:
data:
items:
$ref: '#/definitions/v1.NavListResp'
type: array
type: object
security:
- bearerAuth: []
summary: 获取分栏列表
tags:
- Nav
/api/v1/nav/move:
post:
consumes:
- application/json
description: Move Nav
parameters:
- description: Params
in: body
name: body
required: true
schema:
$ref: '#/definitions/v1.NavMoveReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.PWResponse'
security:
- bearerAuth: []
summary: 移动栏目
tags:
- Nav
/api/v1/nav/update:
patch:
consumes:
- application/json
description: Update Nav
parameters:
- description: Params
in: body
name: body
required: true
schema:
$ref: '#/definitions/v1.NavUpdateReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.PWResponse'
security:
- bearerAuth: []
summary: 更新栏目信息
tags:
- Nav
/api/v1/node:
post:
consumes:
- application/json
description: Create Node
parameters:
- description: Node
in: body
name: body
required: true
schema:
$ref: '#/definitions/domain.CreateNodeReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.PWResponse'
- properties:
data:
additionalProperties:
type: string
type: object
type: object
security:
- bearerAuth: []
summary: Create Node
tags:
- node
/api/v1/node/action:
post:
consumes:
- application/json
description: Node Action
parameters:
- description: Action
in: body
name: action
required: true
schema:
$ref: '#/definitions/domain.NodeActionReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.PWResponse'
- properties:
data:
additionalProperties:
type: string
type: object
type: object
security:
- bearerAuth: []
summary: Node Action
tags:
- node
/api/v1/node/batch_move:
post:
consumes:
- application/json
description: Batch Move Node
parameters:
- description: Batch Move Node
in: body
name: body
required: true
schema:
$ref: '#/definitions/domain.BatchMoveReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.Response'
security:
- bearerAuth: []
summary: Batch Move Node
tags:
- node
/api/v1/node/detail:
get:
consumes:
- application/json
description: Get Node Detail
parameters:
- in: query
name: format
type: string
- in: query
name: id
required: true
type: string
- in: query
name: kb_id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.PWResponse'
- properties:
data:
$ref: '#/definitions/v1.NodeDetailResp'
type: object
security:
- bearerAuth: []
summary: Get Node Detail
tags:
- node
put:
consumes:
- application/json
description: Update Node Detail
parameters:
- description: Node
in: body
name: body
required: true
schema:
$ref: '#/definitions/domain.UpdateNodeReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.Response'
security:
- bearerAuth: []
summary: Update Node Detail
tags:
- node
/api/v1/node/list:
get:
consumes:
- application/json
description: Get Node List
parameters:
- in: query
name: kb_id
required: true
type: string
- in: query
name: nav_id
type: string
- in: query
name: search
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.PWResponse'
- properties:
data:
items:
$ref: '#/definitions/domain.NodeListItemResp'
type: array
type: object
security:
- bearerAuth: []
summary: Get Node List
tags:
- node
/api/v1/node/list/group/nav:
get:
consumes:
- application/json
description: Get unpublished or unstudied document list grouped by nav
parameters:
- in: query
name: kb_id
required: true
type: string
- collectionFormat: csv
in: query
items:
type: string
name: nav_ids
type: array
- in: query
name: search
type: string
- enum:
- released
- unpublished
- unstudied
in: query
name: status
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.PWResponse'
- properties:
data:
items:
$ref: '#/definitions/github_com_chaitin_panda-wiki_api_node_v1.NodeListGroupNavResp'
type: array
type: object
security:
- bearerAuth: []
summary: Get Node List Grouped by Nav
tags:
- node
/api/v1/node/move:
post:
consumes:
- application/json
description: Move Node
parameters:
- description: Move Node
in: body
name: body
required: true
schema:
$ref: '#/definitions/domain.MoveNodeReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.Response'
security:
- bearerAuth: []
summary: Move Node
tags:
- node
/api/v1/node/move/nav:
post:
consumes:
- application/json
description: Move node (and all its descendants if folder) to a different nav
parameters:
- description: Move Node Nav
in: body
name: body
required: true
schema:
$ref: '#/definitions/v1.NodeMoveNavReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.Response'
security:
- bearerAuth: []
summary: Move Node to Nav
tags:
- node
/api/v1/node/permission:
get:
consumes:
- application/json
description: 文档授权信息获取
operationId: v1-NodePermission
parameters:
- in: query
name: id
required: true
type: string
- in: query
name: kb_id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.Response'
- properties:
data:
$ref: '#/definitions/v1.NodePermissionResp'
type: object
security:
- bearerAuth: []
summary: 文档授权信息获取
tags:
- NodePermission
/api/v1/node/permission/edit:
patch:
consumes:
- application/json
description: 文档授权信息更新
operationId: v1-NodePermissionEdit
parameters:
- description: para
in: body
name: param
required: true
schema:
$ref: '#/definitions/v1.NodePermissionEditReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.Response'
- properties:
data:
$ref: '#/definitions/v1.NodePermissionEditResp'
type: object
security:
- bearerAuth: []
summary: 文档授权信息更新
tags:
- NodePermission
/api/v1/node/recommend_nodes:
get:
consumes:
- application/json
description: Recommend Nodes
parameters:
- in: query
name: kb_id
required: true
type: string
- collectionFormat: csv
in: query
items:
type: string
name: nav_ids
type: array
- collectionFormat: csv
in: query
items:
type: string
name: node_ids
type: array
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.PWResponse'
- properties:
data:
items:
$ref: '#/definitions/domain.RecommendNodeListResp'
type: array
type: object
security:
- bearerAuth: []
summary: Recommend Nodes
tags:
- node
/api/v1/node/restudy:
post:
consumes:
- application/json
description: 文档重新学习
operationId: v1-NodeRestudy
parameters:
- description: para
in: body
name: param
required: true
schema:
$ref: '#/definitions/v1.NodeRestudyReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.Response'
- properties:
data:
$ref: '#/definitions/v1.NodeRestudyResp'
type: object
security:
- bearerAuth: []
summary: 文档重新学习
tags:
- Node
/api/v1/node/stats:
get:
consumes:
- application/json
description: Get Node Statistics
parameters:
- in: query
name: kb_id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.PWResponse'
- properties:
data:
$ref: '#/definitions/v1.NodeStatsResp'
type: object
security:
- bearerAuth: []
summary: Get Node Statistics
tags:
- node
/api/v1/node/summary:
post:
consumes:
- application/json
description: Summary Node
parameters:
- description: Summary Node
in: body
name: body
required: true
schema:
$ref: '#/definitions/domain.NodeSummaryReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.Response'
security:
- bearerAuth: []
summary: Summary Node 异步后台生成
tags:
- node
/api/v1/node/summary/stream:
post:
consumes:
- application/json
description: Stream Summary Node for single document
parameters:
- description: Summary Node
in: body
name: body
required: true
schema:
$ref: '#/definitions/domain.NodeSummaryReq'
produces:
- text/event-stream
responses:
"200":
description: SSE stream
schema:
type: string
security:
- bearerAuth: []
summary: Stream Summary Node
tags:
- node
/api/v1/stat/browsers:
get:
consumes:
- application/json
description: 客户端统计
parameters:
- enum:
- 1
- 7
- 30
- 90
in: query
name: day
type: integer
x-enum-varnames:
- StatDay1
- StatDay7
- StatDay30
- StatDay90
- in: query
name: kb_id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.Response'
- properties:
data:
$ref: '#/definitions/domain.HotBrowser'
type: object
security:
- bearerAuth: []
summary: 客户端统计
tags:
- stat
/api/v1/stat/conversation_distribution:
get:
consumes:
- application/json
description: 问答来源
parameters:
- enum:
- 1
- 7
- 30
- 90
in: query
name: day
type: integer
x-enum-varnames:
- StatDay1
- StatDay7
- StatDay30
- StatDay90
- in: query
name: kb_id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.Response'
- properties:
data:
items:
$ref: '#/definitions/v1.StatConversationDistributionResp'
type: array
type: object
security:
- bearerAuth: []
summary: 问答来源
tags:
- stat
/api/v1/stat/count:
get:
consumes:
- application/json
description: 全局统计
parameters:
- enum:
- 1
- 7
- 30
- 90
in: query
name: day
type: integer
x-enum-varnames:
- StatDay1
- StatDay7
- StatDay30
- StatDay90
- in: query
name: kb_id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.PWResponse'
- properties:
data:
$ref: '#/definitions/v1.StatCountResp'
type: object
security:
- bearerAuth: []
summary: 全局统计
tags:
- stat
/api/v1/stat/geo_count:
get:
consumes:
- application/json
description: 用户地理分布
parameters:
- enum:
- 1
- 7
- 30
- 90
in: query
name: day
type: integer
x-enum-varnames:
- StatDay1
- StatDay7
- StatDay30
- StatDay90
- in: query
name: kb_id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.Response'
security:
- bearerAuth: []
summary: 用户地理分布
tags:
- stat
/api/v1/stat/hot_pages:
get:
consumes:
- application/json
description: 热门文档
parameters:
- enum:
- 1
- 7
- 30
- 90
in: query
name: day
type: integer
x-enum-varnames:
- StatDay1
- StatDay7
- StatDay30
- StatDay90
- in: query
name: kb_id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.Response'
- properties:
data:
items:
$ref: '#/definitions/domain.HotPage'
type: array
type: object
security:
- bearerAuth: []
summary: 热门文档
tags:
- stat
/api/v1/stat/instant_count:
get:
consumes:
- application/json
description: GetInstantCount
parameters:
- in: query
name: kb_id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.Response'
- properties:
data:
items:
$ref: '#/definitions/domain.InstantCountResp'
type: array
type: object
security:
- bearerAuth: []
summary: GetInstantCount
tags:
- stat
/api/v1/stat/instant_pages:
get:
consumes:
- application/json
description: GetInstantPages
parameters:
- in: query
name: kb_id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.Response'
- properties:
data:
items:
$ref: '#/definitions/domain.InstantPageResp'
type: array
type: object
security:
- bearerAuth: []
summary: GetInstantPages
tags:
- stat
/api/v1/stat/referer_hosts:
get:
consumes:
- application/json
description: 来源域名
parameters:
- enum:
- 1
- 7
- 30
- 90
in: query
name: day
type: integer
x-enum-varnames:
- StatDay1
- StatDay7
- StatDay30
- StatDay90
- in: query
name: kb_id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.Response'
- properties:
data:
items:
$ref: '#/definitions/domain.HotRefererHost'
type: array
type: object
security:
- bearerAuth: []
summary: 来源域名
tags:
- stat
/api/v1/user:
get:
consumes:
- application/json
description: GetUser
responses:
"200":
description: OK
schema:
$ref: '#/definitions/v1.UserInfoResp'
summary: GetUser
tags:
- user
/api/v1/user/create:
post:
consumes:
- application/json
description: CreateUser
parameters:
- description: CreateUser Request
in: body
name: body
required: true
schema:
$ref: '#/definitions/v1.CreateUserReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.Response'
- properties:
data:
$ref: '#/definitions/v1.CreateUserResp'
type: object
summary: CreateUser
tags:
- user
/api/v1/user/delete:
delete:
consumes:
- application/json
description: DeleteUser
parameters:
- in: query
name: user_id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.Response'
summary: DeleteUser
tags:
- user
/api/v1/user/list:
get:
consumes:
- application/json
description: ListUsers
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.PWResponse'
- properties:
data:
$ref: '#/definitions/v1.UserListResp'
type: object
summary: ListUsers
tags:
- user
/api/v1/user/login:
post:
consumes:
- application/json
description: Login
parameters:
- description: Login Request
in: body
name: body
required: true
schema:
$ref: '#/definitions/v1.LoginReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/v1.LoginResp'
summary: Login
tags:
- user
/api/v1/user/reset_password:
put:
consumes:
- application/json
description: ResetPassword
parameters:
- description: ResetPassword Request
in: body
name: body
required: true
schema:
$ref: '#/definitions/v1.ResetPasswordReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.Response'
summary: ResetPassword
tags:
- user
/share/v1/app/web/info:
get:
consumes:
- application/json
description: GetAppInfo
parameters:
- description: kb id
in: header
name: X-KB-ID
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.Response'
- properties:
data:
$ref: '#/definitions/domain.AppInfoResp'
type: object
summary: GetAppInfo
tags:
- share_app
/share/v1/app/wechat/info:
get:
consumes:
- application/json
description: WechatAppInfo
parameters:
- description: kb id
in: header
name: X-KB-ID
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.Response'
- properties:
data:
$ref: '#/definitions/v1.WechatAppInfoResp'
type: object
summary: WechatAppInfo
tags:
- share_chat
/share/v1/app/wechat/service/answer:
get:
consumes:
- application/json
description: GetWechatAnswer
parameters:
- description: conversation id
in: query
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.Response'
summary: GetWechatAnswer
tags:
- Wechat
/share/v1/app/widget/info:
get:
consumes:
- application/json
description: GetWidgetAppInfo
parameters:
- description: kb id
in: header
name: X-KB-ID
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.Response'
summary: GetWidgetAppInfo
tags:
- share_app
/share/v1/auth/get:
get:
consumes:
- application/json
description: AuthGet
operationId: v1-AuthGet
parameters:
- description: kb_id
in: header
name: X-KB-ID
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.PWResponse'
- properties:
data:
$ref: '#/definitions/github_com_chaitin_panda-wiki_api_share_v1.AuthGetResp'
type: object
summary: AuthGet
tags:
- share_auth
/share/v1/auth/github:
post:
consumes:
- application/json
description: GitHub登录
operationId: v1-AuthGitHub
parameters:
- description: kb id
in: header
name: X-KB-ID
required: true
type: string
- description: para
in: body
name: param
required: true
schema:
$ref: '#/definitions/v1.AuthGitHubReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.PWResponse'
- properties:
data:
$ref: '#/definitions/v1.AuthGitHubResp'
type: object
summary: GitHub登录
tags:
- ShareAuth
/share/v1/auth/login/simple:
post:
consumes:
- application/json
description: AuthLoginSimple
operationId: v1-AuthLoginSimple
parameters:
- description: kb_id
in: header
name: X-KB-ID
required: true
type: string
- description: para
in: body
name: param
required: true
schema:
$ref: '#/definitions/v1.AuthLoginSimpleReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.Response'
summary: AuthLoginSimple
tags:
- share_auth
/share/v1/captcha/challenge:
post:
consumes:
- application/json
description: CreateCaptcha
parameters:
- description: kb id
in: header
name: X-KB-ID
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/gocap.ChallengeData'
summary: CreateCaptcha
tags:
- share_captcha
/share/v1/captcha/redeem:
post:
consumes:
- application/json
description: RedeemCaptcha
parameters:
- description: kb id
in: header
name: X-KB-ID
required: true
type: string
- description: request
in: body
name: body
required: true
schema:
$ref: '#/definitions/consts.RedeemCaptchaReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/gocap.VerificationResult'
summary: RedeemCaptcha
tags:
- share_captcha
/share/v1/chat/completions:
post:
consumes:
- application/json
description: OpenAI API compatible chat completions endpoint
parameters:
- description: Knowledge Base ID
in: header
name: X-KB-ID
required: true
type: string
- description: OpenAI API request
in: body
name: request
required: true
schema:
$ref: '#/definitions/domain.OpenAICompletionsRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.OpenAICompletionsResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/domain.OpenAIErrorResponse'
summary: ChatCompletions
tags:
- share_chat
/share/v1/chat/feedback:
post:
consumes:
- application/json
description: Process user feedback for chat conversations
parameters:
- description: feedback request
in: body
name: request
required: true
schema:
$ref: '#/definitions/domain.FeedbackRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.Response'
summary: Handle chat feedback
tags:
- share_chat
/share/v1/chat/message:
post:
consumes:
- application/json
description: ChatMessage
parameters:
- description: app type
in: query
name: app_type
required: true
type: string
- description: request
in: body
name: request
required: true
schema:
$ref: '#/definitions/domain.ChatRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.Response'
summary: ChatMessage
tags:
- share_chat
/share/v1/chat/search:
post:
consumes:
- application/json
description: ChatSearch
parameters:
- description: request
in: body
name: request
required: true
schema:
$ref: '#/definitions/domain.ChatSearchReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.Response'
- properties:
data:
$ref: '#/definitions/domain.ChatSearchResp'
type: object
summary: ChatSearch
tags:
- share_chat_search
/share/v1/chat/widget:
post:
consumes:
- application/json
description: ChatWidget
parameters:
- description: app type
in: query
name: app_type
required: true
type: string
- description: request
in: body
name: request
required: true
schema:
$ref: '#/definitions/domain.ChatRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.Response'
summary: ChatWidget
tags:
- Widget
/share/v1/chat/widget/search:
post:
consumes:
- application/json
description: WidgetSearch
parameters:
- description: Comment
in: body
name: request
required: true
schema:
$ref: '#/definitions/domain.ChatSearchReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.Response'
- properties:
data:
$ref: '#/definitions/domain.ChatSearchResp'
type: object
summary: WidgetSearch
tags:
- Widget
/share/v1/comment:
post:
consumes:
- application/json
description: CreateComment
parameters:
- description: Comment
in: body
name: comment
required: true
schema:
$ref: '#/definitions/domain.CommentReq'
produces:
- application/json
responses:
"200":
description: CommentID
schema:
allOf:
- $ref: '#/definitions/domain.PWResponse'
- properties:
data:
type: string
type: object
summary: CreateComment
tags:
- share_comment
/share/v1/comment/list:
get:
consumes:
- application/json
description: GetCommentList
parameters:
- description: nodeID
in: query
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: CommentList
schema:
allOf:
- $ref: '#/definitions/domain.PWResponse'
- properties:
data:
$ref: '#/definitions/share.ShareCommentLists'
type: object
summary: GetCommentList
tags:
- share_comment
/share/v1/common/file/upload:
post:
consumes:
- multipart/form-data
description: 前台用户上传文件,目前只支持图片文件上传
operationId: share-FileUpload
parameters:
- description: kb id
in: header
name: X-KB-ID
required: true
type: string
- description: File
in: formData
name: file
required: true
type: file
- description: captcha_token
in: formData
name: captcha_token
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.Response'
- properties:
data:
$ref: '#/definitions/v1.FileUploadResp'
type: object
summary: 文件上传
tags:
- ShareFile
/share/v1/common/file/upload/url:
post:
consumes:
- application/json
description: 前台用户上传文件,目前只支持图片文件上传
operationId: share-FileUploadByUrl
parameters:
- description: body
in: body
name: body
required: true
schema:
$ref: '#/definitions/v1.ShareFileUploadUrlReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.Response'
- properties:
data:
$ref: '#/definitions/v1.ShareFileUploadUrlResp'
type: object
summary: 文件上传
tags:
- ShareFile
/share/v1/conversation/detail:
get:
consumes:
- application/json
description: GetConversationDetail
parameters:
- description: kb id
in: header
name: X-KB-ID
required: true
type: string
- description: conversation id
in: query
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.PWResponse'
- properties:
data:
$ref: '#/definitions/domain.ShareConversationDetailResp'
type: object
summary: GetConversationDetail
tags:
- share_conversation
/share/v1/nav/list:
get:
consumes:
- application/json
description: ShareNavList
parameters:
- in: query
name: kb_id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.Response'
summary: 前台获取栏目列表
tags:
- share_nav
/share/v1/node/detail:
get:
consumes:
- application/json
description: GetNodeDetail
parameters:
- description: kb id
in: header
name: X-KB-ID
required: true
type: string
- description: node id
in: query
name: id
required: true
type: string
- description: format
in: query
name: format
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.Response'
- properties:
data:
$ref: '#/definitions/v1.ShareNodeDetailResp'
type: object
summary: GetNodeDetail
tags:
- share_node
/share/v1/node/list:
get:
consumes:
- application/json
description: ShareNodeList
parameters:
- description: kb id
in: header
name: X-KB-ID
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.Response'
summary: ShareNodeList
tags:
- share_node
/share/v1/openapi/github/callback:
get:
consumes:
- application/json
description: GitHub回调
operationId: v1-GitHubCallback
parameters:
- in: query
name: code
type: string
- in: query
name: state
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/domain.PWResponse'
- properties:
data:
$ref: '#/definitions/github_com_chaitin_panda-wiki_api_share_v1.GitHubCallbackResp'
type: object
summary: GitHub回调
tags:
- ShareOpenapi
/share/v1/openapi/lark/bot/{kb_id}:
post:
consumes:
- application/json
description: Lark机器人请求
operationId: v1-LarkBot
parameters:
- description: 知识库ID
in: path
name: kb_id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.PWResponse'
summary: Lark机器人请求
tags:
- ShareOpenapi
/share/v1/stat/page:
post:
consumes:
- application/json
description: RecordPage
parameters:
- description: request
in: body
name: request
required: true
schema:
$ref: '#/definitions/domain.StatPageReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/domain.Response'
summary: RecordPage
tags:
- share_stat
securityDefinitions:
bearerAuth:
description: Type "Bearer" + a space + your token to authorize
in: header
name: Authorization
type: apiKey
swagger: "2.0"