mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-04 16:07:21 +00:00
Generated the JSON contracts of providers, the runtime, and services at compile time (#1150)
This commit is contained in:
1 parent
e954881fda
commit
24e3c22db3
140 files changed
+1415
-292
No files matched your search
@@ -0,0 +1,6 @@
|
||||
namespace AIStudio.Tools.Rust;
|
||||
|
||||
/// <summary>Request body used to count the tokens of a text in the Rust runtime.</summary>
|
||||
/// <param name="Text">The text to count.</param>
|
||||
/// <param name="TokenizerPath">Path of the tokenizer file to count with.</param>
|
||||
public sealed record CountTokensRequest(string Text, string TokenizerPath);
|
||||
@@ -0,0 +1,5 @@
|
||||
namespace AIStudio.Tools.Rust;
|
||||
|
||||
/// <summary>Request body used to delete the stored tokenizer of a model in the Rust runtime.</summary>
|
||||
/// <param name="ModelId">The model whose tokenizer gets deleted.</param>
|
||||
public sealed record DeleteTokenizerRequest(string ModelId);
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace AIStudio.Tools.Rust;
|
||||
|
||||
/// <summary>Request body used to prepare a local image for a model in the Rust runtime.</summary>
|
||||
/// <param name="Path">Absolute path of the image.</param>
|
||||
/// <param name="MaxBytes">The size the prepared image may have at most.</param>
|
||||
public sealed record PrepareImageForModelRequest(string Path, long MaxBytes);
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace AIStudio.Tools.Rust;
|
||||
|
||||
/// <summary>Request body used to check and optionally optimize a local image in the Rust runtime.</summary>
|
||||
/// <param name="Path">Absolute path of the image.</param>
|
||||
/// <param name="Optimize">Whether the maximum-edge policy and re-encoding are applied.</param>
|
||||
public sealed record PrepareImageRequest(string Path, bool Optimize);
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace AIStudio.Tools.Rust;
|
||||
|
||||
/// <summary>Request body used to store a copy of a tokenizer file for a model in the Rust runtime.</summary>
|
||||
/// <param name="ModelId">The model the tokenizer belongs to.</param>
|
||||
/// <param name="FilePath">Absolute path of the tokenizer file.</param>
|
||||
public sealed record StoreTokenizerRequest(string ModelId, string FilePath);
|
||||
@@ -0,0 +1,5 @@
|
||||
namespace AIStudio.Tools.Rust;
|
||||
|
||||
/// <summary>Request body used to check a tokenizer file in the Rust runtime.</summary>
|
||||
/// <param name="FilePath">Absolute path of the tokenizer file.</param>
|
||||
public sealed record ValidateTokenizerRequest(string FilePath);
|
||||
Reference in new issue
Block a user