package
0.0.0-20250306163500-5f3bb2705e1f
Repository: https://github.com/versoriumx/teleport.git
Documentation: pkg.go.dev
# Functions
IsInvalidOutputError returns true if the error is an invalidOutputError.
NewInvalidOutputError builds an error caused by the output of an LLM.
NewStreamingMessage takes a string channel and converts it to a StreamingMessage.
ParseJSONFromModel parses a JSON object from the model output and attempts to sanitize contaminant text to avoid triggering self-correction due to some natural language being bundled with the JSON.
StreamToDeltas converts an openai.CompletionStream into a channel of strings.
# Structs
AccessRequest represents an access request suggestion returned by OpenAI's completion API.
CompletionCommand represents a command suggestion returned by OpenAI's completion API.
GeneratedCommand represents a Bash command generated by LLM.
Label represents a label returned by OpenAI's completion API.
Message represents a new message within a live conversation.
Resource represents a resource suggestion returned by OpenAI's completion API.
StreamingMessage represents a new message that is being streamed from the LLM.