MCPcopy Create free account
hub / github.com/53AI/53AIHub / stringifyConversationID

Function stringifyConversationID

api/middleware/relay_auth.go:295–309  ·  view source on GitHub ↗
(conversationIDValue interface{})

Source from the content-addressed store, hash-verified

293}
294
295func stringifyConversationID(conversationIDValue interface{}) (string, bool) {
296 switch v := conversationIDValue.(type) {
297 case string:
298 if strings.TrimSpace(v) == "" {
299 return "", false
300 }
301 return v, true
302 case float64:
303 return strconv.FormatInt(int64(v), 10), true
304 case int64:
305 return strconv.FormatInt(v, 10), true
306 default:
307 return "", false
308 }
309}
310
311func writeConversationNotFound(c *gin.Context) {
312 c.JSON(http.StatusNotFound, model.NotFound.ToOpenAIErrorRespone(errors.New("Conversation not found")))

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected