Documentation ¶
Index ¶
Constants ¶
View Source
const ApiBaseUrl = "https://dashscope.aliyuncs.com"
View Source
const ApiVersion = "v1"
View Source
const ChatMessageRoleAssistant = "assistant"
View Source
const ChatMessageRoleSystem = "system"
View Source
const ChatMessageRoleUser = "user"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { ApiBaseUrl string ApiVersion string ApiKey string Model string Params Parameters }
func (*Client) CreateChatCompletion ¶
func (c *Client) CreateChatCompletion(messages []Messages) (*ResponseBody, error)
type Parameters ¶
type Parameters struct {
EnableSearch bool `json:"enable_search"`
}
type RequestBody ¶
type RequestBody struct { Model string `json:"model"` Input Input `json:"input"` Parameters Parameters `json:"parameters"` }
type ResponseBody ¶
Click to show internal directories.
Click to hide internal directories.