Java: Not possible to retrieve function calls and function results
還沒有人認領這個 Issue。
評估
研究方向
從 issue 中所示的 Java 對 getChatMessageContentsAsync 的呼叫開始,追蹤 InvocationContext 和 ChatHistory 如何處理函式呼叫及其結果。將所描述的 Java 行為與 .NET 中 ChatHistory 的行為進行比較;當函式呼叫訊息和函式結果訊息可以被擷取或重新加入,使後續問題能夠重複使用已擷取的內容時,即視為完成。
由索引模型根據 Issue 內容生成。
描述
After running the following code, it is not possible to retrieve the function calls and function result messages so that they can be readded to the history.
InvocationContext invocationContext = new InvocationContext.Builder()
.withToolCallBehavior(ToolCallBehavior.allowAllKernelFunctions(true))
.build();
List<ChatMessageContent<?>> results = chat.getChatMessageContentsAsync(chatHistory, kernel, invocationContext)
.block();
In .NET, after invoking the chat completion model, the ChatHistory is mutated so that it includes all of the messages that were created (including function calls from the assistant role and function results as tool messages)
Because of this limitation, it is not possible for the AI to reuse context it was able to retrieve in previous function calls/results. For example, in the following chat, the AI used a function call to get the states of the lightbulbs. This included the IDs of the lights which are necessary for subsequent function calls.
Unfortunately, because the function result is lost, subsequent questions aren't able to use that information and the AI cannot complete them.
- 主要語言
- Java
- 星號
- 276
- 分支
- 57
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
microsoft/semantic-kernel-java 的其他 Issue
-
難度 5/5 一週以上 新手友好度 20/100
microsoft/semantic-kernel-java#334 · 1 則留言 ·
-
Feature Parity Inquiry: Multi-Agent Orchestration and Roadmap Alignment with Python/.NET Versions未關閉
難度 5/5 一週以上 新手友好度 25/100
microsoft/semantic-kernel-java#331 · 7 則留言 ·
-
Bug: HTTP 404 Error When Using OpenAI-Compatible Endpoint with Semantic Kernel 1.4.4-RC1可能重新可做 @johnoliver 於 426 天前認領,目前沒有進行中的 PR。 未關閉bug triage
microsoft/semantic-kernel-java#330 · 3 則留言 · 已指派 1 人 ·
-
bug triage
難度 5/5 一週以上 新手友好度 20/100
microsoft/semantic-kernel-java#328 · 1 則留言 ·
-
Java: Remove SK planners可能已有人在做 @johnoliver 於 479 天前認領。 未關閉
microsoft/semantic-kernel-java#323 · 1 個 reaction · 已指派 2 人 ·
查看 microsoft/semantic-kernel-java 的全部 Issue
相似的 Issue
-
component/operate kind/feature-request
難度 2/5 1-3 小時 新手友好度 85/100
維護者通常 1 天內回覆
-
Forge coverage prompts carry text the agent cannot act on可能已有人在做 @graalvmbot 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 85/100
oracle/graalvm-reachability-metadata#10572 ·
維護者通常 1 天內回覆
-
[CI] Core CI doesn't run for changes to amoro-format-lance (and amoro-web)可能已有人在做 @MarkAlex1234 今天認領。 未關閉
難度 1/5 1 小時以內 新手友好度 88/100
維護者通常 2 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
-
area/docs
難度 1/5 1 小時以內 新手友好度 88/100
維護者通常 1 天內回覆