higty / higlabo

HigLabo library provide 1.AI client library(OpenAI, Anthoripic, Groq) 2.Object Mapper(fastest in the world) 3.DbSharp(DAL generator) 4.Other.(Mail, Ftp, Utility...etc)
180 stars 82 forks source link

Missing HigLabo.Core.EnumToLowerStringConverter Type when executing code #60

Closed dandrejvv closed 8 months ago

dandrejvv commented 10 months ago

I'm trying this library out to make use of the Assistants form OpenAI and after I've installed the nuget package HigLabo.OpenAI 7.0.0 I execute my application and on this line new OpenAIClient() it fails with this exception:

System.TypeLoadException: Could not load type 'HigLabo.Core.EnumToLowerStringConverter' from assembly 'HigLabo.NewtonsoftJson, Version=7.0.0.0, Culture=neutral, PublicKeyToken=null'.
   at HigLabo.OpenAI.OpenAIJsonConverter..ctor()
   at HigLabo.OpenAI.OpenAIClient..ctor(String apiKey)
   at Program.<Main>$(String[] args) in C:\Users\Dandre\RiderProjects\OpenAiTestbed\OpenAiTestbed\Program.cs:line 3
   at Program.<Main>(String[] args)

I'm not sure if the class is missing from those nuget packages but would you mind having a look to get this fixed? I have been able to compile the source code in the meantime which seems to work.

Also, I did run into an additional problem where the ThreadObject class was using string for Metadata instead of object or something like that. Please also update that part so that it can work against the latest API from OpenAI.

Thanks.

raptyk commented 10 months ago

same here with nuget packege version 7.0.1

var apiKey = "sk-5........";
var client = new OpenAIClient(apiKey);
var resp = await client.AssistantsAsync();
System.TypeLoadException: Could not load type 'HigLabo.Core.EnumToLowerStringConverter' from assembly 'HigLabo.NewtonsoftJson, Version=7.0.0.0, Culture=neutral, PublicKeyToken=null'.
   at HigLabo.OpenAI.OpenAIJsonConverter..ctor()
   at HigLabo.OpenAI.OpenAIClient..ctor(String apiKey)
upperbayhawk commented 10 months ago

Same with nuget package 7.0.2

higty commented 8 months ago

I updated all library. Please use latest version it solve this issue.