diff --git a/OpenAI_API/IOpenAIAPI.cs b/OpenAI_API/IOpenAIAPI.cs index 7b2de67..3e7950c 100644 --- a/OpenAI_API/IOpenAIAPI.cs +++ b/OpenAI_API/IOpenAIAPI.cs @@ -1,7 +1,10 @@ +using OpenAI_API.Chat; using OpenAI_API.Completions; using OpenAI_API.Embedding; using OpenAI_API.Files; +using OpenAI_API.Images; using OpenAI_API.Models; +using OpenAI_API.Moderation; namespace OpenAI_API { @@ -27,24 +30,39 @@ public interface IOpenAIAPI /// APIAuthentication Auth { get; set; } + /// + /// Text generation in the form of chat messages. This interacts with the ChatGPT API. + /// + IChatEndpoint Chat { get; } + + /// + /// Classify text against the OpenAI Content Policy. + /// + IModerationEndpoint Moderation { get; } + /// /// Text generation is the core function of the API. You give the API a prompt, and it generates a completion. The way you “program” the API to do a task is by simply describing the task in plain english or providing a few written examples. This simple approach works for a wide range of use cases, including summarization, translation, grammar correction, question answering, chatbots, composing emails, and much more (see the prompt library for inspiration). /// - CompletionEndpoint Completions { get; } + ICompletionEndpoint Completions { get; } /// /// The API lets you transform text into a vector (list) of floating point numbers. The distance between two vectors measures their relatedness. Small distances suggest high relatedness and large distances suggest low relatedness. /// - EmbeddingEndpoint Embeddings { get; } + IEmbeddingEndpoint Embeddings { get; } /// /// The API endpoint for querying available Engines/models /// - ModelsEndpoint Models { get; } + IModelsEndpoint Models { get; } /// /// The API lets you do operations with files. You can upload, delete or retrieve files. Files can be used for fine-tuning, search, etc. /// - FilesEndpoint Files { get; } + IFilesEndpoint Files { get; } + + /// + /// The API lets you do operations with images. You can Given a prompt and/or an input image, the model will generate a new image. + /// + IImageGenerationEndpoint ImageGenerations { get; } } } \ No newline at end of file diff --git a/OpenAI_API/OpenAIAPI.cs b/OpenAI_API/OpenAIAPI.cs index ac503dc..f1e2bda 100644 --- a/OpenAI_API/OpenAIAPI.cs +++ b/OpenAI_API/OpenAIAPI.cs @@ -70,36 +70,36 @@ public static OpenAIAPI ForAzure(string YourResourceName, string deploymentId, A /// /// Text generation is the core function of the API. You give the API a prompt, and it generates a completion. The way you “program” the API to do a task is by simply describing the task in plain english or providing a few written examples. This simple approach works for a wide range of use cases, including summarization, translation, grammar correction, question answering, chatbots, composing emails, and much more (see the prompt library for inspiration). /// - public CompletionEndpoint Completions { get; } + public ICompletionEndpoint Completions { get; } /// /// The API lets you transform text into a vector (list) of floating point numbers. The distance between two vectors measures their relatedness. Small distances suggest high relatedness and large distances suggest low relatedness. /// - public EmbeddingEndpoint Embeddings { get; } + public IEmbeddingEndpoint Embeddings { get; } /// /// Text generation in the form of chat messages. This interacts with the ChatGPT API. /// - public ChatEndpoint Chat { get; } + public IChatEndpoint Chat { get; } /// /// Classify text against the OpenAI Content Policy. /// - public ModerationEndpoint Moderation { get; } + public IModerationEndpoint Moderation { get; } /// /// The API endpoint for querying available Engines/models /// - public ModelsEndpoint Models { get; } + public IModelsEndpoint Models { get; } /// /// The API lets you do operations with files. You can upload, delete or retrieve files. Files can be used for fine-tuning, search, etc. /// - public FilesEndpoint Files { get; } + public IFilesEndpoint Files { get; } /// - /// The API lets you do operations with images. You can Given a prompt and/or an input image, the model will generate a new image. + /// The API lets you do operations with images. Given a prompt and/or an input image, the model will generate a new image. /// - public ImageGenerationEndpoint ImageGenerations { get; } + public IImageGenerationEndpoint ImageGenerations { get; } } }