Documentation
¶
Index ¶
- func AssistantClarificationComment(agent, clarification string) string
- func AssistantErrorComment(agent, err 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 ShowMessageContents(w io.Writer, msgs []llms.MessageContent)
- 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 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 ShowMessageContents ¶
func ShowMessageContents(w io.Writer, msgs []llms.MessageContent)
ShowMessageContents is a debugging helper for MessageContent.
func StripComments ¶
StripComments removes <!-- --> comments from the LLM output
func ToJSONIndent ¶
func ToolErrorComment ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.