Skip to content

Commit

Permalink
feat: Updated OpenAPI spec
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored and HavenDV committed Aug 5, 2024
1 parent 3b2e268 commit e1827b6
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ partial void ProcessGenerateChatCompletionResponse(
using var httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: global::System.Net.Http.HttpMethod.Post,
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/chat", global::System.UriKind.RelativeOrAbsolute));
var __json = global::System.Text.Json.JsonSerializer.Serialize(request, global::Ollama.SourceGenerationContext.Default.GenerateChatCompletionRequest);
httpRequest.Content = new global::System.Net.Http.StringContent(
content: __json,
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: global::System.Text.Json.JsonSerializer.Serialize(request, global::Ollama.SourceGenerationContext.Default.GenerateChatCompletionRequest),
encoding: global::System.Text.Encoding.UTF8,
mediaType: "application/json");
httpRequest.Content = __httpRequestContent;

PrepareRequest(
client: _httpClient,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ partial void ProcessGenerateCompletionResponse(
using var httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: global::System.Net.Http.HttpMethod.Post,
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/generate", global::System.UriKind.RelativeOrAbsolute));
var __json = global::System.Text.Json.JsonSerializer.Serialize(request, global::Ollama.SourceGenerationContext.Default.GenerateCompletionRequest);
httpRequest.Content = new global::System.Net.Http.StringContent(
content: __json,
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: global::System.Text.Json.JsonSerializer.Serialize(request, global::Ollama.SourceGenerationContext.Default.GenerateCompletionRequest),
encoding: global::System.Text.Encoding.UTF8,
mediaType: "application/json");
httpRequest.Content = __httpRequestContent;

PrepareRequest(
client: _httpClient,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ partial void ProcessGenerateEmbeddingResponseContent(
using var httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: global::System.Net.Http.HttpMethod.Post,
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/embeddings", global::System.UriKind.RelativeOrAbsolute));
var __json = global::System.Text.Json.JsonSerializer.Serialize(request, global::Ollama.SourceGenerationContext.Default.GenerateEmbeddingRequest);
httpRequest.Content = new global::System.Net.Http.StringContent(
content: __json,
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: global::System.Text.Json.JsonSerializer.Serialize(request, global::Ollama.SourceGenerationContext.Default.GenerateEmbeddingRequest),
encoding: global::System.Text.Encoding.UTF8,
mediaType: "application/json");
httpRequest.Content = __httpRequestContent;

PrepareRequest(
client: _httpClient,
Expand Down
6 changes: 3 additions & 3 deletions src/libs/Ollama/Generated/Ollama.ModelsClient.CopyModel.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ partial void ProcessCopyModelResponse(
using var httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: global::System.Net.Http.HttpMethod.Post,
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/copy", global::System.UriKind.RelativeOrAbsolute));
var __json = global::System.Text.Json.JsonSerializer.Serialize(request, global::Ollama.SourceGenerationContext.Default.CopyModelRequest);
httpRequest.Content = new global::System.Net.Http.StringContent(
content: __json,
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: global::System.Text.Json.JsonSerializer.Serialize(request, global::Ollama.SourceGenerationContext.Default.CopyModelRequest),
encoding: global::System.Text.Encoding.UTF8,
mediaType: "application/json");
httpRequest.Content = __httpRequestContent;

PrepareRequest(
client: _httpClient,
Expand Down
8 changes: 4 additions & 4 deletions src/libs/Ollama/Generated/Ollama.ModelsClient.CreateBlob.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ partial void ProcessCreateBlobResponse(
using var httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: global::System.Net.Http.HttpMethod.Post,
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/blobs/{digest}", global::System.UriKind.RelativeOrAbsolute));
var __json = global::System.Text.Json.JsonSerializer.Serialize(request, global::Ollama.SourceGenerationContext.Default.ByteArray);
httpRequest.Content = new global::System.Net.Http.StringContent(
content: __json,
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: global::System.Text.Json.JsonSerializer.Serialize(request, global::Ollama.SourceGenerationContext.Default.ByteArray),
encoding: global::System.Text.Encoding.UTF8,
mediaType: "application/json");
mediaType: "application/octet-stream");
httpRequest.Content = __httpRequestContent;

PrepareRequest(
client: _httpClient,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ partial void ProcessCreateModelResponse(
using var httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: global::System.Net.Http.HttpMethod.Post,
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/create", global::System.UriKind.RelativeOrAbsolute));
var __json = global::System.Text.Json.JsonSerializer.Serialize(request, global::Ollama.SourceGenerationContext.Default.CreateModelRequest);
httpRequest.Content = new global::System.Net.Http.StringContent(
content: __json,
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: global::System.Text.Json.JsonSerializer.Serialize(request, global::Ollama.SourceGenerationContext.Default.CreateModelRequest),
encoding: global::System.Text.Encoding.UTF8,
mediaType: "application/json");
httpRequest.Content = __httpRequestContent;

PrepareRequest(
client: _httpClient,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ partial void ProcessDeleteModelResponse(
using var httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: global::System.Net.Http.HttpMethod.Delete,
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/delete", global::System.UriKind.RelativeOrAbsolute));
var __json = global::System.Text.Json.JsonSerializer.Serialize(request, global::Ollama.SourceGenerationContext.Default.DeleteModelRequest);
httpRequest.Content = new global::System.Net.Http.StringContent(
content: __json,
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: global::System.Text.Json.JsonSerializer.Serialize(request, global::Ollama.SourceGenerationContext.Default.DeleteModelRequest),
encoding: global::System.Text.Encoding.UTF8,
mediaType: "application/json");
httpRequest.Content = __httpRequestContent;

PrepareRequest(
client: _httpClient,
Expand Down
6 changes: 3 additions & 3 deletions src/libs/Ollama/Generated/Ollama.ModelsClient.PullModel.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ partial void ProcessPullModelResponse(
using var httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: global::System.Net.Http.HttpMethod.Post,
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/pull", global::System.UriKind.RelativeOrAbsolute));
var __json = global::System.Text.Json.JsonSerializer.Serialize(request, global::Ollama.SourceGenerationContext.Default.PullModelRequest);
httpRequest.Content = new global::System.Net.Http.StringContent(
content: __json,
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: global::System.Text.Json.JsonSerializer.Serialize(request, global::Ollama.SourceGenerationContext.Default.PullModelRequest),
encoding: global::System.Text.Encoding.UTF8,
mediaType: "application/json");
httpRequest.Content = __httpRequestContent;

PrepareRequest(
client: _httpClient,
Expand Down
6 changes: 3 additions & 3 deletions src/libs/Ollama/Generated/Ollama.ModelsClient.PushModel.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ partial void ProcessPushModelResponse(
using var httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: global::System.Net.Http.HttpMethod.Post,
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/push", global::System.UriKind.RelativeOrAbsolute));
var __json = global::System.Text.Json.JsonSerializer.Serialize(request, global::Ollama.SourceGenerationContext.Default.PushModelRequest);
httpRequest.Content = new global::System.Net.Http.StringContent(
content: __json,
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: global::System.Text.Json.JsonSerializer.Serialize(request, global::Ollama.SourceGenerationContext.Default.PushModelRequest),
encoding: global::System.Text.Encoding.UTF8,
mediaType: "application/json");
httpRequest.Content = __httpRequestContent;

PrepareRequest(
client: _httpClient,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ partial void ProcessShowModelInfoResponseContent(
using var httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: global::System.Net.Http.HttpMethod.Post,
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/show", global::System.UriKind.RelativeOrAbsolute));
var __json = global::System.Text.Json.JsonSerializer.Serialize(request, global::Ollama.SourceGenerationContext.Default.ModelInfoRequest);
httpRequest.Content = new global::System.Net.Http.StringContent(
content: __json,
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: global::System.Text.Json.JsonSerializer.Serialize(request, global::Ollama.SourceGenerationContext.Default.ModelInfoRequest),
encoding: global::System.Text.Encoding.UTF8,
mediaType: "application/json");
httpRequest.Content = __httpRequestContent;

PrepareRequest(
client: _httpClient,
Expand Down

0 comments on commit e1827b6

Please sign in to comment.