Documentation ¶
Index ¶
- func GenReqDefForExecuteChatCompletion() *def.HttpRequestDef
- func GenReqDefForExecuteTextCompletion() *def.HttpRequestDef
- func PanguLargeModelsClientBuilder() *httpclient.HcHttpClientBuilder
- type ExecuteChatCompletionInvoker
- type ExecuteTextCompletionInvoker
- type PanguLargeModelsClient
- func (c *PanguLargeModelsClient) ExecuteChatCompletion(request *model.ExecuteChatCompletionRequest) (*model.ExecuteChatCompletionResponse, error)
- func (c *PanguLargeModelsClient) ExecuteChatCompletionInvoker(request *model.ExecuteChatCompletionRequest) *ExecuteChatCompletionInvoker
- func (c *PanguLargeModelsClient) ExecuteTextCompletion(request *model.ExecuteTextCompletionRequest) (*model.ExecuteTextCompletionResponse, error)
- func (c *PanguLargeModelsClient) ExecuteTextCompletionInvoker(request *model.ExecuteTextCompletionRequest) *ExecuteTextCompletionInvoker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenReqDefForExecuteChatCompletion ¶
func GenReqDefForExecuteChatCompletion() *def.HttpRequestDef
func GenReqDefForExecuteTextCompletion ¶
func GenReqDefForExecuteTextCompletion() *def.HttpRequestDef
func PanguLargeModelsClientBuilder ¶
func PanguLargeModelsClientBuilder() *httpclient.HcHttpClientBuilder
Types ¶
type ExecuteChatCompletionInvoker ¶
type ExecuteChatCompletionInvoker struct {
*invoker.BaseInvoker
}
func (*ExecuteChatCompletionInvoker) Invoke ¶
func (i *ExecuteChatCompletionInvoker) Invoke() (*model.ExecuteChatCompletionResponse, error)
type ExecuteTextCompletionInvoker ¶
type ExecuteTextCompletionInvoker struct {
*invoker.BaseInvoker
}
func (*ExecuteTextCompletionInvoker) Invoke ¶
func (i *ExecuteTextCompletionInvoker) Invoke() (*model.ExecuteTextCompletionResponse, error)
type PanguLargeModelsClient ¶
type PanguLargeModelsClient struct {
HcClient *httpclient.HcHttpClient
}
func NewPanguLargeModelsClient ¶
func NewPanguLargeModelsClient(hcClient *httpclient.HcHttpClient) *PanguLargeModelsClient
func (*PanguLargeModelsClient) ExecuteChatCompletion ¶
func (c *PanguLargeModelsClient) ExecuteChatCompletion(request *model.ExecuteChatCompletionRequest) (*model.ExecuteChatCompletionResponse, error)
ExecuteChatCompletion 对话问答
基于对话问答功能,用户可以与模型进行自然而流畅的对话和交流。
Please refer to HUAWEI cloud API Explorer for details.
func (*PanguLargeModelsClient) ExecuteChatCompletionInvoker ¶
func (c *PanguLargeModelsClient) ExecuteChatCompletionInvoker(request *model.ExecuteChatCompletionRequest) *ExecuteChatCompletionInvoker
ExecuteChatCompletionInvoker 对话问答
func (*PanguLargeModelsClient) ExecuteTextCompletion ¶
func (c *PanguLargeModelsClient) ExecuteTextCompletion(request *model.ExecuteTextCompletionRequest) (*model.ExecuteTextCompletionResponse, error)
ExecuteTextCompletion 通用文本
给定一个提示和一些参数,模型会根据这些信息生成一个或多个预测的补全,还可以返回每个位置上不同词语的概率。它可以用来做文本生成、自动写作、代码补全等任务。
Please refer to HUAWEI cloud API Explorer for details.
func (*PanguLargeModelsClient) ExecuteTextCompletionInvoker ¶
func (c *PanguLargeModelsClient) ExecuteTextCompletionInvoker(request *model.ExecuteTextCompletionRequest) *ExecuteTextCompletionInvoker
ExecuteTextCompletionInvoker 通用文本
Source Files ¶
Click to show internal directories.
Click to hide internal directories.