Skip to content

Commit

Permalink
Merge pull request #1255 from solliancenet/bdn-17546-aimodel-rebase
Browse files Browse the repository at this point in the history
Integration of AIModel and APIEndpointConfiguration resources
  • Loading branch information
joelhulen authored Jul 24, 2024
2 parents 9dbf36a + bbe45e8 commit 9743c7f
Show file tree
Hide file tree
Showing 101 changed files with 2,061 additions and 1,109 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ bld/

# Visual Studio 2015/2017 cache/options directory
.vs/
.cr/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/

Expand Down
Binary file modified docs/media/foundationallm-highlevel-architecture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions docs/release-notes/breaking-changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ Authorization API | `FoundationaLLM-Authorization-API` | `api://FoundationaLLM-A
User Portal | `FoundationaLLM-Core-Portal` | `api://FoundationaLLM-Core-Portal` | N/A
Management Portal | `FoundationaLLM-Management-Portal` | `api://FoundationaLLM-Management-Portal` | N/A

#### Changes in app configuration settings

The `FoundationaLLM:APIs` and `FoundationaLLM:ExternalAPIs` configuration namespaces have been replaced with the `FoundationaLLM:APIEndpoints` configuration namespace.

> [!IMPORTANT]
> All existing API registrations need to be updated to reflect these changes. The only setting that will exist under `FoundationaLLM:APIEndpoints` is `APIKey` (for those API enpoints which use API key authentication), all the other settings are now part of the `APIEndpoint` artifact managed by the `FoundationaLLM.Configuration` resource provider.
### Pre-0.8.0

1. Vectorization resource stores use a unique collection name, `Resources`. They also add a new top-level property named `DefaultResourceName`.
Expand Down
7 changes: 7 additions & 0 deletions src/FoundationaLLM.sln
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ManagementClient", "dotnet\
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Management.Client.Tests", "..\tests\dotnet\Management.Client.Tests\Management.Client.Tests.csproj", "{2B369949-0297-485E-9455-E8F54D078DB3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AIModel", "dotnet\AIModel\AIModel.csproj", "{58D9C40B-3BE6-42CC-9FAB-ECF20FDA2E84}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GatewayAdapterAPI", "dotnet\GatewayAdapterAPI\GatewayAdapterAPI.csproj", "{F826A354-9DF5-4DE5-97CB-F8F0D4566C0F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "State", "dotnet\State\State.csproj", "{BF7614CE-4E64-4E69-A56D-A7E72EDA8ABD}"
Expand Down Expand Up @@ -292,6 +294,10 @@ Global
{2B369949-0297-485E-9455-E8F54D078DB3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2B369949-0297-485E-9455-E8F54D078DB3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2B369949-0297-485E-9455-E8F54D078DB3}.Release|Any CPU.Build.0 = Release|Any CPU
{58D9C40B-3BE6-42CC-9FAB-ECF20FDA2E84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{58D9C40B-3BE6-42CC-9FAB-ECF20FDA2E84}.Debug|Any CPU.Build.0 = Debug|Any CPU
{58D9C40B-3BE6-42CC-9FAB-ECF20FDA2E84}.Release|Any CPU.ActiveCfg = Release|Any CPU
{58D9C40B-3BE6-42CC-9FAB-ECF20FDA2E84}.Release|Any CPU.Build.0 = Release|Any CPU
{F826A354-9DF5-4DE5-97CB-F8F0D4566C0F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F826A354-9DF5-4DE5-97CB-F8F0D4566C0F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F826A354-9DF5-4DE5-97CB-F8F0D4566C0F}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -358,6 +364,7 @@ Global
{95676184-9498-465C-B4FE-C67AA09A0397} = {C757E76C-AE42-4700-A92C-ED321D9CDB39}
{69E631C8-3266-4D40-9A7A-D67C07972BE2} = {B6DC1190-2873-44A3-85B3-63D7BDE99231}
{2B369949-0297-485E-9455-E8F54D078DB3} = {C757E76C-AE42-4700-A92C-ED321D9CDB39}
{58D9C40B-3BE6-42CC-9FAB-ECF20FDA2E84} = {B6DC1190-2873-44A3-85B3-63D7BDE99231}
{F826A354-9DF5-4DE5-97CB-F8F0D4566C0F} = {B6DC1190-2873-44A3-85B3-63D7BDE99231}
{BF7614CE-4E64-4E69-A56D-A7E72EDA8ABD} = {B6DC1190-2873-44A3-85B3-63D7BDE99231}
{B0D4EBB4-2057-4081-8A80-65390BFBA654} = {B6DC1190-2873-44A3-85B3-63D7BDE99231}
Expand Down
16 changes: 16 additions & 0 deletions src/dotnet/AIModel/AIModel.csproj
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>
27 changes: 27 additions & 0 deletions src/dotnet/AIModel/Models/AIModelReference.cs
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.")
};
}
}
Loading

0 comments on commit 9743c7f

Please sign in to comment.