Comments (4)
using System.Text;
using Newtonsoft.Json;
namespace HigLabo.OpenAI
{
public class AssistantDeltaObject
{
public string Id { get; set; } = "";
public string Object { get; set; } = "";
public AssistantDelta Delta { get; set; } = new();
public class AssistantDelta
{
public string Role { get; set; } = "";
public List<Message> Content { get; set; } = new();
public List<string>? FileId { get; set; }
public RunStep? Step_Details { get; set; }
}
public class Message
{
public int Index { get; set; }
public string Type { get; set; } = "";
public MessageText Text { get; set; } = new();
}
public class MessageText
{
public string Value { get; set; } = "";
public Annotation[]? Annotations { get; set; }
public override string ToString()
{
return this.Value;
}
}
public class Annotation
{
public int Index { get; set; }
public string Type { get; set; } = "";
public string Text { get; set; } = "";
public string Start_Index { get; set; } = "";
public string End_Index { get; set; } = "";
public FileCitation File_Citation { get; set; } = new();
}
public class FileCitation
{
public string File_Id { get; set; } = "";
public string Quote { get; set; } = "";
}
public class RunStep
{
public string Type { get; set; } = "";
public MessageCreation? Message_Creation { get; set; }
public List<ToolCall>? Tool_Calls { get; set; }
}
public class MessageCreation
{
public string Message_Id { get; set; } = "";
}
public class ToolCall
{
public int Index { get; set; }
public string Id { get; set; } = "";
public string Type { get; set; } = "";
public CodeInterpreter? Code_Interpreter { get; set; }
}
public class CodeInterpreter
{
public string Input { get; set; } = "";
public List<string>? Outputs { get; set; }
}
public override string ToString()
{
return this.Delta?.Content.FirstOrDefault()?.Text.Value ?? this.Id;
}
}
}
from higlabo.
@dotchcz
Hi. Thank you for reporting bug and provide bug fix.
I'll patch it if you send me it.
regards.
from higlabo.
@higty
Hi, thank you for you quick reply! I cannot push any change to any branch :) so the class is attached, if it's okay for you.
from higlabo.
I fixed it just now.
And I upload it to Nuget as HigLabo.OpenAI 8.5.0.0.
Thank you for your feedback!
from higlabo.
Related Issues (20)
- Check if mail is bounced HOT 3
- HigLabo.Mapper Can not Convert Array To List HOT 6
- Generate code C# for call SQL User-defined Functions ? HOT 1
- Activate pop3 tls1.2 HOT 1
- Missing HigLabo.Core.EnumToLowerStringConverter Type when executing code HOT 3
- Unable to open the saved image file HOT 7
- Any implementation of OpenAI assistants API for old .net framework 4? HOT 2
- Assistants API with Azure OpenAI - Resource not found HOT 12
- Method not found: 'Boolean HigLabo.Core.ServerSentEventLine.IsEvent() HOT 8
- What is the best approach to add more context to the question HOT 5
- Temperature support (recently added) HOT 6
- Are you planning to add vector store usage for file search support? HOT 3
- Any way to avoid using local files in whisper transcription? HOT 2
- RSS library does not extract channel's `lastBuildDate` HOT 1
- RSS item should have multiple categories HOT 3
- RSS item should extract author from `<dc:creator>` element HOT 18
- Any way to make thread id live between OpenAIClient instances? (assistants api) HOT 4
- The best way to find out Token Number HOT 4
- OpenAI Assistant - Attaching a file not working HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from higlabo.