1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-11-29 22:27:42 +02:00
Files
OpenIntegrations/docs/en/md/Ollama/Working-with-blob/Check-blob.mdx

52 lines
1.2 KiB
Plaintext
Raw Normal View History

2025-04-14 22:23:29 +03:00
---
sidebar_position: 2
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Check BLOB
Checks the existence of a BLOB by its SHA256 digest
`Function CheckBlob(Val URL, Val SHA256, Val AdditionalHeaders = "") Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| URL | --url | String | ✔ | Ollama server URL |
| SHA256 | --digest | String | ✔ | SHA256 BLOB digest |
| AdditionalHeaders | --headers | Map Of KeyAndValue | ✖ | Additional request headers, if necessary |
Returns: Map Of KeyAndValue - Processing result
<br/>
:::tip
Method at API documentation: [Check if a Blob Exist](https://github.com/ollama/ollama/blob/main/docs/api.md#check-if-a-blob-exists)
:::
<br/>
```bsl title="1C:Enterprise/OneScript code example"
URL = "https://api.athenaeum.digital/ollama";
Token = "10KO..."; // Authorization - not part API Ollama
2025-05-01 12:55:47 +03:00
SHA256 = "52c90de7404fe5ce163539bce1b81baea4225cacee2ba72ce9671378b41e1897";
2025-04-14 22:23:29 +03:00
AdditionalHeaders = New Map;
AdditionalHeaders.Insert("Authorization", StrTemplate("Bearer %1", Token));
Result = OPI_Ollama.CheckBlob(URL, SHA256, AdditionalHeaders);
```
2025-05-01 12:55:47 +03:00
```json title="Result"
{
"status_code": 200
}
```