openai/openai-dotnet

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
OpenAI_2.2.0-beta.2

Branches

Tags

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

Clone

HTTPS

Download ZIP

src/Custom/Assistants/AssistantModificationOptions.cs

45lines · modecode

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