Help us shape the future of Go! Take the 2026 Go Developer Survey

run

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package run provides a gh command to run a GitHub model.

Index

Constants

This section is empty.

Variables

View Source
var ErrExitChat = errors.New("exiting chat")

Functions

func NewRunCommand

func NewRunCommand(cfg *command.Config) *cobra.Command

NewRunCommand returns a new gh command for running a model.

Types

type Conversation

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

Conversation represents a conversation between the user and the model.

func (*Conversation) AddMessage

func (c *Conversation) AddMessage(role azuremodels.ChatMessageRole, content string)

AddMessage adds a message to the conversation.

func (*Conversation) GetMessages

func (c *Conversation) GetMessages() []azuremodels.ChatMessage

GetMessages returns the messages in the conversation.

func (*Conversation) Reset

func (c *Conversation) Reset()

Reset removes messages from the conversation.

type ModelParameters

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

ModelParameters represents the parameters that can be set for a model run.

func (*ModelParameters) FormatParameter

func (mp *ModelParameters) FormatParameter(name string) string

FormatParameter returns a string representation of the parameter value.

func (*ModelParameters) PopulateFromFlags

func (mp *ModelParameters) PopulateFromFlags(flags *pflag.FlagSet) error

PopulateFromFlags populates the model parameters from the given flags.

func (*ModelParameters) SetParameterByName

func (mp *ModelParameters) SetParameterByName(name, value string) error

SetParameterByName sets the parameter with the given name to the given value.

func (*ModelParameters) UpdateRequest

func (mp *ModelParameters) UpdateRequest(req *azuremodels.ChatCompletionOptions)

UpdateRequest updates the given request with the model parameters.

Jump to

Keyboard shortcuts

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