Versions in this module Expand all Collapse all v0 v0.7.0 Apr 30, 2024 Changes in this version + type AppBuilderClient struct + func NewAppBuilderClient(appID string, config *SDKConfig) (*AppBuilderClient, error) + func (t *AppBuilderClient) CreateConversation() (string, error) + func (t *AppBuilderClient) Run(conversationID string, query string, fileIDS []string, stream bool) (AppBuilderClientIterator, error) + func (t *AppBuilderClient) UploadLocalFile(conversationID string, filePath string) (string, error) + type AppBuilderClientAnswer struct + Answer string + Events []Event + type AppBuilderClientIterator interface + Next func() (*AppBuilderClientAnswer, error) + type AppBuilderClientOnceIterator struct + func (t *AppBuilderClientOnceIterator) Next() (*AppBuilderClientAnswer, error) + type AppBuilderClientRawResponse struct + Answer string + Content []RawEventDetail + ConversationID string + Date string + IsCompletion bool + MessageID string + RequestID string + type AppBuilderClientStreamIterator struct + func (t *AppBuilderClientStreamIterator) Next() (*AppBuilderClientAnswer, error) type SDKConfig + GatewayURLV2 string + func (t *SDKConfig) AuthHeaderV2() http.Header + func (t *SDKConfig) ServiceURLV2(suffix string) (*url.URL, error) v0.6.1 Apr 12, 2024 v0.6.0 Apr 12, 2024 Changes in this version + const AudioContentType + const CodeContentType + const FunctionCallContentType + const ImageContentType + const RAGContentType + const StatusContentType + const TextContentType + const VideoContentType + var TypeToStruct = map[string]reflect.Type + func NewSSEReader(bufSize int, reader *bufio.Reader) *sseReader + type AgentBuilder struct + func NewAgentBuilder(appID string, config *SDKConfig) (*AgentBuilder, error) + func (t *AgentBuilder) CreateConversation() (string, error) + func (t *AgentBuilder) Run(conversationID string, query string, fileIDS []string, stream bool) (AgentBuilderIterator, error) + func (t *AgentBuilder) UploadLocalFile(conversationID string, filePath string) (string, error) + type AgentBuilderAnswer struct + Answer string + Events []Event + type AgentBuilderIterator interface + Next func() (*AgentBuilderAnswer, error) + type AgentBuilderOnceIterator struct + func (t *AgentBuilderOnceIterator) Next() (*AgentBuilderAnswer, error) + type AgentBuilderRawResponse struct + Answer string + Content []RawEventDetail + ConversationID string + Date string + IsCompletion bool + MessageID string + RequestID string + type AgentBuilderStreamIterator struct + func (t *AgentBuilderStreamIterator) Next() (*AgentBuilderAnswer, error) + type AudioDetail struct + Audio string + type CodeDetail struct + Code string + Files []string + Text string + type Dataset struct + func NewDataset(config *SDKConfig) (*Dataset, error) + func (t *Dataset) BatchUploadLocaleFile(datasetID string, localFilePaths []string) ([]string, error) + func (t *Dataset) Create(name string) (string, error) + func (t *Dataset) DeleteDocument(datasetID, documentID string) error + func (t *Dataset) ListDocument(datasetID string, page int, limit int, keyword string) (*ListDocumentResponse, error) + func (t *Dataset) UploadLocalFile(datasetID string, localFilePath string) (string, error) + type DatasetBindResponse struct + Code int + Message string + Result DatasetBindResult + type DatasetBindResult struct + DocumentIDs []string + type DatasetResponse struct + Code int + Message string + Result map[string]interface{} + type DefaultDetail struct + Audio string + Files []string + Image string + URLS []string + Video string + type Event struct + Code int + ContentType string + Detail interface{} + EventType string + Message string + Status string + type FileInfo struct + ID string + Name string + type FunctionCallDetail struct + Audio string + Image string + Text interface{} + Video string + type ImageDetail struct + Image string + type ListDocumentResponse struct + Code int + Message string + Result ListDocumentResponseResult + type ListDocumentResponseResult struct + Data []FileInfo + HasMore bool + Limit int + Page int + Total int + type RAG struct + func NewRAG(appID string, config *SDKConfig) (*RAG, error) + func (t *RAG) Run(conversationID string, query string, stream bool) (RAGIterator, error) + type RAGAnswer struct + Answer string + ConversationID string + Events []RAGEvent + type RAGDetail struct + References []Reference + Text string + type RAGEvent struct + Event string + EventID string + EventStatus string + EventType string + Text json.RawMessage + type RAGIterator interface + Next func() (*RAGAnswer, error) + type RAGOnceIterator struct + func (t *RAGOnceIterator) Next() (*RAGAnswer, error) + type RAGResult struct + Answer string + Content []RAGEvent + ConversationID string + type RAGRunResponse struct + Code int + Message string + Result RAGResult + type RAGStreamIterator struct + func (t *RAGStreamIterator) Next() (*RAGAnswer, error) + type RawEventDetail struct + ContentType string + EventCode int + EventID string + EventMessage string + EventStatus string + EventType string + Outputs json.RawMessage + type Reference struct + Content string + DatasetID string + DocumentID string + DocumentName string + From string + ID string + SegmentID string + URL string + type SDKConfig struct + GatewayURL string + SecretKey string + func NewSDKConfig(gatewayURL, secretKey string) (*SDKConfig, error) + func (t *SDKConfig) AuthHeader() http.Header + func (t *SDKConfig) ServiceURL(suffix string) (*url.URL, error) + type SSEEvent struct + Data string + LastEventID string + Type string + type StatusDetail struct + type TextDetail struct + Text string + type VideoDetail struct + Video string