1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-11-29 22:27:42 +02:00
Files
OpenIntegrations/docs/en/examples/Ollama/GetResponse.txt
Vitaly the Alpaca (bot) 43ecdb9b78 Main build (Jenkins)
2025-05-01 23:28:11 +03:00

36 lines
945 B
Plaintext
Vendored

URL = "https://api.athenaeum.digital/ollama";
Token = "10KO-82..."; // Authorization - not part API Ollama
Prompt = "What is 1C:Enterprise?";
Model = "tinyllama";
AdditionalHeaders = New Map;
AdditionalHeaders.Insert("Authorization", StrTemplate("Bearer %1", Token));
Result = OPI_Ollama.GetResponse(URL, Model, Prompt, , AdditionalHeaders);
// With paramether
Prompt = "Ollama is 22 years old and is busy saving the world. Respond using JSON";
Format = OPI_Tools.JSONToStructure("
|{
|""type"": ""object"",
|""properties"": {
| ""age"": {
| ""type"": ""integer""
| },
| ""available"": {
| ""type"": ""boolean""
| }
|},
|""required"": [
| ""age"",
| ""available""
|]
|}");
AdditionalParameters = New Structure("format", Format);
Result = OPI_Ollama.GetResponse(URL, Model, Prompt, AdditionalParameters, AdditionalHeaders);