openai/openai-dotnet

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
OpenAI_2.2.0

Branches

Tags

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

Clone

HTTPS

Download ZIP

src/Custom/Assistants/AssistantModificationOptions.cs

53lines · modecode

1using OpenAI.Chat;
2using System.ClientModel;
3using System.Collections.Generic;
4using System.Diagnostics.CodeAnalysis;
5
6namespace OpenAI.Assistants;
7
8/// <summary>
9/// Represents additional options available when modifying an existing <see cref="Assistant"/>.
10/// </summary>
11[Experimental("OPENAI001")]
12[CodeGenType("ModifyAssistantRequest")]
13public partial class AssistantModificationOptions
14{
15 /// <summary>
16 /// The replacement model that the assistant should use.
17 /// </summary>
18 public 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> DefaultTools { get; }
28
29 // CUSTOM: reuse common request/response models for tool resources. Note that modification operations use the
30 // response models (which do not contain resource initialization helpers).
31
32 /// <inheritdoc cref="ToolResources"/>
33 [CodeGenMember("ToolResources")]
34 public ToolResources ToolResources { get; set; }
35
36 /// <inheritdoc cref="AssistantResponseFormat"/>
37 [CodeGenMember("ResponseFormat")]
38 public AssistantResponseFormat ResponseFormat { get; set; }
39
40 /// <summary>
41 /// 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.
42 ///
43 /// We generally recommend altering this or temperature but not both.
44 /// </summary>
45 [CodeGenMember("TopP")]
46 public float? NucleusSamplingFactor { get; set; }
47
48 // CUSTOM: Made internal.
49 [CodeGenMember("ReasoningEffort")]
50 internal ChatReasoningEffortLevel? ReasoningEffortLevel { get; set; }
51
52 internal BinaryContent ToBinaryContent() => BinaryContent.Create(this, ModelSerializationExtensions.WireOptions);
53}
54