utils

package
v0.0.0-...-d769f72 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2023 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIToResponse

func APIToResponse(baseURL string, parameterResponse *constants.ParameterResponse) (responseString string, err error)

func DetectParamsByAnthropic

func DetectParamsByAnthropic(client *anthropic.Client, userPrompt string, plugin *constants.Plugin) (*constants.ParameterResponse, error)

func DetectParamsByOpenAI

func DetectParamsByOpenAI(ctx context.Context, client *openai.Client, userPrompt string, plugin *constants.Plugin) (*constants.ParameterResponse, error)

func FetchData

func FetchData(pluginURL string) (*constants.PluginData, *openapi3.T, error)

func HashAndSaltPassword

func HashAndSaltPassword(password string) (string, error)

func MixResponsesByAnthropic

func MixResponsesByAnthropic(client *anthropic.Client, pluginResponse string, userPrompt string, plugin *constants.Plugin) (string, error)

func MixResponsesByOpenAI

func MixResponsesByOpenAI(ctx context.Context, client *openai.Client, pluginResponse string, userPrompt string, plugin *constants.Plugin) (string, error)

func PluginDataAndDocToPlugin

func PluginDataAndDocToPlugin(pluginData *constants.PluginData, doc *openapi3.T) *constants.Plugin

func PluginToAPIDetails

func PluginToAPIDetails(p *constants.Plugin) string

func PluginToDescription

func PluginToDescription(p *constants.Plugin) string

func SelectPluginsByAnthropic

func SelectPluginsByAnthropic(client *anthropic.Client, userPrompt string, plugins []*constants.Plugin) (string, error)

func SelectPluginsByOpenAI

func SelectPluginsByOpenAI(ctx context.Context, client *openai.Client, userPrompt string, plugins []*constants.Plugin) (string, error)

func SendEmail

func SendEmail(email string) (string, error)

发送邮件

func VerifyPassword

func VerifyPassword(password string, hashedPasswordWithSalt string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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