You've already forked OpenIntegrations
mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-11-27 22:18:36 +02:00
48 lines
1.2 KiB
Plaintext
Vendored
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);
|
|
```
|
|
|
|
|
|
|
|
|
|
|