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

Function firstConversationID

internal/chatgpt/artifacts.go:666–685  ·  view source on GitHub ↗
(value interface{})

Source from the content-addressed store, hash-verified

664}
665
666func firstConversationID(value interface{}) string {
667 switch item := value.(type) {
668 case map[string]interface{}:
669 if cid, _ := item["conversation_id"].(string); cid != "" {
670 return cid
671 }
672 for _, nested := range item {
673 if cid := firstConversationID(nested); cid != "" {
674 return cid
675 }
676 }
677 case []interface{}:
678 for _, nested := range item {
679 if cid := firstConversationID(nested); cid != "" {
680 return cid
681 }
682 }
683 }
684 return ""
685}
686
687func streamEventToMap(ev StreamEvent) map[string]interface{} {
688 data, err := json.Marshal(ev)

Callers 3

ObserveRawMethod · 0.85
HandlerTTSFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected