Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style:Run dotnet format #386

Merged
merged 1 commit into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class ImageToTextRequest
/// Description of the image to generate.
/// </summary>
public string Prompt { get; init; } = string.Empty;

/// <summary>
/// Image to upload.
/// </summary>
Expand Down
902 changes: 451 additions & 451 deletions src/Providers/DeepInfra/src/DeepInfraModelIds.cs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Providers/Google.VertexAI/test/VertexAITest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public async Task TextToImage()

answer.Should().NotBeNull();

foreach(var img in answer.Images)
foreach (var img in answer.Images)
{
string outputFileName = $"dog_newspaper_{Guid.NewGuid()}.png";
File.WriteAllBytes(outputFileName, Convert.FromBase64String(img));
Expand Down
4 changes: 2 additions & 2 deletions src/Providers/OpenAI/src/Chat/Message.Extension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ public static ChatCompletionTool GetTool(this Message message)
{
var nameAndId = message.FunctionName?.Split(Separator, StringSplitOptions.RemoveEmptyEntries) ??
throw new ArgumentException("Invalid functionCall name and id string");

if (nameAndId.Length < 2)
throw new ArgumentException("Invalid functionCall name and id string");

return new ChatCompletionTool
{
Type = ChatCompletionToolType.Function,
Expand Down
2 changes: 1 addition & 1 deletion src/Providers/OpenAI/src/Chat/OpenAiChatModel.Tokens.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public partial class OpenAiChatModel
public int CountTokens(string text)
{
Encoder ??= ModelToEncoder.TryFor(ChatModel) ?? new Encoder(new Cl100KBase());

return Encoder.CountTokens(text);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public async Task<SpeechToTextResponse> TranscribeAsync(
using var memoryStream = new MemoryStream();
await request.Stream.CopyToAsync(memoryStream, cancellationToken).ConfigureAwait(false);
memoryStream.Position = 0;

var response = await provider.Api.Audio.CreateTranscriptionAsync(
file: memoryStream.ToArray(),
//audioName: usedSettings.AudioName!,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public OpenAiTextToSpeechModel(
: this(provider, id.ToValueString())
{
}

/// <inheritdoc/>
public async Task<TextToSpeechResponse> GenerateSpeechAsync(
TextToSpeechRequest request,
Expand Down
2 changes: 1 addition & 1 deletion src/Providers/OpenRouter/src/OpenRouterModelProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public static ChatModelMetadata ToMetadata(string? id, int? contextLength, doubl
PricePerOutputTokenInUsd = pricePerOutputTokenInUsd,
};
}

[CLSCompliant(false)]
public static ChatModelMetadata GetModelById(OpenRouterModelIds modelId)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public static async Task GenerateCodesAsync(GenerationOptions options)

//Load Open Router Docs Page...
Console.WriteLine("Loading Model Page...");

var html = await GetStringAsync(new Uri("https://openrouter.ai/docs/models")).ConfigureAwait(false);

//Parse Html
Expand Down