mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-04 21:07:21 +00:00
Fixed media transcripts reaching the AI without the prompt injection filter (#1083)
This commit is contained in:
1 parent
8e3660a74a
commit
34d88f723c
14 files changed
+423
-63
No files matched your search
@@ -62,6 +62,22 @@ public sealed partial class RustService : BackgroundService
|
||||
this.extractionHttp = CreateHttpClient(apiPort, certificateFingerprint, Timeout.InfiniteTimeSpan);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Talks to a runtime which a test plays itself.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Only for tests. The runtime filters prompt injections out of every file and text, so without
|
||||
/// it no test could check which file the app asks for, or what it does with the answer.
|
||||
/// </remarks>
|
||||
/// <param name="runtime">Answers every request in place of the runtime.</param>
|
||||
internal RustService(HttpMessageHandler runtime)
|
||||
{
|
||||
this.apiPort = string.Empty;
|
||||
this.certificateFingerprint = string.Empty;
|
||||
this.http = new HttpClient(runtime, disposeHandler: false) { BaseAddress = new Uri("https://127.0.0.1"), Timeout = TimeSpan.FromSeconds(100) };
|
||||
this.extractionHttp = new HttpClient(runtime, disposeHandler: false) { BaseAddress = new Uri("https://127.0.0.1"), Timeout = Timeout.InfiniteTimeSpan };
|
||||
}
|
||||
|
||||
private static HttpClient CreateHttpClient(string apiPort, string certificateFingerprint, TimeSpan timeout)
|
||||
{
|
||||
var certificateValidationHandler = new HttpClientHandler
|
||||
|
||||
Reference in new issue
Block a user