Skip to content

Added support for asynchronous processing for chat - #39

Merged
m-messer merged 4 commits into
mainfrom
36-chat-callback
Sep 29, 2026
Merged

m-messer merged 4 commits into
mainfrom
36-chat-callback

Conversation

@m-messer

Copy link
Copy Markdown
Contributor

Summary

Added a callBackUrl option for chat, aligning with the current EvaluateRequest design.
The callback could be used for returning intermediate reasoning steps to the the user.

Related issue

#36

Scope

  • This pull request is focused on a single concern.
  • The change was started from the latest main branch, or from a fork if direct branch creation is not available.

Validation

  • npm run lint
  • npm run bundle

@neagualexa neagualexa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I am a bit confused, so is the callback url called first for resolving immediate steps before the main service provides the final response? or you could access the intermediate reasoning steps by going to the callback url?
Should we not also adopt the response body to allow for return of immediate steps?

@m-messer

Copy link
Copy Markdown
Contributor Author

So from my understanding of how I have implemented the callback for evalute:

  1. LF calls the microservice with callback URL
  2. Microservice sends feedback to that callback URL
  3. Microservice finishes, and return value and/or the microserivce sends the final response

@maximiliansoelch maximiliansoelch left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just two minor suggestions so this better fits for chat.
But as this is only an example and the description, the PR can also be merged like this.

Comment thread paths/chat/schemas/ChatRequest.yml Outdated
Comment thread paths/chat/chat.yml Outdated
@maximiliansoelch

Copy link
Copy Markdown
Contributor

@neagualexa Regarding your question:
A callbackUrl is normally called once at the end of processing with the final result. For longer-running tasks, this allows the service requesting feedback or chat results to immediately close the initial request and continue with other tasks.

Regarding your intermediate steps, e.g., returning reasoning to the caller, etc.: This would be part of the normal response. Alternatively, you could think about if it is required to open an additional streaming channel/connection after the normal request.

Co-authored-by: Maximilian Sölch <maximiliansoelch@users.noreply.github.com>
m-messer and others added 2 commits September 29, 2026 09:24
Co-authored-by: Maximilian Sölch <maximiliansoelch@users.noreply.github.com>
# Conflicts:
#	paths/chat/schemas/ChatRequest.yml
@m-messer
m-messer merged commit 9d0d317 into main Sep 29, 2026
2 checks passed
@m-messer
m-messer deleted the 36-chat-callback branch September 29, 2026 08:27
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.

3 participants