Skip to content

Added Conversation API to JS SDK #712

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

Open
wants to merge 2 commits into
base: release-1.16
Choose a base branch
from

Conversation

ConstantinChirila
Copy link

Description

This PR adds comprehensive support for the Dapr Conversation API to the JavaScript SDK, enabling developers to interact with Large Language Models (LLMs) through Dapr's conversation components. The implementation includes both HTTP and gRPC protocols, complete type definitions, and a working example.

Issue reference

#706

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation

@ConstantinChirila ConstantinChirila requested review from a team as code owners August 7, 2025 12:28
Copy link

codecov bot commented Aug 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (release-1.16@26b3527). Learn more about missing BASE report.

Additional details and impacted files
@@               Coverage Diff                @@
##             release-1.16      #712   +/-   ##
================================================
  Coverage                ?   100.00%           
================================================
  Files                   ?         1           
  Lines                   ?         6           
  Branches                ?         1           
================================================
  Hits                    ?         6           
  Misses                  ?         0           
  Partials                ?         0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ConstantinChirila ConstantinChirila force-pushed the add-conversation-sdk-api-706 branch 2 times, most recently from ecdd7a2 to 9e321f0 Compare August 8, 2025 11:08
Signed-off-by: Constantin Chirila <[email protected]>
Signed-off-by: Constantin Chirila <[email protected]>
@ConstantinChirila ConstantinChirila force-pushed the add-conversation-sdk-api-706 branch from 9e321f0 to 33ece85 Compare August 8, 2025 11:10
Copy link
Contributor

@WhitWaldo WhitWaldo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great - thank you for putting all of this together. I just updated the protos to 1.16 on the repo in master. Could you update your PR to ensure all the test pass so we can merge this in for the release?

Thank you!

inputs,
...(options ?? {}),
};
const result = await this.client.executeWithApiVersion("v1.0-alpha2", `/conversation/${name}/converse`, {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this right? Did it bump to v1.0-alpha2?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@WhitWaldo Yes, I've added this to the quickstarts as well. This is the new API for the conversation. There is no longer streaming, it just has tooling right now.

Ill have a look at the tests and fix them as soon as I can. Thank you for the review!

@WhitWaldo
Copy link
Contributor

One more thought - I don't think we need both an HTTP and a gRPC implementation as the SDK need only do one of them (typically preferring gRPC as it's typically the more complicated one).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants