Riferimento API TypeScript
Crea un messaggio
client.messages.create(params, options?): Message | Stream<RawMessageStreamEvent>Invia un elenco strutturato di messaggi di input con contenuto testuale e/o immagini, e il modello genererà il messaggio successivo nella conversazione.
Conta i token in un messaggio
client.messages.countTokens(params, options?): MessageTokensCountConta il numero di token in un messaggio.
Elenca i modelli
client.models.list(params?, options?): Page<ModelInfo>Elenca i modelli disponibili.
Ottieni un modello
client.models.retrieve(modelID, params?, options?): ModelInfoOttieni un modello specifico.
Scarica file
client.files.download(fileID, params?, options?): ResponseOttieni metadati del file
client.files.retrieveMetadata(fileID, params?, options?): FileMetadataElimina skill
client.skills.delete(skillID, params?, options?): DeletedSkillProfili utente
Register the end customers that your platform serves, so each request can name who it's for. To get started, see the User profiles guide.
Crea profilo utente
client.userProfiles.create(params, options?): UserProfileRegister one of your end customers and get the ID to send on the requests you make for them.
Elenca profili utente
client.userProfiles.list(params?, options?): PageCursor<UserProfile>List the user profiles in your organization, newest first by default.
Ottieni profilo utente
client.userProfiles.retrieve(userProfileID, params?, options?): UserProfileGet a user profile by ID to check the details stored for it.
Aggiorna profilo utente
client.userProfiles.update(userProfileID, params, options?): UserProfileChange the details of a user profile, leaving the fields that you don't send as they are.
Elimina profilo utente
client.userProfiles.delete(userProfileID, params?, options?): DeletedUserProfileDelete a user profile, for example when the end customer closes their account.
Ottieni l'organizzazione corrente
client.organization.retrieve(options?): OrganizationInfoRecupera le informazioni sull'organizzazione associata alla chiave API autenticata.