Documentation
¶
Index ¶
- func AssistantClarificationComment(agent, clarification string) string
- func AssistantErrorComment(agent, err string) string
- func AssistantObservationComment(agent, clarification string) string
- func BackticksJSON(js string) string
- func BackticksYAM(js string) string
- func BytesTrimBackticks(bs []byte) []byte
- func CleanJSON(bs []byte) []byte
- func JSONIndent(body string) string
- func MergeInputs(configInputs map[string]any, userInputs map[string]any) map[string]any
- func NewContentResponse(val any) *llms.ContentResponse
- func PrintChatMessages(w io.Writer, msgs []llms.ChatMessage)
- func PrintMessageContents(w io.Writer, msgs []llms.MessageContent)
- func RemoveAllComments(input string) string
- func Stringify(s any) string
- func StripComments(text string) string
- func ToJSON(val any) string
- func ToJSONIndent(val any) string
- func ToYAML(val any) string
- func ToolClarificationComment(tool, clarification string) string
- func ToolErrorComment(tool, err string) string
- func TrimBackticks(text string) string
- type Stringer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssistantErrorComment ¶
func AssistantObservationComment ¶ added in v0.3.12
func BackticksJSON ¶
func BackticksYAM ¶
func BytesTrimBackticks ¶
BytesTrimBackticks removes ```json or ```
func CleanJSON ¶
CleanJSON returns JSON by trimming prefixes and postfixes, this is more useful than TrimBackticks, ass LLM can reply like, `Here you go: {json}`
func JSONIndent ¶
func MergeInputs ¶
func NewContentResponse ¶
func NewContentResponse(val any) *llms.ContentResponse
func PrintChatMessages ¶ added in v0.3.12
func PrintChatMessages(w io.Writer, msgs []llms.ChatMessage)
func PrintMessageContents ¶ added in v0.3.12
func PrintMessageContents(w io.Writer, msgs []llms.MessageContent)
PrintMessageContents is a debugging helper for MessageContent.
func RemoveAllComments ¶ added in v0.3.12
RemoveAllComments removes all <!-- --> comments from the LLM output
func StripComments ¶
StripComments removes <!-- --> comments from the LLM output
func ToJSONIndent ¶
func ToolErrorComment ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.