feat: inference api support return with resolved message #2913
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please be noted that most code are generated by LLM, I do review them and reject some unexpected edits.
Related to #2896
Important
Add support for returning resolved messages in inference API to maintain context in multi-turn conversations.
include_resolved_messages
flag toParams
ininference.rs
to include resolved messages in the response.inference()
ininference.rs
to extract resolved messages ifinclude_resolved_messages
is true.InferenceResponse::new()
ininference.rs
now acceptsresolved_messages
.inference_response_with_resolved_messages
andinclude_resolved_messages_integration
ininference.rs
.include_resolved_messages
set to false inopenai_compatible.rs
as OpenAI endpoint does not support it.client_inference_params.rs
andbatch_inference.rs
to handleinclude_resolved_messages
flag, defaulting to false.This description was created by
for 7f91b09. You can customize this summary. It will automatically update as commits are pushed.