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

Function streamHandoffTopicFromEvent

internal/chatgpt/request.go:1496–1514  ·  view source on GitHub ↗
(raw map[string]interface{})

Source from the content-addressed store, hash-verified

1494}
1495
1496func streamHandoffTopicFromEvent(raw map[string]interface{}) string {
1497 options, ok := raw["options"].([]interface{})
1498 if !ok {
1499 return ""
1500 }
1501 for _, optionValue := range options {
1502 option, ok := optionValue.(map[string]interface{})
1503 if !ok {
1504 continue
1505 }
1506 optionType, _ := option["type"].(string)
1507 if optionType != "subscribe_ws_topic" {
1508 continue
1509 }
1510 topicID, _ := option["topic_id"].(string)
1511 return topicID
1512 }
1513 return ""
1514}
1515
1516func streamHandoffTopicFromMetadata(raw map[string]interface{}) string {
1517 if turnExchangeID, _ := raw["turn_exchange_id"].(string); turnExchangeID != "" {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected