package
0.0.0-20240509090842-11decd0816f6
Repository: https://github.com/iflytek/spark-ai-go.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# Functions
No description provided by the author
No description provided by the author
New returns a new SparkAI client.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
appid授权类的错误。比如:未开通此功能,未开通对应版本,token不足,并发超过授权等等.
appid在黑名单中.
授权错误:并发流控超限。并发路数超过授权路数限制.
授权错误:日流控超限。超过当日最大访问量的限制.
授权错误:该appId没有相关功能的授权 或者 业务量超过限制.
授权错误:秒级流控超限。秒级并发超过授权路数限制.
清除历史失败.
输入内容审核不通过,涉嫌违规,请重新调整输入内容.
和引擎建立连接失败.
引擎内部错误.
引擎网络异常.
请求引擎的参数异常 引擎的schema 检查不通过.
通过ws读取用户的消息出错.
接收引擎数据的错误.
发送数据给引擎的错误.
通过ws向用户发送消息出错.
输出内容涉及敏感信息,审核不通过,后续结果无法展示给用户.
服务忙,请稍后再试.
服务容量不足,联系工作人员.
表示本次会话内容有涉及违规信息的倾向;建议开发者收到此错误码后给用户一个输入涉及违规的提示.
token数量超过上限。对话历史+问题的字数太多,需要精简输入.
升级为ws出现错误.
用户并发错误:当前用户已连接,同一用户不能多处同时连接。.
用户数据的schema错误.
用户的消息格式有错误.
用户参数值有错误.
用户流量受限:服务正在处理用户当前的问题,需等待处理完成后再发送新的请求。.
FunctionCallBehaviorAuto will call functions automatically.
FunctionCallBehaviorNone will not call any functions.
FunctionCallBehaviorUnspecified is the empty string.
成功.
# Variables
No description provided by the author
ErrEmptyResponse is returned when the OpenAI API returns an empty response.
ErrorMap 将错误码映射到错误信息.
# Structs
No description provided by the author
ChatChoice is a choice in a chat response.
ChatMessage is a message in a chat request.
ChatRequest is a request to complete a chat completion..
ChatResponse is a response to a chat request.
ChatUsage is the usage of a chat completion request.
Client is a client for the OpenAI API.
Completion is a completion.
CompletionRequest is a request to complete a completion.
No description provided by the author
EmbeddingRequest is a request to create an embedding.
FunctionCall is a call to a function.
FunctionDefinition is a definition of a function that can be called by the model.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
StreamedChatResponsePayload is a chunk from the stream.
No description provided by the author
# Interfaces
Doer performs a HTTP request.
# Type aliases
No description provided by the author
FunctionCallBehavior is the behavior to use when calling functions.
Option is an option for the Spark client.
SparkErrorCode 定义错误码的类型.