Skip to content

Commit

Permalink
Merge pull request #429 from EhsanValiGeeksltd/master
Browse files Browse the repository at this point in the history
add V2 assistant suppot
  • Loading branch information
atir-naveed-geeksltd authored Oct 29, 2024
2 parents b144df4 + 1797f24 commit dc0e7ef
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
13 changes: 13 additions & 0 deletions Olive.Gpt/AssistantDto/OpenAiAssistantTools.V2.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using System.Runtime.Serialization;

namespace Olive.Gpt.AssistantDto.V2;

public enum OpenAiAssistantTools
{
[EnumMember(Value = "code_interpreter")]
CodeInterpreter,
[EnumMember(Value = "file_search")]
FileSearch,
[EnumMember(Value = "function")]
Function
}
15 changes: 15 additions & 0 deletions Olive.Gpt/AssistantDto/OpenAiCreateAssistantDto.V2.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using System.Collections.Generic;
using Newtonsoft.Json;

namespace Olive.Gpt.AssistantDto.V2;

public class OpenAiCreateAssistantDto : Olive.Gpt.AssistantDto.OpenAiCreateAssistantDto
{
public new OpenAiAssistantToolsDto[] Tools{ get; set; }
}

public class OpenAiAssistantToolsDto : Olive.Gpt.AssistantDto.OpenAiAssistantToolsDto
{
[JsonProperty("type")]
public new OpenAiAssistantTools Type{ get; set; }
}
3 changes: 2 additions & 1 deletion Olive.Gpt/Olive.Gpt.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>1.0.129</Version>
<Version>1.0.130</Version>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit dc0e7ef

Please sign in to comment.