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
Vitaly the Alpaca (bot) 655e839f8a Main build (Jenkins)
2025-04-14 22:23:29 +03:00

48 lines
1.2 KiB
Plaintext
Vendored

---
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
SHA256 = "f522b3e06f06995065350aed018ef04f328b91fc95f45408fb6790e0cc320962";
AdditionalHeaders = New Map;
AdditionalHeaders.Insert("Authorization", StrTemplate("Bearer %1", Token));
Result = OPI_Ollama.CheckBlob(URL, SHA256, AdditionalHeaders);
```