logger

package
v1.0.40 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const LLMAPIURL = "https://api.coze.com/open_api/v2/chat"

Variables

View Source
var GinWriter *logr.Writer
View Source
var Logger *logr.Logger
View Source
var Support *logr.Logger

Functions

func Demo

func Demo()

func Init

func Init()

Types

type BinancePrice

type BinancePrice struct {
	Price  float64 `json:"lastPrice,string"`
	Volume float64 `json:"quoteVolume,string"`
}

type BitfinexPrice

type BitfinexPrice struct {
	Price  float64
	Volume float64
}

func (*BitfinexPrice) UnmarshalJSON

func (b *BitfinexPrice) UnmarshalJSON(buf []byte) error

type ChatHistory added in v1.0.38

type ChatHistory []*HistoryItem

type HistoryItem added in v1.0.38

type HistoryItem struct {
	Role    string `json:"role"`
	Type    string `json:"type"`
	Content string `json:"content"`
}

func (*HistoryItem) String added in v1.0.38

func (hi *HistoryItem) String() string

type HitbtcPrice

type HitbtcPrice struct {
	Price  float64 `json:"last,string"`
	Volume float64 `json:"volume_quote,string"`
}

type RequestBody added in v1.0.38

type RequestBody struct {
	ConversationId string      `json:"conversation_id"`
	BotId          string      `json:"bot_id"`
	User           string      `json:"user"`
	Query          string      `json:"query"`
	Stream         bool        `json:"stream"`
	ChatHistory    ChatHistory `json:"chat_history"`
}

type ResponseBody added in v1.0.38

type ResponseBody struct {
	Messages       ChatHistory `json:"messages"`
	ConversationId string      `json:"conversation_id"`
	Code           int         `json:"code"`
	Msg            string      `json:"msg"`
}

func (*ResponseBody) Answer added in v1.0.38

func (r *ResponseBody) Answer() *HistoryItem

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL