﻿---
sidebar_position: 3
description: Retrieve 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';

# Retrieve assistant
 Retrieves information about an assistant by ID



`Function RetrieveAssistant(Val URL, Val Token, Val AssistantID, Val AdditionalHeaders = "") Export`

  | Parameter | CLI option | Type | Required | Description |
  |-|-|-|-|-|
  | URL | --url | String | &#x2714; | OpenAI server URL |
  | Token | --token | String | &#x2714; | OpenAI authorization token |
  | AssistantID | --id | String | &#x2714; | Assistant ID |
  | AdditionalHeaders | --headers | Map Of KeyAndValue | &#x2716; | Additional request headers, if necessary |

  
  Returns:  Map Of KeyAndValue - Processing result

<br/>

:::tip
Method at API documentation: [Retrieve assistant](https://platform.openai.com/docs/api-reference/assistants/getAssistant)
:::
<br/>



```bsl title="1C:Enterprise/OneScript code example"
    URL   = "https://hut.openintegrations.dev/localai/";
    Token = "12We...";

    AssistantID = "asst_17";

    Result = OPI_OpenAI.RetrieveAssistant(URL, Token, AssistantID);
```
 

 <Tabs>
  
    <TabItem value="bash" label="Bash" default>
        ```bash
            oint openai RetrieveAssistant \
             --url "https://hut.openintegrations.dev/localai/" \
             --token "***" \
             --id "asst_61"
        ```
    </TabItem>
  
    <TabItem value="bat" label="CMD/Bat" default>
        ```batch
            oint openai RetrieveAssistant ^
             --url "https://hut.openintegrations.dev/localai/" ^
             --token "***" ^
             --id "asst_61"
        ```
    </TabItem>
</Tabs>


```json title="Result"
{
 "id": "asst_5",
 "object": "assistant",
 "created": 1757920803,
 "model": "smolvlm-256m-instruct",
 "name": "Math tutor",
 "instructions": "You are a personal math tutor. When asked a question, write and run Python code to answer the question."
}
```
