-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1255 from solliancenet/bdn-17546-aimodel-rebase
Integration of AIModel and APIEndpointConfiguration resources
- Loading branch information
Showing
101 changed files
with
2,061 additions
and
1,109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<RootNamespace>FoundationaLLM.AIModel</RootNamespace> | ||
<AssemblyName>FoundationaLLM.AIModel</AssemblyName> | ||
<GenerateDocumentationFile>True</GenerateDocumentationFile> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Common\Common.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using FoundationaLLM.Common.Constants.ResourceProviders; | ||
using FoundationaLLM.Common.Exceptions; | ||
using FoundationaLLM.Common.Models.ResourceProviders; | ||
using FoundationaLLM.Common.Models.ResourceProviders.AIModel; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace FoundationaLLM.AIModel.Models | ||
{ | ||
/// <summary> | ||
/// Contains a reference to an AIModel | ||
/// </summary> | ||
public class AIModelReference : ResourceReference | ||
{ | ||
/// <summary> | ||
/// The object type of the data source. | ||
/// </summary> | ||
[JsonIgnore] | ||
public Type AIModelType => | ||
Type switch | ||
{ | ||
AIModelTypes.Basic => typeof(AIModelBase), | ||
AIModelTypes.Completion => typeof(CompletionAIModel), | ||
AIModelTypes.Embedding => typeof(EmbeddingAIModel), | ||
_ => throw new ResourceProviderException($"The data source type {Type} is not supported.") | ||
}; | ||
} | ||
} |
Oops, something went wrong.