1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-11-27 22:18:36 +02:00
Files
OpenIntegrations/docs/en/md/Ollama/Working-with-blob/Check-blob.mdx
Vitaly the Alpaca (bot) 0f349cb408 Main build (Jenkins)
2025-04-30 21:14:58 +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 = "72e957f936152af0a3aacf055fb01c73c7a9fb1cc056b9ef536afaa7462ed2fc";
AdditionalHeaders = New Map;
AdditionalHeaders.Insert("Authorization", StrTemplate("Bearer %1", Token));
Result = OPI_Ollama.CheckBlob(URL, SHA256, AdditionalHeaders);
```