trickroom / Docs
Sign in

SDK reference · Assistants and evaluation

client.models

client.models.{ register, list, test, rotateCredential, revoke }

Register an OpenAI-compatible endpoint as a model version, test it, and rotate its credential.

register

register(input: ModelVersion, key: string): Promise<Resource>

Registers a model version.

Parameters

keystring
An idempotency key. Retrying with the same key and input returns the first result instead of acting twice.

Returns Promise<Resource>

list

list(): Promise<Page>

The application's model versions.

Returns Promise<Page>

test

test(id: string, key: string): Promise<ModelConnectionTest>

Sends a few requests to check the endpoint works.

Parameters

keystring
An idempotency key. Retrying with the same key and input returns the first result instead of acting twice.

Returns Promise<ModelConnectionTest>

rotateCredential

rotateCredential(id: string, input: ModelCredential, key: string): Promise<Resource>

Replaces the endpoint's credential.

Parameters

keystring
An idempotency key. Retrying with the same key and input returns the first result instead of acting twice.

Returns Promise<Resource>

revoke

revoke(id: string, key: string): Promise<Resource>

Stops using a model version.

Parameters

keystring
An idempotency key. Retrying with the same key and input returns the first result instead of acting twice.

Returns Promise<Resource>