|
|
|
@ -168,14 +168,21 @@ class OpenAIServicePlugin : FlutterPlugin, MethodCallHandler, StreamHandler { |
|
|
|
Log.e("OpenAIServicePlugin", "context:${functionCall.toString()}") |
|
|
|
val context = functionCall["context"] |
|
|
|
if (functionCall.has("meta")) { |
|
|
|
val meta = mapOf<String, Any>( |
|
|
|
"card_spotify" to mapOf<String, Any>( |
|
|
|
"name" to "泡沫", |
|
|
|
"image" to "https://i.scdn.co/image/ab67616d0000b2739f6a38e4bb9c2f824c215e58", |
|
|
|
"url" to "spotify:track:2IfSPLPDW6RGosdB5huwAA", |
|
|
|
"sgener" to "Xposed", |
|
|
|
) |
|
|
|
Log.e("OpenAIServicePlugin", |
|
|
|
""" |
|
|
|
工具调用结果 meta 类型: ${functionCall["meta"]?.javaClass?.canonicalName} |
|
|
|
值内容: ${functionCall["meta"]} |
|
|
|
""".trimIndent() |
|
|
|
) |
|
|
|
val meta = functionCall["meta"].toString() |
|
|
|
// val meta = mapOf<String, Any>( |
|
|
|
// "card_spotify" to mapOf<String, Any>( |
|
|
|
// "name" to "泡沫", |
|
|
|
// "image" to "https://i.scdn.co/image/ab67616d0000b2739f6a38e4bb9c2f824c215e58", |
|
|
|
// "url" to "spotify:track:2IfSPLPDW6RGosdB5huwAA", |
|
|
|
// "sgener" to "Xposed", |
|
|
|
// ) |
|
|
|
// ) |
|
|
|
Log.e("OpenAIServicePlugin", "工具调用结果 context:${context} meta:${meta.toString()}") |
|
|
|
// 发送函数调用事件 |
|
|
|
mainHandler.post { |
|
|
|
|