openai/openai-dotnet
Publicmirrored from https://github.com/openai/openai-dotnetAvailable
src/Custom/Assistants/AssistantCreationOptions.cs
50lines · modecode
| 1 | using OpenAI.Chat; |
| 2 | using System.ClientModel; |
| 3 | using System.Collections.Generic; |
| 4 | using System.Diagnostics.CodeAnalysis; |
| 5 | |
| 6 | namespace OpenAI.Assistants; |
| 7 | |
| 8 | /// <summary> |
| 9 | /// Represents additional options available when creating a new <see cref="Assistant"/>. |
| 10 | /// </summary> |
| 11 | [Experimental("OPENAI001")] |
| 12 | [CodeGenType("CreateAssistantRequest")] |
| 13 | [CodeGenVisibility(nameof(AssistantCreationOptions), CodeGenVisibility.Public)] |
| 14 | [CodeGenSuppress(nameof(AssistantCreationOptions), typeof(string))] |
| 15 | public partial class AssistantCreationOptions |
| 16 | { |
| 17 | // CUSTOM: visibility hidden to promote required property to method parameter |
| 18 | internal string Model { get; set; } |
| 19 | |
| 20 | /// <summary> |
| 21 | /// <para> |
| 22 | /// A list of tool enabled on the assistant. |
| 23 | /// </para> |
| 24 | /// There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`. |
| 25 | /// </summary> |
| 26 | [CodeGenMember("Tools")] |
| 27 | public IList<ToolDefinition> Tools { get; } |
| 28 | |
| 29 | /// <inheritdoc cref="ToolResources"/> |
| 30 | [CodeGenMember("ToolResources")] |
| 31 | public ToolResources ToolResources { get; set; } |
| 32 | |
| 33 | /// <inheritdoc cref="AssistantResponseFormat"/> |
| 34 | [CodeGenMember("ResponseFormat")] |
| 35 | public AssistantResponseFormat ResponseFormat { get; set; } |
| 36 | |
| 37 | /// <summary> |
| 38 | /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. |
| 39 | /// |
| 40 | /// We generally recommend altering this or temperature but not both. |
| 41 | /// </summary> |
| 42 | [CodeGenMember("TopP")] |
| 43 | public float? NucleusSamplingFactor { get; set; } |
| 44 | |
| 45 | // CUSTOM: Made internal. |
| 46 | [CodeGenMember("ReasoningEffort")] |
| 47 | internal ChatReasoningEffortLevel? ReasoningEffortLevel { get; set; } |
| 48 | |
| 49 | internal BinaryContent ToBinaryContent() => BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); |
| 50 | } |
| 51 | |