Title: Bug: Set ToolCallBehavior.allowAllKernelFunctions(false) doesn't work for getStreamingChatMessageContentsAsync · Issue #279 · microsoft/semantic-kernel-java · GitHub
Open Graph Title: Bug: Set ToolCallBehavior.allowAllKernelFunctions(false) doesn't work for getStreamingChatMessageContentsAsync · Issue #279 · microsoft/semantic-kernel-java
X Title: Bug: Set ToolCallBehavior.allowAllKernelFunctions(false) doesn't work for getStreamingChatMessageContentsAsync · Issue #279 · microsoft/semantic-kernel-java
Description: Describe the bug I try to invoke toolcall myself in a streaming chat. I have learned that how to invoke a toolcall in an non-streaming chat. like Kernel kernel = Kernel.builder().withAIService(ChatCompletionService.class, chatCompletionS...
Open Graph Description: Describe the bug I try to invoke toolcall myself in a streaming chat. I have learned that how to invoke a toolcall in an non-streaming chat. like Kernel kernel = Kernel.builder().withAIService(Chat...
X Description: Describe the bug I try to invoke toolcall myself in a streaming chat. I have learned that how to invoke a toolcall in an non-streaming chat. like Kernel kernel = Kernel.builder().withAIService(Chat...
Opengraph URL: https://github.com/microsoft/semantic-kernel-java/issues/279
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Bug: Set ToolCallBehavior.allowAllKernelFunctions(false) doesn't work for getStreamingChatMessageContentsAsync","articleBody":"**Describe the bug**\nI try to invoke toolcall myself in a streaming chat.\nI have learned that how to invoke a toolcall in an non-streaming chat. like \n``` java\n Kernel kernel = Kernel.builder().withAIService(ChatCompletionService.class, chatCompletionService)\n .withPlugin(KernelPluginFactory.createFromObject(this, \"time\"))\n .build();\n\n chatCompletionService\n .getChatMessageContentsAsync(\"what time is it now?\", kernel, InvocationContext.builder()\n .withToolCallBehavior(ToolCallBehavior.allowAllKernelFunctions(false))\n .build())\n .block()\n .stream().filter(it-\u003eit instanceof OpenAIChatMessageContent\u003c?\u003e)\n .map(it-\u003e((OpenAIChatMessageContent)it))\n .forEach(it-\u003e{\n System.out.println(it.getToolCall().size());\n });\n```\n\n\nAs you can see, I can get the toolCall value;\n\n\nbut when I change to an streaming chat, like \n``` java\n Kernel kernel = Kernel.builder().withAIService(ChatCompletionService.class, chatCompletionService)\n .withPlugin(KernelPluginFactory.createFromObject(this, \"time\"))\n .build();\n\n chatCompletionService\n .getStreamingChatMessageContentsAsync(\"what time is it now?\", kernel, InvocationContext.builder()\n .withToolCallBehavior(ToolCallBehavior.allowAllKernelFunctions(false))\n .build())\n .filter(it-\u003eit instanceof OpenAIStreamingChatMessageContent\u003c?\u003e)\n .map(it-\u003e(OpenAIStreamingChatMessageContent)it)\n .doOnNext(it-\u003e{\n System.out.println(it.getToolCall().size());\n }).subscribe();\n```\n\nthe toolCall will always be an empty array.\n","author":{"url":"https://github.com/thomaspeng90s","@type":"Person","name":"thomaspeng90s"},"datePublished":"2024-12-09T08:09:49.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/279/semantic-kernel-java/issues/279"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6da8f56e-83a9-3ae2-cbf2-0cd6dd7a6b94 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 95B2:36F6BD:104CF4:17C1F7:6A4D0508 |
| html-safe-nonce | 7c833ec22aecafa50b14072b93752077afb6a22e7926f6efe684bd005401ba54 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NUIyOjM2RjZCRDoxMDRDRjQ6MTdDMUY3OjZBNEQwNTA4IiwidmlzaXRvcl9pZCI6IjY5ODAzNjIxODQ3NjE4Njk1NzYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 3675786b38ce4ae61c1846d04b59e168b257350362f33d241ba63709636cecf6 |
| hovercard-subject-tag | issue:2726308808 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/semantic-kernel-java/279/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9411e102275ecb35c17bca6012ee5c90151c9dcbf2b548e410dddf2a4d74641f/microsoft/semantic-kernel-java/issues/279 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9411e102275ecb35c17bca6012ee5c90151c9dcbf2b548e410dddf2a4d74641f/microsoft/semantic-kernel-java/issues/279 |
| og:image:alt | Describe the bug I try to invoke toolcall myself in a streaming chat. I have learned that how to invoke a toolcall in an non-streaming chat. like Kernel kernel = Kernel.builder().withAIService(Chat... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | thomaspeng90s |
| hostname | github.com |
| expected-hostname | github.com |
| None | 31e4db13a9e20081f2fac78f441659a6576e582bbb15e153f9c7fb6473aa29f5 |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/semantic-kernel-java git https://github.com/microsoft/semantic-kernel-java.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 814249293 |
| octolytics-dimension-repository_nwo | microsoft/semantic-kernel-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 814249293 |
| octolytics-dimension-repository_network_root_nwo | microsoft/semantic-kernel-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | fb70bd3c4b2bec429781b65419e912c66e2d5581 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width