René's URL Explorer Experiment


Title: Bug: An assistant message with 'tool_calls' must be followed by tool messages responding to each 'tool_call_id' · Issue #256 · microsoft/semantic-kernel-java · GitHub

Open Graph Title: Bug: An assistant message with 'tool_calls' must be followed by tool messages responding to each 'tool_call_id' · Issue #256 · microsoft/semantic-kernel-java

X Title: Bug: An assistant message with 'tool_calls' must be followed by tool messages responding to each 'tool_call_id' · Issue #256 · microsoft/semantic-kernel-java

Description: Describe the bug Got the following error using Semantic Kernel in Java with automatic function calling using 4o* OpenAI models: "An assistant message with 'tool_calls' must be followed by tool messages responding to each 'tool_call_id'"....

Open Graph Description: Describe the bug Got the following error using Semantic Kernel in Java with automatic function calling using 4o* OpenAI models: "An assistant message with 'tool_calls' must be followed by tool mess...

X Description: Describe the bug Got the following error using Semantic Kernel in Java with automatic function calling using 4o* OpenAI models: "An assistant message with 'tool_calls' must be followed...

Opengraph URL: https://github.com/microsoft/semantic-kernel-java/issues/256

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Bug: An assistant message with 'tool_calls' must be followed by tool messages responding to each 'tool_call_id'","articleBody":"**Describe the bug**\nGot the following error using Semantic Kernel in Java with automatic function calling using 4o* OpenAI models: \"An assistant message with 'tool_calls' must be followed by tool messages responding to each 'tool_call_id'\".\n\n**To Reproduce**\nSteps to reproduce the behavior:\n1. Unzip provided [example](https://github.com/user-attachments/files/17533386/lights-example.zip), build it and execute it:\n```bash\nmvn clean install\nexport OPENAI_API_KEY=sk-...\njava -jar target/lights-example-1.0-SNAPSHOT.jar\n```\n2. Enter two consecute inputs: \"get the lights\" and \"turn them on\"\n3. See error\n\n```\nSLF4J(W): No SLF4J providers were found.\nSLF4J(W): Defaulting to no-operation (NOP) logger implementation\nSLF4J(W): See https://www.slf4j.org/codes.html#noProviders for further details.\nUser \u003e get the lights\nGetting lights\nAssistant \u003e Here are the current states of the lights:\n\n1. **Table Lamp**: Off\n2. **Porch Light**: Off\n3. **Chandelier**: On\nUser \u003e turn them on\nException in thread \"main\" com.azure.core.exception.HttpResponseException: Status code 400, \"{\n  \"error\": {\n    \"message\": \"An assistant message with 'tool_calls' must be followed by tool messages responding to each 'tool_call_id'. The following tool_call_ids did not have response messages: call_Mor7WOBzlb1Ao9ryIczup9mS, call_ejzgT6RAATaWBqmJbrzbzAMP\",\n    \"type\": \"invalid_request_error\",\n    \"param\": \"messages\",\n    \"code\": null\n  }\n}\"\n\tat com.azure.core.implementation.http.rest.RestProxyBase.instantiateUnexpectedException(RestProxyBase.java:388)\n\tat com.azure.core.implementation.http.rest.AsyncRestProxy.lambda$ensureExpectedStatus$1(AsyncRestProxy.java:135)\n\tat reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:113)\n\tat reactor.core.publisher.MonoUsing$MonoUsingSubscriber.onNext(MonoUsing.java:231)\n\tat reactor.core.publisher.FluxHandle$HandleSubscriber.onNext(FluxHandle.java:126)\n\tat reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:224)\n\tat reactor.core.publisher.FluxDoFinally$DoFinallySubscriber.onNext(FluxDoFinally.java:113)\n\tat reactor.core.publisher.FluxHandleFuseable$HandleFuseableSubscriber.onNext(FluxHandleFuseable.java:191)\n\tat reactor.core.publisher.FluxContextWrite$ContextWriteSubscriber.onNext(FluxContextWrite.java:107)\n\tat reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1839)\n\tat reactor.core.publisher.MonoCollectList$MonoCollectListSubscriber.onComplete(MonoCollectList.java:129)\n\tat reactor.core.publisher.FluxPeek$PeekSubscriber.onComplete(FluxPeek.java:260)\n\tat reactor.core.publisher.FluxMap$MapSubscriber.onComplete(FluxMap.java:144)\n\tat reactor.netty.channel.FluxReceive.onInboundComplete(FluxReceive.java:415)\n\tat reactor.netty.channel.ChannelOperations.onInboundComplete(ChannelOperations.java:439)\n\tat reactor.netty.channel.ChannelOperations.terminate(ChannelOperations.java:493)\n\tat reactor.netty.http.client.HttpClientOperations.onInboundNext(HttpClientOperations.java:789)\n\tat reactor.netty.channel.ChannelOperationsHandler.channelRead(ChannelOperationsHandler.java:114)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)\n\tat io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)\n\tat com.azure.core.http.netty.implementation.AzureSdkHandler.channelRead(AzureSdkHandler.java:224)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)\n\tat io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)\n\tat io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436)\n\tat io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346)\n\tat io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318)\n\tat io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)\n\tat io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)\n\tat io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1475)\n\tat io.netty.handler.ssl.SslHandler.decodeNonJdkCompatible(SslHandler.java:1349)\n\tat io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1389)\n\tat io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:530)\n\tat io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:469)\n\tat io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)\n\tat io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)\n\tat io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1407)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)\n\tat io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:918)\n\tat io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)\n\tat io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788)\n\tat io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)\n\tat io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)\n\tat io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)\n\tat io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:994)\n\tat io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)\n\tat io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)\n\tat java.base/java.lang.Thread.run(Thread.java:1583)\n\tSuppressed: java.lang.Exception: #block terminated with an error\n\t\tat reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:100)\n\t\tat reactor.core.publisher.Mono.block(Mono.java:1742)\n\t\tat org.example.LightsExample.main(LightsExample.java:86)\n```\n\n**Expected behavior**\nThe lights should be turned on.\n\n**Platform**\n - OS: Mac M1\n - IDE: IntelliJ Idea or command line\n - Language: Java\n - Source: Maven repository, version 1.3.0\n\n**Additional context**\nThe problem seems to be reproduced with models 4o and 4o-mini, but not with \"gpt-3.5-turbo-0125\". Change constant `MODEL_ID` in class `LightsExample` to see the difference.[lights-example.zip](https://github.com/user-attachments/files/17546408/lights-example.zip)\n","author":{"url":"https://github.com/miladhub","@type":"Person","name":"miladhub"},"datePublished":"2024-10-28T17:11:35.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/256/semantic-kernel-java/issues/256"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:d851c384-d788-60a9-ad58-0940480669ad
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idDC62:35F156:B2F4C4:1031CCC:6A4CF289
html-safe-nonce2c1ce1786a1c355b3718835262279af8f8c20c668dfbc78c2febfc23a14a183f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQzYyOjM1RjE1NjpCMkY0QzQ6MTAzMUNDQzo2QTRDRjI4OSIsInZpc2l0b3JfaWQiOiI3MTc2MjkwMTM2MDE0Nzc5MDE3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacf7b65dbb5c4fa9299fd1d2a694aa31c0eecada9d92069082b9d666b5342c80c5
hovercard-subject-tagissue:2619018134
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/semantic-kernel-java/256/issue_layout
twitter:imagehttps://opengraph.githubassets.com/fb63b271e2bd1e75700088c03a34fb1018838a8299261cdb882a02b77933f21e/microsoft/semantic-kernel-java/issues/256
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/fb63b271e2bd1e75700088c03a34fb1018838a8299261cdb882a02b77933f21e/microsoft/semantic-kernel-java/issues/256
og:image:altDescribe the bug Got the following error using Semantic Kernel in Java with automatic function calling using 4o* OpenAI models: "An assistant message with 'tool_calls' must be followed by tool mess...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemiladhub
hostnamegithub.com
expected-hostnamegithub.com
None299b43bca6e02ad35197ffeba30d2466846d5fb02ab96fbced5b5e6cec589fb8
turbo-cache-controlno-preview
go-importgithub.com/microsoft/semantic-kernel-java git https://github.com/microsoft/semantic-kernel-java.git
octolytics-dimension-user_id6154722
octolytics-dimension-user_loginmicrosoft
octolytics-dimension-repository_id814249293
octolytics-dimension-repository_nwomicrosoft/semantic-kernel-java
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id814249293
octolytics-dimension-repository_network_root_nwomicrosoft/semantic-kernel-java
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseefec6750a5afcaeaf5dfcf629f404cf98c8371e3
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/microsoft/semantic-kernel-java/issues/256#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fsemantic-kernel-java%2Fissues%2F256
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fsemantic-kernel-java%2Fissues%2F256
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=microsoft%2Fsemantic-kernel-java
Reloadhttps://github.com/microsoft/semantic-kernel-java/issues/256
Reloadhttps://github.com/microsoft/semantic-kernel-java/issues/256
Reloadhttps://github.com/microsoft/semantic-kernel-java/issues/256
Please reload this pagehttps://github.com/microsoft/semantic-kernel-java/issues/256
microsoft https://github.com/microsoft
semantic-kernel-javahttps://github.com/microsoft/semantic-kernel-java
Notifications https://github.com/login?return_to=%2Fmicrosoft%2Fsemantic-kernel-java
Fork 55 https://github.com/login?return_to=%2Fmicrosoft%2Fsemantic-kernel-java
Star 270 https://github.com/login?return_to=%2Fmicrosoft%2Fsemantic-kernel-java
Code https://github.com/microsoft/semantic-kernel-java
Issues 48 https://github.com/microsoft/semantic-kernel-java/issues
Pull requests 5 https://github.com/microsoft/semantic-kernel-java/pulls
Actions https://github.com/microsoft/semantic-kernel-java/actions
Projects https://github.com/microsoft/semantic-kernel-java/projects
Models https://github.com/microsoft/semantic-kernel-java/models
Security and quality 0 https://github.com/microsoft/semantic-kernel-java/security
Insights https://github.com/microsoft/semantic-kernel-java/pulse
Code https://github.com/microsoft/semantic-kernel-java
Issues https://github.com/microsoft/semantic-kernel-java/issues
Pull requests https://github.com/microsoft/semantic-kernel-java/pulls
Actions https://github.com/microsoft/semantic-kernel-java/actions
Projects https://github.com/microsoft/semantic-kernel-java/projects
Models https://github.com/microsoft/semantic-kernel-java/models
Security and quality https://github.com/microsoft/semantic-kernel-java/security
Insights https://github.com/microsoft/semantic-kernel-java/pulse
Bug: An assistant message with 'tool_calls' must be followed by tool messages responding to each 'tool_call_id'https://github.com/microsoft/semantic-kernel-java/issues/256#top
bugSomething isn't workinghttps://github.com/microsoft/semantic-kernel-java/issues?q=state%3Aopen%20label%3A%22bug%22
triageNeeds triage from engineering teamhttps://github.com/microsoft/semantic-kernel-java/issues?q=state%3Aopen%20label%3A%22triage%22
https://github.com/miladhub
miladhubhttps://github.com/miladhub
on Oct 28, 2024https://github.com/microsoft/semantic-kernel-java/issues/256#issue-2619018134
examplehttps://github.com/user-attachments/files/17533386/lights-example.zip
lights-example.ziphttps://github.com/user-attachments/files/17546408/lights-example.zip
bugSomething isn't workinghttps://github.com/microsoft/semantic-kernel-java/issues?q=state%3Aopen%20label%3A%22bug%22
triageNeeds triage from engineering teamhttps://github.com/microsoft/semantic-kernel-java/issues?q=state%3Aopen%20label%3A%22triage%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.