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/AssistantModificationOptions.cs

50lines · 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 modifying an existing <see cref="Assistant"/>.
9/// </summary>
10[Experimental("OPENAI001")]
11[CodeGenType("ModifyAssistantRequest")]
12public partial class AssistantModificationOptions
13{
14 /// <summary>
15 /// The replacement model that the assistant should use.
16 /// </summary>
17 public string Model { get; set; }
18
19 /// <summary>
20 /// <para>
21 /// A list of tool enabled on the assistant.
22 /// </para>
23 /// There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.
24 /// </summary>
25 [CodeGenMember("Tools")]
26 public IList<ToolDefinition> DefaultTools { get; } = new ChangeTrackingList<ToolDefinition>();
27
28 // CUSTOM: reuse common request/response models for tool resources. Note that modification operations use the
29 // response models (which do not contain resource initialization helpers).
30
31 /// <inheritdoc cref="ToolResources"/>
32 [CodeGenMember("ToolResources")]
33 public ToolResources ToolResources { get; set; }
34
35 /// <inheritdoc cref="AssistantResponseFormat"/>
36 [CodeGenMember("ResponseFormat")]
37 public AssistantResponseFormat ResponseFormat { get; set; }
38
39 /// <summary>
40 /// 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.
41 ///
42 /// We generally recommend altering this or temperature but not both.
43 /// </summary>
44 [CodeGenMember("TopP")]
45 public float? NucleusSamplingFactor { get; set; }
46
47 // CUSTOM: Made internal.
48 [CodeGenMember("ReasoningEffort")]
49 internal ChatReasoningEffortLevel? ReasoningEffortLevel { get; set; }
50}
51