copilot

package
v0.46.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatOptions

type ChatOptions = sdkcop.ChatOptions

Re-export SDK types that don't need table tags as aliases.

type ConversationContext

type ConversationContext = sdkcop.ConversationContext

Re-export SDK types that don't need table tags as aliases.

type ConversationMessage

type ConversationMessage = sdkcop.ConversationMessage

Re-export SDK types that don't need table tags as aliases.

type ConversationRequest

type ConversationRequest = sdkcop.ConversationRequest

Re-export SDK types that don't need table tags as aliases.

type ConversationResponse

type ConversationResponse struct {
	Text  string             `json:"text" table:"RESPONSE"`
	State *ConversationState `json:"state,omitempty" table:"-"`
}

ConversationResponse represents a response from the CoPilot conversation endpoint.

type ConversationState

type ConversationState = sdkcop.ConversationState

Re-export SDK types that don't need table tags as aliases.

type DocumentMetadata

type DocumentMetadata = sdkcop.DocumentMetadata

Re-export SDK types that don't need table tags as aliases.

type DocumentSearchRequest

type DocumentSearchRequest = sdkcop.DocumentSearchRequest

Re-export SDK types that don't need table tags as aliases.

type DocumentSearchResponse

type DocumentSearchResponse struct {
	MessageToken string           `json:"messageToken"`
	Results      []ScoredDocument `json:"results"`
	Status       string           `json:"status"`
}

DocumentSearchResponse represents the response from document search. Used for JSON deserialization in tests.

type DocumentSearchResult

type DocumentSearchResult struct {
	Documents []ScoredDocument
	Status    string
}

DocumentSearchResult is a processed result for display.

type Dql2NlRequest

type Dql2NlRequest = sdkcop.Dql2NlRequest

Re-export SDK types that don't need table tags as aliases.

type Dql2NlResponse

type Dql2NlResponse struct {
	Summary      string `json:"summary" table:"SUMMARY"`
	Explanation  string `json:"explanation" table:"EXPLANATION"`
	MessageToken string `json:"messageToken" table:"-"`
	Status       string `json:"status" table:"STATUS"`
}

Dql2NlResponse represents the response from the DQL to NL skill.

type Handler

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

Handler handles Davis CoPilot resources.

func NewHandler

func NewHandler(c *client.Client) *Handler

NewHandler creates a new copilot handler

func (*Handler) Chat

Chat sends a message to CoPilot and returns the response

func (*Handler) ChatStream

func (h *Handler) ChatStream(text string, state *ConversationState, ctx []ConversationContext, callback func(chunk StreamChunk) error) (*ConversationResponse, error)

ChatStream sends a message to CoPilot and streams the response

func (*Handler) ChatWithOptions

func (h *Handler) ChatWithOptions(text string, opts ChatOptions, streamCallback func(chunk StreamChunk) error) (*ConversationResponse, error)

ChatWithOptions sends a message with options

func (*Handler) DocumentSearch

func (h *Handler) DocumentSearch(texts []string, collections []string, exclude []string) (*DocumentSearchResult, error)

DocumentSearch searches for relevant documents

func (*Handler) Dql2Nl

func (h *Handler) Dql2Nl(dql string) (*Dql2NlResponse, error)

Dql2Nl explains a DQL query in natural language

func (*Handler) ListSkills

func (h *Handler) ListSkills() (*SkillList, error)

ListSkills retrieves all available CoPilot skills

func (*Handler) Nl2Dql

func (h *Handler) Nl2Dql(text string) (*Nl2DqlResponse, error)

Nl2Dql converts natural language to a DQL query

type Nl2DqlRequest

type Nl2DqlRequest = sdkcop.Nl2DqlRequest

Re-export SDK types that don't need table tags as aliases.

type Nl2DqlResponse

type Nl2DqlResponse struct {
	DQL          string `json:"dql" table:"DQL"`
	MessageToken string `json:"messageToken" table:"-"`
	Status       string `json:"status" table:"STATUS"`
}

Nl2DqlResponse represents the response from the NL to DQL skill.

type ScoredDocument

type ScoredDocument struct {
	DocumentID       string           `json:"documentId" table:"ID"`
	RelevanceScore   float64          `json:"relevanceScore" table:"SCORE"`
	DocumentMetadata DocumentMetadata `json:"documentMetadata" table:"-"`
	Name             string           `table:"NAME"`
	Type             string           `table:"TYPE"`
}

ScoredDocument represents a document with its relevance score.

type Skill

type Skill struct {
	Name string `table:"NAME"`
}

Skill represents an available CoPilot skill with CLI display fields.

type SkillList

type SkillList struct {
	Skills []Skill
}

SkillList is the processed list for display.

type SkillsResponse

type SkillsResponse = sdkcop.SkillsResponse

Re-export SDK types that don't need table tags as aliases.

type StreamChunk

type StreamChunk = sdkcop.StreamChunk

Re-export SDK types that don't need table tags as aliases.

type StreamChunkData

type StreamChunkData = sdkcop.StreamChunkData

Re-export SDK types that don't need table tags as aliases.

Jump to

Keyboard shortcuts

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