Skip to content

Commit

Permalink
Documentation fixes for v1.10
Browse files Browse the repository at this point in the history
  • Loading branch information
OkGoDoIt committed Dec 14, 2023
1 parent b8feb14 commit 2f2a50b
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 16 deletions.
3 changes: 3 additions & 0 deletions OpenAI_API/Audio/AudioRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

namespace OpenAI_API.Audio
{
/// <summary>
/// Parameters for requests made by the <see cref="TranscriptionEndpoint"/>.
/// </summary>
public class AudioRequest
{
/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions OpenAI_API/Audio/ITranscriptionEndpoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public interface ITranscriptionEndpoint
/// </summary>
/// <param name="audioStream">The stream containing audio data, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.</param>
/// <param name="filename">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.</param>
/// <param name="responseFormat">The format of the response. Suggested value are <see cref="AudioRequest.ResponseFormats.SRT"/> or <see cref="AudioRequest.ResponseFormats.VTT"/>. For text and Json formats, try <see cref="GetTranscriptionTextAsync(Stream, string, string, double?)"/> or <see cref="GetTranscriptionDetailsAsync(Stream, string, string, double?)"/> instead.</param>
/// <param name="responseFormat">The format of the response. Suggested value are <see cref="AudioRequest.ResponseFormats.SRT"/> or <see cref="AudioRequest.ResponseFormats.VTT"/>. For text and Json formats, try <see cref="GetTextAsync(Stream, string, string, string, double?)"/> or <see cref="GetWithDetailsAsync(Stream, string, string, string, double?)"/> instead.</param>
/// <param name="language">The language of the input audio. Supplying the input language in ISO-639-1 format will improve accuracy and latency.</param>
/// <param name="prompt">An optional text to guide the model's style or continue a previous audio segment. The prompt should match the audio language.</param>
/// <param name="temperature">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.</param>
Expand All @@ -29,7 +29,7 @@ public interface ITranscriptionEndpoint
/// Gets the transcription of the audio file, in the specified format
/// </summary>
/// <param name="audioFilePath">The local path to the audio file, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.</param>
/// <param name="responseFormat">The format of the response. Suggested value are <see cref="AudioRequest.ResponseFormats.SRT"/> or <see cref="AudioRequest.ResponseFormats.VTT"/>. For text and Json formats, try <see cref="GetTranscriptionTextAsync(Stream, string, string, double?)"/> or <see cref="GetTranscriptionDetailsAsync(Stream, string, string, double?)"/> instead.</param>
/// <param name="responseFormat">The format of the response. Suggested value are <see cref="AudioRequest.ResponseFormats.SRT"/> or <see cref="AudioRequest.ResponseFormats.VTT"/>. For text and Json formats, try <see cref="GetTextAsync(string, string, string, double?)"/> or <see cref="GetWithDetailsAsync(string, string, string, double?)"/> instead.</param>
/// <param name="language">The language of the input audio. Supplying the input language in ISO-639-1 format will improve accuracy and latency.</param>
/// <param name="prompt">An optional text to guide the model's style or continue a previous audio segment. The prompt should match the audio language.</param>
/// <param name="temperature">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.</param>
Expand Down
3 changes: 3 additions & 0 deletions OpenAI_API/Audio/TextToSpeechRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

namespace OpenAI_API.Audio
{
/// <summary>
/// A request to the <see cref="TextToSpeechEndpoint"/>.
/// </summary>
public class TextToSpeechRequest
{
/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions OpenAI_API/Audio/TranscriptionEndpoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public async Task<AudioResultVerbose> GetWithDetailsAsync(string audioFilePath,
/// </summary>
/// <param name="audioStream">The stream containing audio data, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.</param>
/// <param name="filename">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.</param>
/// <param name="responseFormat">The format of the response. Suggested value are <see cref="AudioRequest.ResponseFormats.SRT"/> or <see cref="AudioRequest.ResponseFormats.VTT"/>. For text and Json formats, try <see cref="GetTranscriptionTextAsync(Stream, string, string, double?)"/> or <see cref="GetTranscriptionDetailsAsync(Stream, string, string, double?)"/> instead.</param>
/// <param name="responseFormat">The format of the response. Suggested value are <see cref="AudioRequest.ResponseFormats.SRT"/> or <see cref="AudioRequest.ResponseFormats.VTT"/>. For text and Json formats, try <see cref="GetTextAsync(Stream, string, string, string, double?)"/> or <see cref="GetWithDetailsAsync(Stream, string, string, string, double?)"/> instead.</param>
/// <param name="language">The language of the input audio. Supplying the input language in ISO-639-1 format will improve accuracy and latency.</param>
/// <param name="prompt">An optional text to guide the model's style or continue a previous audio segment. The prompt should match the audio language.</param>
/// <param name="temperature">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.</param>
Expand Down Expand Up @@ -175,7 +175,7 @@ public async Task<string> GetAsFormatAsync(Stream audioStream, string filename,
/// Gets the transcription of the audio file, in the specified format
/// </summary>
/// <param name="audioFilePath">The local path to the audio file, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.</param>
/// <param name="responseFormat">The format of the response. Suggested value are <see cref="AudioRequest.ResponseFormats.SRT"/> or <see cref="AudioRequest.ResponseFormats.VTT"/>. For text and Json formats, try <see cref="GetTranscriptionTextAsync(Stream, string, string, double?)"/> or <see cref="GetTranscriptionDetailsAsync(Stream, string, string, double?)"/> instead.</param>
/// <param name="responseFormat">The format of the response. Suggested value are <see cref="AudioRequest.ResponseFormats.SRT"/> or <see cref="AudioRequest.ResponseFormats.VTT"/>. For text and Json formats, try <see cref="GetTextAsync(string, string, string, double?)"/> or <see cref="GetWithDetailsAsync(string, string, string, double?)"/> instead.</param>
/// <param name="language">The language of the input audio. Supplying the input language in ISO-639-1 format will improve accuracy and latency.</param>
/// <param name="prompt">An optional text to guide the model's style or continue a previous audio segment. The prompt should match the audio language.</param>
/// <param name="temperature">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.</param>
Expand Down
2 changes: 1 addition & 1 deletion OpenAI_API/Chat/Conversation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public Conversation(ChatEndpoint endpoint, OpenAI_API.Models.Model model = null,
}

/// <summary>
/// A list of messages exchanged so far. To append to this list, use <see cref="AppendMessage(ChatMessage)"/>, <see cref="AppendUserInput(string)"/>, <see cref="AppendSystemMessage(string)"/>, or <see cref="AppendExampleChatbotOutput(string)"/>.
/// A list of messages exchanged so far. To append to this list, use <see cref="AppendMessage(ChatMessage)"/>, <see cref="AppendUserInput(string, ChatMessage.ImageInput[])"/>, <see cref="AppendSystemMessage(string)"/>, or <see cref="AppendExampleChatbotOutput(string)"/>.
/// </summary>
public IList<ChatMessage> Messages { get => _Messages; }
private List<ChatMessage> _Messages;
Expand Down
1 change: 1 addition & 0 deletions OpenAI_API/Files/IFilesEndpoint.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Net.Http;

namespace OpenAI_API.Files
{
Expand Down
12 changes: 6 additions & 6 deletions OpenAI_API/OpenAI_API.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>OkGoDoIt (Roger Pincombe)</Authors>
<Product>OpenAI API</Product>
<Description>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.</Description>
<Description>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.</Description>
<Copyright>This library is licensed CC-0, in the public domain</Copyright>
<PackageLicenseExpression>CC0-1.0</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/OkGoDoIt/OpenAI-API-dotnet</PackageProjectUrl>
<RepositoryUrl>https://github.com/OkGoDoIt/OpenAI-API-dotnet</RepositoryUrl>
<PackageTags>OpenAI, AI, ML, API, ChatGPT, DALLE, GPT3, GPT-3, GPT4, GPT-4, DALL-E</PackageTags>
<PackageTags>OpenAI, AI, ML, API, ChatGPT, DALLE, GPT3, GPT-3, GPT4, GPT-4, DALL-E, Whisper, TTS</PackageTags>
<Title>OpenAI API</Title>
<PackageReleaseNotes>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.</PackageReleaseNotes>
<PackageReleaseNotes>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).</PackageReleaseNotes>
<PackageId>OpenAI</PackageId>
<Version>1.9</Version>
<AssemblyVersion>1.9.0.0</AssemblyVersion>
<FileVersion>1.9.0.0</FileVersion>
<Version>1.10</Version>
<AssemblyVersion>1.10.0.0</AssemblyVersion>
<FileVersion>1.10.0.0</FileVersion>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
<ProduceReferenceAssembly>True</ProduceReferenceAssembly>
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit 2f2a50b

Please sign in to comment.