integration

package
v0.0.58 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package integration provides utilities for integration with external systems, services, and frameworks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToOpenAIChatCompletionMessages added in v0.0.56

func ToOpenAIChatCompletionMessages(messages schema.ChatMessages) ([]openai.ChatCompletionMessage, error)

ToOpenAIChatCompletionMessages converts a slice of schema.ChatMessage to a slice of openai.ChatCompletionMessage. It extracts the necessary information from each message to create the corresponding OpenAI chat completion message.

Types

type HTTPClient added in v0.0.58

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

type SerpAPI

type SerpAPI struct {
	// contains filtered or unexported fields
}

func NewSerpAPI

func NewSerpAPI(apiKey string) (*SerpAPI, error)

func (*SerpAPI) Run

func (s *SerpAPI) Run(ctx context.Context, query string) (string, error)

type SerpAPIOptions

type SerpAPIOptions struct {
	Parameter map[string]string
}

type Wikipedia added in v0.0.4

type Wikipedia struct {
	// contains filtered or unexported fields
}

func NewWikipedia added in v0.0.4

func NewWikipedia(optFns ...func(o *WikipediaOptions)) *Wikipedia

func (*Wikipedia) Run added in v0.0.4

func (w *Wikipedia) Run(ctx context.Context, query string) (string, error)

type WikipediaOptions added in v0.0.4

type WikipediaOptions struct {
	LanguageCode string
	TopK         int
	DocMaxChars  int
	HTTPClient   HTTPClient
}

Directories

Path Synopsis
Package nbformat provides utilities to read and parse Jupyter Notebook (nbformat) files.
Package nbformat provides utilities to read and parse Jupyter Notebook (nbformat) files.
Package sqldb provides an SQL database abstraction for performing queries and interacting with the database.
Package sqldb provides an SQL database abstraction for performing queries and interacting with the database.

Jump to

Keyboard shortcuts

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