mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-05-13 16:24:35 +00:00
Simplified extract_images query value logic
This commit is contained in:
parent
7afb308e5c
commit
da50d69210
@ -8,8 +8,7 @@ public sealed partial class RustService
|
|||||||
public async Task<string> ReadArbitraryFileData(string path, int maxChunks, bool extractImages = false)
|
public async Task<string> ReadArbitraryFileData(string path, int maxChunks, bool extractImages = false)
|
||||||
{
|
{
|
||||||
var streamId = Guid.NewGuid().ToString();
|
var streamId = Guid.NewGuid().ToString();
|
||||||
var extractImagesQueryValue = extractImages ? "true" : "false";
|
var requestUri = $"/retrieval/fs/extract?path={Uri.EscapeDataString(path)}&stream_id={streamId}&extract_images={extractImages}";
|
||||||
var requestUri = $"/retrieval/fs/extract?path={Uri.EscapeDataString(path)}&stream_id={streamId}&extract_images={extractImagesQueryValue}";
|
|
||||||
var request = new HttpRequestMessage(HttpMethod.Get, requestUri);
|
var request = new HttpRequestMessage(HttpMethod.Get, requestUri);
|
||||||
var response = await this.http.SendAsync(request, HttpCompletionOption.ResponseHeadersRead);
|
var response = await this.http.SendAsync(request, HttpCompletionOption.ResponseHeadersRead);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user