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