Skip to content

Make ChatClient and Advisor APIs more robust - Part 1 #2656

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

ThomasVitale
Copy link
Contributor

  • Introduce “ChatClientRequest” and “ChatClientResponse” for propagating requests/responses in a ChatClient advisor chain.
  • Structure a Prompt at the beginning of the chain, to ensure a consistent view across execution chain and observations. Any template is rendered at the beginning so that every advisor doesn’t have to do it again.
  • Improve observations to include the complete view of the prompt messages, instead of only considering userText and systemText.
  • Remove legacy “around” advisor type concept.
  • Keep backward compatibility for AdvisedRequest, AdvisedResponse, and legacy Advisor APIs.

Relates to gh-2655

@ThomasVitale ThomasVitale marked this pull request as draft April 6, 2025 20:58
@ThomasVitale ThomasVitale force-pushed the gh-2655 branch 2 times, most recently from 2be1641 to 5f6827e Compare April 15, 2025 06:07
@ThomasVitale ThomasVitale marked this pull request as ready for review April 15, 2025 06:07
@tzolov tzolov self-assigned this Apr 15, 2025
@tzolov tzolov added this to the 1.0.0-RC1 milestone Apr 15, 2025
@ThomasVitale ThomasVitale force-pushed the gh-2655 branch 2 times, most recently from 1547c4c to 8e5852a Compare April 15, 2025 18:14
- Introduce “ChatClientRequest” and “ChatClientResponse” for propagating requests/responses in a ChatClient advisor chain.
- Structure a Prompt at the beginning of the chain, to ensure a consistent view across execution chain and observations. Any template is rendered at the beginning so that every advisor doesn’t have to do it again.
- Improve observations to include the complete view of the prompt messages, instead of only considering userText and systemText.
- Remove legacy “around” advisor type concept.
- Keep backward compatibility for AdvisedRequest, AdvisedResponse, and legacy Advisor APIs.

Relates to spring-projectsgh-2655

Signed-off-by: Thomas Vitale <[email protected]>
@tzolov
Copy link
Contributor

tzolov commented Apr 17, 2025

Great contribution @ThomasVitale . Thank you

@tzolov
Copy link
Contributor

tzolov commented Apr 17, 2025

Rebased, minor test fixes and merged at 1f59cca

@tzolov tzolov closed this Apr 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants