diff --git a/OpenAI_API/Audio/AudioRequest.cs b/OpenAI_API/Audio/AudioRequest.cs index be74589..6912a13 100644 --- a/OpenAI_API/Audio/AudioRequest.cs +++ b/OpenAI_API/Audio/AudioRequest.cs @@ -6,6 +6,9 @@ namespace OpenAI_API.Audio { + /// + /// Parameters for requests made by the . + /// public class AudioRequest { /// diff --git a/OpenAI_API/Audio/ITranscriptionEndpoint.cs b/OpenAI_API/Audio/ITranscriptionEndpoint.cs index 384ac6d..f08c93e 100644 --- a/OpenAI_API/Audio/ITranscriptionEndpoint.cs +++ b/OpenAI_API/Audio/ITranscriptionEndpoint.cs @@ -18,7 +18,7 @@ public interface ITranscriptionEndpoint /// /// The stream containing audio data, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm. /// The name of the audio file in the stream. This does not have to be real, but it must contain the correct file extension. For example, "file.mp3" if you are supplying an mp3 audio stream. - /// The format of the response. Suggested value are or . For text and Json formats, try or instead. + /// The format of the response. Suggested value are or . For text and Json formats, try or instead. /// The language of the input audio. Supplying the input language in ISO-639-1 format will improve accuracy and latency. /// An optional text to guide the model's style or continue a previous audio segment. The prompt should match the audio language. /// The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit. @@ -29,7 +29,7 @@ public interface ITranscriptionEndpoint /// Gets the transcription of the audio file, in the specified format /// /// The local path to the audio file, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm. - /// The format of the response. Suggested value are or . For text and Json formats, try or instead. + /// The format of the response. Suggested value are or . For text and Json formats, try or instead. /// The language of the input audio. Supplying the input language in ISO-639-1 format will improve accuracy and latency. /// An optional text to guide the model's style or continue a previous audio segment. The prompt should match the audio language. /// The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit. diff --git a/OpenAI_API/Audio/TextToSpeechRequest.cs b/OpenAI_API/Audio/TextToSpeechRequest.cs index f62956f..5f2499c 100644 --- a/OpenAI_API/Audio/TextToSpeechRequest.cs +++ b/OpenAI_API/Audio/TextToSpeechRequest.cs @@ -5,6 +5,9 @@ namespace OpenAI_API.Audio { + /// + /// A request to the . + /// public class TextToSpeechRequest { /// diff --git a/OpenAI_API/Audio/TranscriptionEndpoint.cs b/OpenAI_API/Audio/TranscriptionEndpoint.cs index 8de241c..fe1a268 100644 --- a/OpenAI_API/Audio/TranscriptionEndpoint.cs +++ b/OpenAI_API/Audio/TranscriptionEndpoint.cs @@ -136,7 +136,7 @@ public async Task GetWithDetailsAsync(string audioFilePath, /// /// The stream containing audio data, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm. /// The name of the audio file in the stream. This does not have to be real, but it must contain the correct file extension. For example, "file.mp3" if you are supplying an mp3 audio stream. - /// The format of the response. Suggested value are or . For text and Json formats, try or instead. + /// The format of the response. Suggested value are or . For text and Json formats, try or instead. /// The language of the input audio. Supplying the input language in ISO-639-1 format will improve accuracy and latency. /// An optional text to guide the model's style or continue a previous audio segment. The prompt should match the audio language. /// The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit. @@ -175,7 +175,7 @@ public async Task GetAsFormatAsync(Stream audioStream, string filename, /// Gets the transcription of the audio file, in the specified format /// /// The local path to the audio file, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm. - /// The format of the response. Suggested value are or . For text and Json formats, try or instead. + /// The format of the response. Suggested value are or . For text and Json formats, try or instead. /// The language of the input audio. Supplying the input language in ISO-639-1 format will improve accuracy and latency. /// An optional text to guide the model's style or continue a previous audio segment. The prompt should match the audio language. /// The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit. diff --git a/OpenAI_API/Chat/Conversation.cs b/OpenAI_API/Chat/Conversation.cs index e54944a..be9962e 100644 --- a/OpenAI_API/Chat/Conversation.cs +++ b/OpenAI_API/Chat/Conversation.cs @@ -66,7 +66,7 @@ public Conversation(ChatEndpoint endpoint, OpenAI_API.Models.Model model = null, } /// - /// A list of messages exchanged so far. To append to this list, use , , , or . + /// A list of messages exchanged so far. To append to this list, use , , , or . /// public IList Messages { get => _Messages; } private List _Messages; diff --git a/OpenAI_API/Files/IFilesEndpoint.cs b/OpenAI_API/Files/IFilesEndpoint.cs index cd53fbf..0b0e754 100644 --- a/OpenAI_API/Files/IFilesEndpoint.cs +++ b/OpenAI_API/Files/IFilesEndpoint.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.Threading.Tasks; +using System.Net.Http; namespace OpenAI_API.Files { diff --git a/OpenAI_API/OpenAI_API.csproj b/OpenAI_API/OpenAI_API.csproj index 8b7eee0..75dc2c3 100644 --- a/OpenAI_API/OpenAI_API.csproj +++ b/OpenAI_API/OpenAI_API.csproj @@ -6,18 +6,18 @@ true OkGoDoIt (Roger Pincombe) OpenAI API - A simple C# / .NET library to use with OpenAI's APIs, including GPT 3.5, GPT 4, ChatGPT, DALL-E, etc. Independently developed, this is not an official library and I am not affiliated with OpenAI. An OpenAI or Azure OpenAI account is required. + A simple C# / .NET library to use with OpenAI's APIs, including GPT 3.5, GPT 4, ChatGPT, DALL-E, Whisper, etc. Independently developed, this is not an official library and I am not affiliated with OpenAI. An OpenAI or Azure OpenAI account is required. This library is licensed CC-0, in the public domain CC0-1.0 https://github.com/OkGoDoIt/OpenAI-API-dotnet https://github.com/OkGoDoIt/OpenAI-API-dotnet - OpenAI, AI, ML, API, ChatGPT, DALLE, GPT3, GPT-3, GPT4, GPT-4, DALL-E + OpenAI, AI, ML, API, ChatGPT, DALLE, GPT3, GPT-3, GPT4, GPT-4, DALL-E, Whisper, TTS OpenAI API - Adds updated models as of December 11, 2023, including the new GPT-4 Vision, GPT-4 Turbo, and DALL-E 3. Adds json result format. Fixes chat result streaming bug. + Adds updated models as of December 13, 2023, including the new GPT-4 Vision, GPT-4 Turbo, and DALL-E 3. Adds text-to-speech as well as audio transcriptions and translations (Whisper). OpenAI - 1.9 - 1.9.0.0 - 1.9.0.0 + 1.10 + 1.10.0.0 + 1.10.0.0 True README.md True diff --git a/README.md b/README.md index 8892d4e..3ba6849 100644 --- a/README.md +++ b/README.md @@ -26,10 +26,10 @@ Console.WriteLine(result); * [JSON Mode](#json-mode) * [Completions API](#completions) * [Streaming completion results](#streaming) - * Audio - * Text to Speech - * Transcribe Audio to Text - * Translate Audio to English Text + * [Audio](#audio) + * [Text to Speech](#text-to-speech-tts) + * [Transcribe Audio to Text](#transcription-speech-to-text) + * [Translate Audio to English Text](#translations-non-english-speech-to-english-text) * [Embeddings API](#embeddings) * [Moderation API](#moderation) * [Files API](#files-for-fine-tuning) @@ -42,7 +42,7 @@ Console.WriteLine(result); ## Status [![OpenAI](https://badgen.net/nuget/v/OpenAI)](https://www.nuget.org/packages/OpenAI/) -Adds updated models as of December 13, 2023, including the new [GPT-4 Vision](#gpt-vision), GPT-4 Turbo, and [DALL-E 3](#dall-e-3). Adds text-to-speech as well as audio transcription and translation (Whisper). Adds [json result format](#json-mode). Fixes chat result streaming bug. +Adds updated models as of December 13, 2023, including the new [GPT-4 Vision](#gpt-vision), GPT-4 Turbo, and [DALL-E 3](#dall-e-3). Adds [text-to-speech](#text-to-speech-tts) as well as [audio transcriptions](#transcription-speech-to-text) and [translations](#translations-non-english-speech-to-english-text) (Whisper). Adds [json result format](#json-mode). Fixes chat result streaming bug. Support for assistants and other new features shown at OpenAI DevDay will be coming soon, but are not yet implemented. ## Requirements