Class ModelService
Inheritance
CrudService<AnthropicClient, AnthropicModelRequest, AnthropicModelInfo, DeletionStatus, CursorQuery>
ModelService
Implements
Inherited Members
Namespace: Glitch9.AIDevKit.Anthropic.Services
Assembly: Glitch9.AIDevKit.Provider.Anthropic.dll
Syntax
public class ModelService : CrudService<AnthropicClient, AnthropicModelRequest, AnthropicModelInfo, DeletionStatus, CursorQuery>, ICrudService
Constructors
| Edit this page View SourceModelService(AnthropicClient)
Declaration
public ModelService(AnthropicClient client)
Parameters
| Type | Name | Description |
|---|---|---|
| AnthropicClient | client |
Methods
| Edit this page View SourceCreateAsync(AnthropicModelRequest, RequestOptions)
POST. Creates a new resource on the server using the specified request body.
Declaration
public override UniTask<AnthropicModelInfo> CreateAsync(AnthropicModelRequest request, RequestOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| AnthropicModelRequest | request | |
| RequestOptions | options | Optional request options. |
Returns
| Type | Description |
|---|---|
| UniTask<AnthropicModelInfo> | The created resource. |
Overrides
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | Thrown if AnthropicModelRequest is set to object. |
DeleteAsync(string, RequestOptions)
DELETE. Deletes a resource and returns deletion status.
Declaration
public override UniTask<DeletionStatus> DeleteAsync(string id, RequestOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | id | |
| RequestOptions | options |
Returns
| Type | Description |
|---|---|
| UniTask<DeletionStatus> | Deletion status implementing IDeletionStatus. |
Overrides
| Edit this page View SourceReplaceAsync(string, AnthropicModelRequest, RequestOptions)
POST. Updates an existing resource on the server using the specified identifier and request body.
Declaration
public override UniTask<AnthropicModelInfo> ReplaceAsync(string id, AnthropicModelRequest request, RequestOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | id | The identifier of the resource to update. |
| AnthropicModelRequest | request | |
| RequestOptions | options | Optional request options. |
Returns
| Type | Description |
|---|---|
| UniTask<AnthropicModelInfo> | The updated resource. |
Overrides
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | Thrown if AnthropicModelRequest is set to object. |