model

package
v0.0.84 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: MIT Imports: 3 Imported by: 2

Documentation

Overview

Package model provides functionalities for working with Large Language Models (LLMs).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChatModelGenerate

func ChatModelGenerate(ctx context.Context, model schema.ChatModel, messages schema.ChatMessages, optFns ...func(o *Options)) (*schema.ModelResult, error)

func GeneratePrompt

func GeneratePrompt(ctx context.Context, model schema.Model, promptValue schema.PromptValue, optFns ...func(o *Options)) (*schema.ModelResult, error)

func LLMGenerate

func LLMGenerate(ctx context.Context, model schema.LLM, prompt string, optFns ...func(o *Options)) (*schema.ModelResult, error)

Types

type Options added in v0.0.22

type Options struct {
	Stop        []string
	Callbacks   []schema.Callback
	ParentRunID string
	Functions   []schema.FunctionDefinition
}

Directories

Path Synopsis
Package chatmodel provides functionalities for working with Large Language Models (LLMs).
Package chatmodel provides functionalities for working with Large Language Models (LLMs).
Package llm provides functionalities for working with Large Language Models (LLMs).
Package llm provides functionalities for working with Large Language Models (LLMs).

Jump to

Keyboard shortcuts

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