openapi: 3.0.1
info:
title: "Rasa - Server Endpoints"
version: "1.0.0"
description: >-
Rasa服务器提供用于检索会话跟踪程序的端点(endpoints)以及用于修改会话跟踪程序的端点。
此外,还提供了用于训练和测试模型的端点。
servers:
- url: "http://localhost:5005"
description: "Local development server"
paths:
/:
get:
tags:
- Server Information
summary: Health endpoint of Rasa Server
operationId: getHealth
description: >-
This URL can be used as an endpoint to run
health checks against. When the server is running
this will return 200.
responses:
200:
description: Up and running
content:
text/plain:
schema:
type: string
description: Welcome text of Rasa Server
example: >-
Hello from Rasa: 1.0.0
/version:
get:
tags:
- Server Information
operationId: getVersion
summary: Version of Rasa
description: >-
Returns the version of Rasa.
responses:
200:
description: Version of Rasa
content:
application/json:
schema:
type: object
properties:
version:
type: string
description: >-
Rasa version number
minimum_compatible_version:
type: string
description: >-
Minimum version this Rasa version is
able to load models from
example:
version: 1.0.0
minimum_compatible_version: 1.0.0
/status:
get:
security:
- TokenAuth: []
- JWT: []
operationId: getStatus
tags:
- Server Information
summary: Status of the Rasa server
description: >-
Information about the server and the currently loaded Rasa model.
responses:
200:
description: Success
content:
application/json:
schema:
type: object
properties:
fingerprint:
type: object
description: Fingerprint of the loaded model
example:
config:
- 7625d69d93053ac8520a544d0852c626
domain:
- 229b51e41876bbcbbbfbeddf79548d5a
messages:
- cf7eda7edcae128a75ee8c95d3bbd680
stories:
- b5facea681fd00bc7ecc6818c70d9639
trained_at: 1556527123.42784
version: 1.0.0
model_file:
type: string
description: Path of the loaded model
example: 20190429-103105.tar.gz
num_active_training_jobs:
type: integer
description: Number of running training processes
example: 2
401:
$ref: '#/components/responses/401NotAuthenticated'
403:
$ref: '#/components/responses/403NotAuthorized'
409:
$ref: '#/components/responses/409Conflict'
/conversations/{
conversation_id}/tracker:
get:
security:
- TokenAuth: []
- JWT: []
operationId: getConversationTracker
tags:
- Tracker
summary: Retrieve a conversations tracker
description: >-
The tracker represents the state of the conversation.
The state of the tracker is created by applying a
sequence of events, which modify the state. These
events can optionally be included in the response.
parameters:
- $ref: '#/components/parameters/conversation_id'
- $ref: '#/components/parameters/include_events'
- $ref: '#/components/parameters/until'
responses:
200:
$ref: '#/components/responses/200Tracker'
400:
$ref: '#/components/responses/400BadRequest'
401:
$ref: '#/components/responses/401NotAuthenticated'
403:
$ref: '#/components/responses/403NotAuthorized'
409:
$ref: '#/components/responses/409Conflict'
500:
$ref: '#/components/responses/500ServerError'
/conversations/{
conversation_id}/tracker/events:
post:
security:
- TokenAuth: []
- JWT: []
operationId: addConversationTrackerEvents
tags:
- Tracker
summary: Append events to a tracker
description: >-
Appends one or multiple new events to the tracker state of the conversation.
Any existing events will be kept and the new events will be appended,
updating the existing state.
If events are appended to a new conversation ID, the tracker will be
initialised with a new session.
parameters:
- $ref: '#/components/parameters/conversation_id'
- $ref: '#/components/parameters/include_events'
- $ref: '#/components/parameters/output_channel'
- in: query
name: execute_side_effects
schema:
type: boolean
default: False
description: >-
If `true`, any ``BotUttered`` event will be forwarded to the
channel specified in the ``output_channel`` parameter. Any
``ReminderScheduled`` or ``ReminderCancelled`` event will also be
processed.
requestBody:
required: true
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/Event'
- type: array
items:
$ref: '#/components/schemas/Event'
responses:
200:
$ref: '#/components/responses/200Tracker'
400:
$ref: '#/components/responses/400BadRequest'
401:
$ref: '#/components/responses/401NotAuthenticated'
403:
$ref: '#/components/responses/403NotAuthorized'
409:
$ref: '#/components/responses/409Conflict'
500:
$ref: '#/components/responses/500ServerError'
put:
security:
- TokenAuth: []
- JWT: []
operationId: replaceConversationTrackerEvents
tags:
- Tracker
summary: Replace a trackers events
description: >-
Replaces all events of a tracker with the passed
list of events. This endpoint should not be used to
modify trackers in a production setup, but rather
for creating training data.
parameters:
- $ref: '#/components/parameters/conversation_id'
- $ref: '#/components/parameters/include_events'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/EventList'
responses:
200:
$ref: '#/components/responses/200Tracker'
400:
$ref: '#/components/responses/400BadRequest'
401:
$ref: '#/components/responses/401NotAuthenticated'
403:
$ref: '#/components/responses/403NotAuthorized'
409:
$ref: '#/components/responses/409Conflict'
500:
$ref: '#/components/responses/500ServerError'
/conversations/{
conversation_id}/story:
get:
security:
- TokenAuth: []
- JWT: []
operationId: getConversationStory
tags:
- Tracker
summary: Retrieve an end-to-end story corresponding to a conversation
description: >-
The story represents the whole conversation in end-to-end
format. This can be posted to the '/test/stories' endpoint and used
as a test.
parameters:
- $ref: '#/components/parameters/conversation_id'
- $ref: '#/components/parameters/until'
- $ref: '#/components/parameters/all_sessions'
responses:
200:
$ref: '#/components/responses/200Story'
401:
$ref: '#/components/responses/401NotAuthenticated'
403:
$ref: '#/components/responses/403NotAuthorized'
409:
$ref: '#/components/responses/409Conflict'
500:
$ref: '#/components/responses/500ServerError'
/conversations/{
conversation_id}/execute:
post:
security:
- TokenAuth: []
- JWT: []
operationId: executeConversationAction
tags:
- Tracker
summary: Run an action in a conversation
deprecated: true
description: >-
DEPRECATED. Runs the action, calling the action server if necessary.
Any responses sent by the executed action will be forwarded
to the channel specified in the output_channel parameter.
If no output channel is specified, any messages that should be
sent to the user will be included in the response of this endpoint.
parameters:
- $ref: '#/components/parameters/conversation_id'
- $ref: '#/components/parameters/include_events'
- $ref: '#/components/parameters/output_channel'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ActionRequest'
responses:
200:
description: Success
content:
application/json:
schema:
type: object
properties:
tracker:
$ref: '#/components/schemas/Tracker'
messages:
type: array
items:
$ref: '#/components/schemas/BotMessage'
400:
$ref: '#/components/responses/400BadRequest'
401:
$ref: '#/components/responses/401NotAuthenticated'
403:
$ref: '#/components/responses/403NotAuthorized'
409:
$ref: '#/components/responses/409Conflict'
500:
$ref: '#/components/responses/500ServerError'
/conversations/{
conversation_id}/trigger_intent:
post:
security:
- TokenAuth: []
- JWT: []
operationId: triggerConversationIntent
tags:
- Tracker
summary: Inject an intent into a conversation
description: >-
Sends a specified intent and list of entities in place of a
user message. The bot then predicts and executes a response action.
Any responses sent by the executed action will be forwarded
to the channel specified in the ``output_channel`` parameter.
If no output channel is specified, any messages that should be
sent to the user will be included in the response of this endpoint.
parameters:
- $ref: '#/components/parameters/conversation_id'
- $ref: '#/components/parameters/include_events'
- $ref: '#/components/parameters/output_channel'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/IntentTriggerRequest'
responses:
200:
description: Success
content:
application/json:
schema:
type: object
properties:
tracker:
$ref: '#/components/schemas/Tracker'
messages:
type: array
<
Rasa - Server Endpoints
最新推荐文章于 2024-07-01 11:42:04 发布
本文详细介绍了Rasa服务器提供的各种API端点,包括获取会话跟踪、修改追踪状态、模型训练和评估,以及健康检查和版本信息。这些端点对于管理和维护Rasa对话系统至关重要。

最低0.47元/天 解锁文章

1349

被折叠的 条评论
为什么被折叠?



