Skip to content

Commit

Permalink
Merge pull request #386 from tryAGI/bot/auto-format_202407220518
Browse files Browse the repository at this point in the history
style:Run dotnet format
  • Loading branch information
github-actions[bot] authored Jul 22, 2024
2 parents b2ea48b + 16568f0 commit 8aa60b3
Show file tree
Hide file tree
Showing 9 changed files with 460 additions and 460 deletions.
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

0 comments on commit 8aa60b3

Please sign in to comment.