mirror of
https://github.com/marcominerva/SqlDatabaseVectorSearch.git
synced 2026-06-20 12:23:10 +00:00
Simplify /api/ask-streaming response and update README
The response format for the `/api/ask-streaming` endpoint has been simplified by removing multiple individual elements that contained parts of the answer. The README.md file was updated to correct the terminology from "tag" to "property" for the *streamState* attribute.
This commit is contained in:
@@ -109,55 +109,6 @@ When using the `/api/ask-streaming` endpoint, answers will be streamed as happen
|
||||
"streamState": "Append",
|
||||
"tokenUsage": null
|
||||
},
|
||||
{
|
||||
"originalQuestion": null,
|
||||
"reformulatedQuestion": null,
|
||||
"answer": " because",
|
||||
"streamState": "Append",
|
||||
"tokenUsage": null
|
||||
},
|
||||
{
|
||||
"originalQuestion": null,
|
||||
"reformulatedQuestion": null,
|
||||
"answer": " of",
|
||||
"streamState": "Append",
|
||||
"tokenUsage": null
|
||||
},
|
||||
{
|
||||
"originalQuestion": null,
|
||||
"reformulatedQuestion": null,
|
||||
"answer": " its",
|
||||
"streamState": "Append",
|
||||
"tokenUsage": null
|
||||
},
|
||||
{
|
||||
"originalQuestion": null,
|
||||
"reformulatedQuestion": null,
|
||||
"answer": " characteristic",
|
||||
"streamState": "Append",
|
||||
"tokenUsage": null
|
||||
},
|
||||
{
|
||||
"originalQuestion": null,
|
||||
"reformulatedQuestion": null,
|
||||
"answer": " red",
|
||||
"streamState": "Append",
|
||||
"tokenUsage": null
|
||||
},
|
||||
{
|
||||
"originalQuestion": null,
|
||||
"reformulatedQuestion": null,
|
||||
"answer": " color",
|
||||
"streamState": "Append",
|
||||
"tokenUsage": null
|
||||
},
|
||||
{
|
||||
"originalQuestion": null,
|
||||
"reformulatedQuestion": null,
|
||||
"answer": ",",
|
||||
"streamState": "Append",
|
||||
"tokenUsage": null
|
||||
},
|
||||
//...
|
||||
{
|
||||
"originalQuestion": null,
|
||||
@@ -185,7 +136,7 @@ When using the `/api/ask-streaming` endpoint, answers will be streamed as happen
|
||||
```
|
||||
|
||||
- The first piece of the response has the following characteristics:
|
||||
- the *streamState* tag is set to `Start`,
|
||||
- the *streamState* property is set to `Start`,
|
||||
- it contains the question and its reformulation (if not requested, *reformulatedQuestion* will be equals to *originalQuestion*)
|
||||
- the *tokenUsage* section holds information about token used for reformulation (if done) and for the embedding of the question
|
||||
- Then, there are as many elements for the actual answer as necessary:
|
||||
|
||||
Reference in New Issue
Block a user