-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
120: Added empty library for langfuse integration
- Loading branch information
Showing
17 changed files
with
4,927 additions
and
5 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
18 changes: 18 additions & 0 deletions
18
API/ASSISTENTE.Infrastructure.Langfuse/ASSISTENTE.Infrastructure.Langfuse.csproj
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,18 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net9.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="SOFTURE.Results" Version="0.1.1" /> | ||
<PackageReference Include="SOFTURE.Settings" Version="0.1.1" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<InternalsVisibleTo Include="ASSISTENTE.Infrastructure"/> | ||
</ItemGroup> | ||
|
||
</Project> |
8 changes: 8 additions & 0 deletions
8
API/ASSISTENTE.Infrastructure.Langfuse/Contracts/ILangfuseService.cs
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,8 @@ | ||
using CSharpFunctionalExtensions; | ||
|
||
namespace ASSISTENTE.Infrastructure.Langfuse.Contracts; | ||
|
||
public interface ILangfuseService | ||
{ | ||
Task<Result> CreateIngestionAsync(); | ||
} |
24 changes: 24 additions & 0 deletions
24
API/ASSISTENTE.Infrastructure.Langfuse/DependencyInjection.cs
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,24 @@ | ||
using ASSISTENTE.Infrastructure.Langfuse.Contracts; | ||
using ASSISTENTE.Infrastructure.Langfuse.Settings; | ||
using Microsoft.Extensions.DependencyInjection; | ||
|
||
namespace ASSISTENTE.Infrastructure.Langfuse | ||
{ | ||
internal static class DependencyInjection | ||
{ | ||
public static IServiceCollection AddLangfuse<TSettings>(this IServiceCollection services) | ||
where TSettings : ILangfuseSettings | ||
{ | ||
// services.AddSingleton<[CLIENT]>(serviceProvider => | ||
// { | ||
// var langfuseSettings = serviceProvider.GetRequiredService<TSettings>().Langfuse; | ||
// | ||
// return [CLIENT] | ||
// }); | ||
|
||
services.AddScoped<ILangfuseService, LangfuseService>(); | ||
|
||
return services; | ||
} | ||
} | ||
} |
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,12 @@ | ||
using ASSISTENTE.Infrastructure.Langfuse.Contracts; | ||
using CSharpFunctionalExtensions; | ||
|
||
namespace ASSISTENTE.Infrastructure.Langfuse; | ||
|
||
internal sealed class LangfuseService() : ILangfuseService | ||
{ | ||
public async Task<Result> CreateIngestionAsync() | ||
Check warning on line 8 in API/ASSISTENTE.Infrastructure.Langfuse/LangfuseService.cs
|
||
{ | ||
return Result.Success(); | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
API/ASSISTENTE.Infrastructure.Langfuse/Settings/ILangfuseSettings.cs
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,6 @@ | ||
namespace ASSISTENTE.Infrastructure.Langfuse.Settings; | ||
|
||
public interface ILangfuseSettings | ||
{ | ||
LangfuseSettings Langfuse { get; init; } | ||
} |
8 changes: 8 additions & 0 deletions
8
API/ASSISTENTE.Infrastructure.Langfuse/Settings/LangfuseSettings.cs
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,8 @@ | ||
namespace ASSISTENTE.Infrastructure.Langfuse.Settings; | ||
|
||
public sealed class LangfuseSettings | ||
{ | ||
public required string SecretKey { get; init; } | ||
public required string PublicKey { get; init; } | ||
public required string Host { get; init; } | ||
} |
Oops, something went wrong.