12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- using System.Collections.Generic;
- namespace LLM.Editor.Api
- {
- // C# classes that map directly to the JSON structure required by the Gemini API.
- [System.Serializable]
- public class SystemInstruction
- {
- public List<Part> parts;
- }
- [System.Serializable]
- public class ApiRequest
- {
- public List<Content> contents;
- public SystemInstruction system_instruction;
- }
- [System.Serializable]
- public class Content
- {
- public string role;
- public List<Part> parts;
- }
- [System.Serializable]
- public class Part
- {
- public string text;
- }
- [System.Serializable]
- public class ApiResponse
- {
- public List<Candidate> candidates;
- }
- [System.Serializable]
- public class Candidate
- {
- public Content content;
- }
- }
|