MCPcopy Create free account
hub / github.com/aurora-develop/aurora / rawText

Function rawText

typings/official/request.go:447–456  ·  view source on GitHub ↗
(raw json.RawMessage)

Source from the content-addressed store, hash-verified

445}
446
447func rawText(raw json.RawMessage) string {
448 if len(raw) == 0 || string(raw) == "null" {
449 return ""
450 }
451 var text string
452 if err := json.Unmarshal(raw, &text); err == nil {
453 return text
454 }
455 return strings.TrimSpace(string(raw))
456}
457
458func responsesInputToMessages(raw json.RawMessage) ([]APIMessage, error) {
459 if len(raw) == 0 || string(raw) == "null" {

Callers 1

ToAPIRequestMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected