openai/openai-dotnet

Public

mirrored from https://github.com/openai/openai-dotnetAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
achandmsft-patch-1

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

src/Custom/Assistants/AssistantCreationOptions.cs

55lines · modecode

1using OpenAI.Chat;
2using System.Collections.Generic;
3using System.Diagnostics.CodeAnalysis;
4
5namespace OpenAI.Assistants;
6
7/// <summary>
8/// Represents additional options available when creating a new <see cref="Assistant"/>.
9/// </summary>
10[Experimental("OPENAI001")]
11[CodeGenType("CreateAssistantRequest")]
12[CodeGenSuppress(nameof(AssistantCreationOptions), typeof(string))]
13public partial class AssistantCreationOptions
14{
15 // CUSTOM: visibility hidden to promote required property to method parameter
16 internal string Model { get; set; }
17
18 /// <summary>
19 /// <para>
20 /// A list of tool enabled on the assistant.
21 /// </para>
22 /// There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.
23 /// </summary>
24 [CodeGenMember("Tools")]
25 public IList<ToolDefinition> Tools { get; } = new ChangeTrackingList<ToolDefinition>();
26
27 /// <inheritdoc cref="ToolResources"/>
28 [CodeGenMember("ToolResources")]
29 public ToolResources ToolResources { get; set; }
30
31 /// <inheritdoc cref="AssistantResponseFormat"/>
32 [CodeGenMember("ResponseFormat")]
33 public AssistantResponseFormat ResponseFormat { get; set; }
34
35 /// <summary>
36 /// 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.
37 ///
38 /// We generally recommend altering this or temperature but not both.
39 /// </summary>
40 [CodeGenMember("TopP")]
41 public float? NucleusSamplingFactor { get; set; }
42
43 // CUSTOM: Made internal.
44 [CodeGenMember("ReasoningEffort")]
45 internal ChatReasoningEffortLevel? ReasoningEffortLevel { get; set; }
46
47 /// <summary>
48 /// Creates a new instance of <see cref="AssistantCreationOptions"/>.
49 /// </summary>
50 public AssistantCreationOptions()
51 {
52 Metadata = new ChangeTrackingDictionary<string, string>();
53 Tools = new ChangeTrackingList<ToolDefinition>();
54 }
55}
56