Title: Make ChatHistory thread safe by dsgrieve · Pull Request #162 · microsoft/semantic-kernel-java · GitHub
Open Graph Title: Make ChatHistory thread safe by dsgrieve · Pull Request #162 · microsoft/semantic-kernel-java
X Title: Make ChatHistory thread safe by dsgrieve · Pull Request #162 · microsoft/semantic-kernel-java
Description: Motivation and Context With Agents API, ChatHistory might be modified by multiple agents running in their own threads. Description Used java.util.concurrent.ConcurrentLinkedQueue in place of ArrayList. One consequence of this is that messages from one agent could be interspresed with messages from other agents in the chat history. I don't think this should be a problem. Note that one of the APIs in the agents space is an async receive (AgentChannel#receiveAsync) that will update the ChatHistory. Depending on the implementation of the Agent that uses this AgentChannel API, the messages could be received in bulk or streamed, so it seems the concurrent approach fits the use-case. The alternative is to use a Collections.synchronizeList(). Contribution Checklist The code builds clean without any errors or warnings The PR follows the SK Contribution Guidelines and the pre-submission formatting script raises no violations All unit tests pass, and I have added new tests where possible I didn't break anyone 😄
Open Graph Description: Motivation and Context With Agents API, ChatHistory might be modified by multiple agents running in their own threads. Description Used java.util.concurrent.ConcurrentLinkedQueue in place of Arra...
X Description: Motivation and Context With Agents API, ChatHistory might be modified by multiple agents running in their own threads. Description Used java.util.concurrent.ConcurrentLinkedQueue in place of Arra...
Opengraph URL: https://github.com/microsoft/semantic-kernel-java/pull/162
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:159a511b-c129-c401-9361-f2a7f7ab35fc |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | DAE0:6DCFF:27AF16F:3918529:6A4D22BF |
| html-safe-nonce | 23b9d33d2cbe2aa52eed9e8bef0c0d33bb0bd65272c215a4a5d6824374267a89 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQUUwOjZEQ0ZGOjI3QUYxNkY6MzkxODUyOTo2QTREMjJCRiIsInZpc2l0b3JfaWQiOiI3NjkwODI1NzE0ODM3MDM3NzU5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 7a71011407d083f70f393d9ac0e980d21ea0fbef6e927715108792151c35d822 |
| hovercard-subject-tag | pull_request:2006812809 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/microsoft/semantic-kernel-java/pull/162/files |
| twitter:image | https://avatars.githubusercontent.com/u/4412658?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/4412658?s=400&v=4 |
| og:image:alt | Motivation and Context With Agents API, ChatHistory might be modified by multiple agents running in their own threads. Description Used java.util.concurrent.ConcurrentLinkedQueue in place of Arra... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 92571a8944142227b7e19cd10918b1ddd06e5066c1ad5bc7e4769cf6140a87e6 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 93f17a978ee60bc4668e1d7b90e6bd2d622261fd |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width