-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchatbot.py
More file actions
73 lines (45 loc) · 1.62 KB
/
chatbot.py
File metadata and controls
73 lines (45 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import List, Optional
from datetime import datetime
from typing_extensions import Literal
from .._models import BaseModel
__all__ = ["Chatbot", "InteractionRule"]
class InteractionRule(BaseModel):
enabled: bool
message: str
name: str
version: Literal["1.0.0"]
words: List[str]
class Chatbot(BaseModel):
id: str
created_at: datetime
datasource_ids: List[str]
"""数据源 ID,目前只支持 1 个数据源。"""
modified_at: datetime
name: str
"""名称,不超过 64 个字符"""
project_id: str
avatar_url: Optional[str] = None
"""头像 URL"""
color_theme: Optional[str] = None
"""颜色主题"""
debug: Optional[bool] = None
"""调试模式"""
extapi_ids: Optional[List[str]] = None
"""扩展 API ID 列表,扩展 API ID 的逗号分隔列表。"""
interaction_rules: Optional[List[InteractionRule]] = None
"""交互规则列表,用于定义 bot 的行为规则"""
magic_input: Optional[str] = None
"""魔法提示词"""
max_rows: Optional[int] = None
"""最大返回行数,默认不限制"""
publish: Optional[bool] = None
"""是否公开"""
query_balance: Optional[int] = None
"""bot 的查询次数,默认是 None,表示无限次查询,入参为大于等于 1 的整数"""
sample_questions: Optional[List[str]] = None
"""示例问题列表"""
webhooks: Optional[List[str]] = None
"""Webhook URL 列表"""
welcome_message: Optional[str] = None
"""欢迎消息"""