Update Fine Tuned Model

Updates a fine-tuned model with new metadata.

PATCH /v1/models/{model}

Request Body

Les paramètres suivants peuvent être inclus dans le corps de la requête :

Paramètres

model
string
Required

The ID of the model to update.

metadata
map<string>

Set of key-value pairs that you can attach to a model.

Successful Response

Les champs suivants sont retournés dans une réponse réussie :

Champs de réponse

id
string
Required

The model identifier.

object
string
Required

The object type, which is always "model".

metadata
map<string>

Set of key-value pairs attached to the model.

Examples

Exemples de code pour utiliser cet endpoint :

typescript
import { AlphaEdge } from '@alphaedge/alphaedge';

const alphaedge = new AlphaEdge({
  apiKey: process.env.ALPHAEDGE_API_KEY,
});

const model = await alphaedge.models.update('ft-model-123', {
  metadata: { 'custom_key': 'custom_value' }
});
python
from alphaedge import AlphaEdge

alphaedge = AlphaEdge(api_key="your-api-key")

model = alphaedge.models.update('ft-model-123', metadata={'custom_key': 'custom_value'})
curl
curl -X PATCH https://api.alphaedge-ai.com/v1/models/ft-model-123 \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $ALPHAEDGE_API_KEY" \
  -d '{
    "metadata": {
      "custom_key": "custom_value"
    }
  }' 

Response

Exemple de réponse de l'API :

json
{
  "id": "ft-model-123",
  "object": "model",
  "metadata": {
    "custom_key": "custom_value"
  }
}