Class ApiPolicy
Assembly: Glitch9.AIDevKit.dll
Syntax
public static class ApiPolicy
Methods
|
Edit this page
View Source
GetAccessInfo(Api)
Declaration
public static ApiAccess GetAccessInfo(this Api api)
Parameters
| Type |
Name |
Description |
| Api |
api |
|
Returns
|
Edit this page
View Source
Declaration
public static ContentFormat GetDefaultOcrFormat(this Api api)
Parameters
| Type |
Name |
Description |
| Api |
api |
|
Returns
|
Edit this page
View Source
GetProviders(bool, ModelType?, ModelCapability[])
Declaration
public static IEnumerable<Api> GetProviders(bool checkApiKey = false, ModelType? modelType = null, ModelCapability[] capabilities = null)
Parameters
Returns
|
Edit this page
View Source
GetSupportedModelTypes(Api)
Declaration
public static ModelType GetSupportedModelTypes(this Api api)
Parameters
| Type |
Name |
Description |
| Api |
api |
|
Returns
|
Edit this page
View Source
HasApiKey(Api)
Declaration
public static bool HasApiKey(this Api api)
Parameters
| Type |
Name |
Description |
| Api |
api |
|
Returns
|
Edit this page
View Source
HasClient(Api)
Declaration
public static bool HasClient(this Api api)
Parameters
| Type |
Name |
Description |
| Api |
api |
|
Returns
|
Edit this page
View Source
IsAvailable(Api, bool)
Declaration
public static bool IsAvailable(this Api api, bool throwIfNone = false)
Parameters
| Type |
Name |
Description |
| Api |
api |
|
| bool |
throwIfNone |
|
Returns
|
Edit this page
View Source
IsEnabled(Api, bool)
Declaration
public static bool IsEnabled(this Api api, bool throwIfNone = false)
Parameters
| Type |
Name |
Description |
| Api |
api |
|
| bool |
throwIfNone |
|
Returns
|
Edit this page
View Source
IsImplemented(Api)
Declaration
public static bool IsImplemented(this Api api)
Parameters
| Type |
Name |
Description |
| Api |
api |
|
Returns
|
Edit this page
View Source
IsLocalOffline(Api)
Declaration
public static bool IsLocalOffline(this Api api)
Parameters
| Type |
Name |
Description |
| Api |
api |
|
Returns
|
Edit this page
View Source
RequiresApiKey(Api)
Declaration
public static bool RequiresApiKey(this Api api)
Parameters
| Type |
Name |
Description |
| Api |
api |
|
Returns
|
Edit this page
View Source
SafeGetApi(ref Api, string, RequestType)
Declaration
public static Api SafeGetApi(ref Api current, string modelId, RequestType endpointType)
Parameters
Returns
|
Edit this page
View Source
SupportsCapabilities(Api, IEnumerable<ModelCapability>)
Declaration
public static bool SupportsCapabilities(this Api api, IEnumerable<ModelCapability> capabilities)
Parameters
Returns
|
Edit this page
View Source
SupportsCapability(Api, ModelCapability)
Declaration
public static bool SupportsCapability(this Api api, ModelCapability capability)
Parameters
Returns
|
Edit this page
View Source
SupportsChatApiType(Api, ChatApi)
Declaration
public static bool SupportsChatApiType(this Api api, ChatApi chatApiType)
Parameters
Returns
|
Edit this page
View Source
SupportsCustomSeed(Api)
Declaration
public static bool SupportsCustomSeed(this Api api)
Parameters
| Type |
Name |
Description |
| Api |
api |
|
Returns
|
Edit this page
View Source
SupportsModelType(Api, ModelType)
Declaration
public static bool SupportsModelType(this Api api, ModelType modelType)
Parameters
Returns
|
Edit this page
View Source
SupportsResponsesApi(Api)
Declaration
public static bool SupportsResponsesApi(this Api api)
Parameters
| Type |
Name |
Description |
| Api |
api |
|
Returns
|
Edit this page
View Source
Declaration
public static bool SupportsToolType(this Api api, ToolType toolType)
Parameters
Returns
|
Edit this page
View Source
ThrowIfNone(Api)
Declaration
public static void ThrowIfNone(this Api api)
Parameters
| Type |
Name |
Description |
| Api |
api |
|
|
Edit this page
View Source
Declaration
public static bool TryGetToolTypeString(this Api api, ToolType toolType, out string toolName)
Parameters
Returns
|
Edit this page
View Source
Declaration
public static bool TryParseToolTypeString(this Api api, string toolTypeString, out ToolType toolType)
Parameters
Returns
|
Edit this page
View Source
ValidateApiKey(Api)
Declaration
public static void ValidateApiKey(this Api api)
Parameters
| Type |
Name |
Description |
| Api |
api |
|