Skip to content

Commit

Permalink
fix: Disable validation of API key.
Browse files Browse the repository at this point in the history
  • Loading branch information
HavenDV committed Jan 20, 2024
1 parent 39e1945 commit a186621
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/libs/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</ItemGroup>

<PropertyGroup Label="Nuget">
<Version>2.0.0-alpha.6</Version>
<Version>2.0.0-alpha.7</Version>
<GeneratePackageOnBuild Condition=" '$(Configuration)' == 'Release' ">true</GeneratePackageOnBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Authors>tryAGI and contributors</Authors>
Expand Down
2 changes: 1 addition & 1 deletion src/libs/OpenAI/Client/OpenAIClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ private HttpClient SetupClient(HttpClient client = null)
(!OpenAIAuthentication.ApiKey.Contains(AuthInfo.SecretKeyPrefix) &&
!OpenAIAuthentication.ApiKey.Contains(AuthInfo.SessionKeyPrefix))))
{
throw new InvalidCredentialException($"{OpenAIAuthentication.ApiKey} must start with '{AuthInfo.SecretKeyPrefix}'");
//throw new InvalidCredentialException($"{OpenAIAuthentication.ApiKey} must start with '{AuthInfo.SecretKeyPrefix}'");
}

if (OpenAIClientSettings.UseOAuthAuthentication)
Expand Down
5 changes: 3 additions & 2 deletions src/libs/OpenAI/OpenAI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,17 @@
<OpenApiGenerator_Namespace>OpenAI</OpenApiGenerator_Namespace>
<OpenApiGenerator_ClassName>OpenAiApi</OpenApiGenerator_ClassName>
<OpenApiGenerator_GenerateModels>true</OpenApiGenerator_GenerateModels>
<!-- <OpenApiGenerator_IncludeModels>CreateModerationResponse</OpenApiGenerator_IncludeModels>-->
<OpenApiGenerator_IncludeModels>Permission</OpenApiGenerator_IncludeModels>
<OpenApiGenerator_GenerateSdk>false</OpenApiGenerator_GenerateSdk>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="OpenApiGenerator" Version="0.1.0-dev.33">
<PackageReference Include="OpenApiGenerator" Version="0.1.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="PolySharp" Version="1.13.2">
<PackageReference Include="PolySharp" Version="1.14.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down

0 comments on commit a186621

Please sign in to comment.