MCPcopy
hub / github.com/danielmiessler/Fabric / String

Method String

internal/plugins/db/fsdb/sessions.go:85–100  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

83}
84
85func (o *Session) String() (ret string) {
86 for _, message := range o.Messages {
87 ret += fmt.Sprintf("\n--- \n[%v]\n%v", message.Role, message.Content)
88 if message.MultiContent != nil {
89 for _, part := range message.MultiContent {
90 switch part.Type {
91 case chat.ChatMessagePartTypeImageURL:
92 ret += fmt.Sprintf("\n%v: %v", part.Type, *part.ImageURL)
93 case chat.ChatMessagePartTypeText:
94 ret += fmt.Sprintf("\n%v: %v", part.Type, part.Text)
95 }
96 }
97 }
98 }
99 return
100}

Callers 15

handleChatProcessingFunction · 0.95
PrintSessionMethod · 0.95
configureMethod · 0.45
readAndCleanVTTFileMethod · 0.45
GrabVisualMethod · 0.45
FormatMetadataAsTextMethod · 0.45
SaveEnvFileMethod · 0.45
fixInvalidEscapesFunction · 0.45
ResolveTypeMethod · 0.45
detectMimeTypeFromFileFunction · 0.45
writeAllFlagsMethod · 0.45

Calls

no outgoing calls

Tested by 7

ReadStdinFunction · 0.36
captureOutputFunction · 0.36
TestDateTimePluginFunction · 0.36