Documentation ¶
Overview ¶
Copyright © 2023 NAME HERE <EMAIL ADDRESS>
Copyright © 2023 NAME HERE <EMAIL ADDRESS>
Index ¶
Constants ¶
View Source
const ( HOST = "https://ai-talk.app" ConnectURL = HOST + "/connect?install_id=%s" TalkURL = HOST + "/talks/%d" UploadAPI = HOST + "/api/talks/upload" )
View Source
const AuthHint = `` /* 260-byte string literal not displayed */
View Source
const FileHeader = `...
%s
...
`
View Source
const NAME = "aitalk"
Variables ¶
View Source
var ( VERSION = "0.2.0" Version bool Topic, Lang, Model string OpenaiAPIHost, OpenaiAPIKey string Roles roles Duration time.Duration )
View Source
var ( GlobalInputCh = make(chan string, 1) GlobalInputErrCh = make(chan error, 1) )
TODO: remove this ugly global channel
Functions ¶
Types ¶
type CreateResp ¶
type CreateResp struct { Code int `json:"code"` Msg string `json:"msg"` Data TalkCreateResp `json:"data"` }
type Intelligence ¶
type TalkCreateResp ¶
type TalkCreateResp struct {
ID int64 `json:"id"`
}
type UploadTalkReq ¶
type UploadTalkReq struct { Model string `json:"model" validate:"required"` Language string `json:"lang" validate:"required"` RoleA string `json:"roleA" validate:"required"` RoleB string `json:"roleB" validate:"required"` Topic string `json:"topic" validate:"required"` Content string `json:"content" validate:"required"` InstallId string `json:"install_id" validate:"required"` }
Click to show internal directories.
Click to hide internal directories.