--- sidebar_position: 4 description: Delete assistant and other functions to work with OpenAI in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, OpenAI] --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; # Delete assistant Deletes a previously created assistant `Function DeleteAssistant(Val URL, Val Token, Val AssistantID, Val AdditionalHeaders = "") Export` | Parameter | CLI option | Type | Required | Description | |-|-|-|-|-| | URL | --url | String | ✔ | OpenAI server URL | | Token | --token | String | ✔ | OpenAI authorization token | | AssistantID | --id | String | ✔ | Assistant ID | | AdditionalHeaders | --headers | Map Of KeyAndValue | ✖ | Additional request headers, if necessary | Returns: Map Of KeyAndValue - Processing result
:::tip Method at API documentation: [Delete assistant](https://platform.openai.com/docs/api-reference/assistants/deleteAssistant) :::
```bsl title="1C:Enterprise/OneScript code example" URL = "https://hut.openintegrations.dev/localai/"; Token = "12We..."; AssistantID = "asst_14"; Result = OPI_OpenAI.DeleteAssistant(URL, Token, AssistantID); ``` ```bash oint openai DeleteAssistant \ --url "https://hut.openintegrations.dev/localai/" \ --token "***" \ --id "asst_37" ``` ```batch oint openai DeleteAssistant ^ --url "https://hut.openintegrations.dev/localai/" ^ --token "***" ^ --id "asst_37" ``` ```json title="Result" { "id": "asst_19", "object": "assistant.deleted", "deleted": true } ```