mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-18 08:58:00 +00:00
Added tool calling support (#731)
Co-authored-by: krut_ni <nils.kruthoff@dlr.de> Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
266 files changed
+11186
-740
No files matched your search
@@ -13,26 +13,4 @@ public enum LuaResponseParseError
|
||||
INCOMPLETE_ASSISTANT_METADATA,
|
||||
MISSING_LUA,
|
||||
LUA_MISSING_ID,
|
||||
}
|
||||
|
||||
public static class LuaResponseParseErrorExtension
|
||||
{
|
||||
private static string TB(string fallbackEN) => Tools.PluginSystem.I18N.I.T(fallbackEN, typeof(LuaResponseParseErrorExtension).Namespace, nameof(LuaResponseParseErrorExtension));
|
||||
|
||||
public static string GetMessage(this LuaResponseParseError parseError, string technicalDetails) => parseError switch
|
||||
{
|
||||
LuaResponseParseError.MISSING_JSON_OBJECT => TB("The model response is missing or unreadable."),
|
||||
LuaResponseParseError.INVALID_JSON => string.IsNullOrWhiteSpace(technicalDetails)
|
||||
? TB("The model returned an invalid response.")
|
||||
: string.Format(TB("The model returned an invalid response: {0}"), technicalDetails),
|
||||
LuaResponseParseError.EMPTY_JSON_OBJECT => TB("The model returned an empty JSON object."),
|
||||
LuaResponseParseError.UNSUPPORTED_SCHEMA_VERSION => TB("The model responded with an unsupported or deprecated JSON schema."),
|
||||
LuaResponseParseError.MISSING_PLUGIN_METADATA => TB("The model's answer is missing the plugin metadata."),
|
||||
LuaResponseParseError.MISSING_ASSISTANT_METADATA => TB("The model's answer is missing the assistant metadata."),
|
||||
LuaResponseParseError.INCOMPLETE_PLUGIN_METADATA => TB("The model's answer contains incomplete plugin metadata."),
|
||||
LuaResponseParseError.INCOMPLETE_ASSISTANT_METADATA => TB("The model's answer contains incomplete assistant metadata."),
|
||||
LuaResponseParseError.MISSING_LUA => TB("The model response does not contain the generated Lua plugin code."),
|
||||
LuaResponseParseError.LUA_MISSING_ID => TB("The generated Lua plugin code does not contain a readable plugin ID."),
|
||||
_ => TB("The model returned an unusable JSON response."),
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user