MCPcopy Create free account
hub / github.com/GongShichen/LuminaCode / getInt

Function getInt

api/client.go:1325–1343  ·  view source on GitHub ↗
(m map[string]any, key string)

Source from the content-addressed store, hash-verified

1323 return nil, false
1324 }
1325
1326 return &consumeResult{
1327 ToolMessages: toolMessages,
1328 TrailingText: strings.Join(nonEmptyStrings(textParts), "\n"),
1329 MatchedIDs: matchedIDs,
1330 }, true
1331}
1332
1333func convertAnthropicMessagesToOpenAI(messages []map[string]any) []map[string]any {
1334 converted := []map[string]any{}
1335 i := 0
1336
1337 for i < len(messages) {
1338 msg := messages[i]
1339 role := getStringDefault(msg, "role", "user")
1340 content := msg["content"]
1341
1342 if contentStr, ok := content.(string); ok {
1343 converted = append(converted, map[string]any{"role": role, "content": contentStr})
1344 i++
1345 continue
1346 }

Callers 2

streamAnthropicMethod · 0.70

Calls 1

Int64Method · 0.80

Tested by

no test coverage detected