Skip to content

Commit 7cdf35c

Browse files
authored
[OpenAI] [Assistants] update models used in samples/tests (Azure#29222)
### Packages impacted by this PR @azure/openai-assistants ### Issues associated with this PR Azure#29147 ### Describe the problem that is addressed by this PR outdated model in examples/tests ### What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen? ### Are there test cases added in this PR? _(If not, why?)_ ### Provide a list of related PRs _(if any)_ ### Command used to generate this PR:**_(Applicable only to SDK release request PRs)_ ### Checklists - [ ] Added impacted package name to the issue description - [ ] Does this PR needs any fixes in the SDK Generator?** _(If so, create an Issue in the [Autorest/typescript](https://github.com/Azure/autorest.typescript) repository and link it here)_ - [ ] Added a changelog (if necessary)
1 parent 29af61c commit 7cdf35c

File tree

5 files changed

+22
-4
lines changed

5 files changed

+22
-4
lines changed

sdk/openai/openai-assistants/samples/v1-beta/typescript/src/codeAssistant.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export async function main() {
1616
const assistantsClient = new AssistantsClient(new OpenAIKeyCredential(nonAzureKey));
1717

1818
const assistantResponse = await assistantsClient.assistants.createAssistant({
19-
model: "gpt-4-1106-preview",
19+
model: "gpt-4-0125-Preview",
2020
name: "JS Math Tutor",
2121
instructions: "You are a personal math tutor. Write and run code to answer math questions.",
2222
tools: [{ type: "code_interpreter" }],

sdk/openai/openai-assistants/samples/v1-beta/typescript/src/functionAssistant.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export async function main() {
104104
} as const;
105105

106106
const weatherAssistant = await assistantsClient.assistants.createAssistant({
107-
model: "gpt-4-1106-preview",
107+
model: "gpt-4-0125-Preview",
108108
name: "JS SDK Test Assistant - Weather",
109109
instructions: `You are a weather bot. Use the provided functions to help answer questions.
110110
Customize your responses to the user's preferences as much as possible and use friendly

sdk/openai/openai-assistants/samples/v1-beta/typescript/src/retrievalAssistant.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export async function main() {
2020
const uploadAssistantFile = await assistantsClient.files.uploadFile(uint8array, "assistants", { filename });
2121
console.log(uploadAssistantFile);
2222
const fileAssistantResponse = await assistantsClient.assistants.createAssistant({
23-
model: "gpt-4-1106-preview",
23+
model: "gpt-4-0125-Preview",
2424
name: "JS SDK Test Assistant - Retrieval",
2525
instructions: "Please address the user as Jane Doe. The user has a premium account.",
2626
tools: [{ type: "retrieval" }],

sdk/openai/openai-assistants/sources/customizations/models/models.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,24 @@ import {
1313
RunStatus,
1414
} from "../../generated/src/models/models.js";
1515

16+
/** The request details to use when creating a new assistant. */
17+
export interface AssistantCreationOptions {
18+
/** The ID of the model to use. (In Azure AI Studio, corresponds to "Deployment name") */
19+
model: string;
20+
/** The name of the new assistant. */
21+
name?: string | null;
22+
/** The description of the new assistant. */
23+
description?: string | null;
24+
/** The system instructions for the new assistant to use. */
25+
instructions?: string | null;
26+
/** The collection of tools to enable for the new assistant. */
27+
tools?: ToolDefinition[];
28+
/** A list of previously uploaded file IDs to attach to the assistant. */
29+
fileIds?: string[];
30+
/** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */
31+
metadata?: Record<string, string> | null;
32+
}
33+
1634
/** An abstract representation of a required action for an assistant thread run to continue. */
1735
export interface RequiredAction {
1836
/** the discriminator possible values: submit_tool_outputs */

sdk/openai/openai-assistants/src/models/models.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*/
1111
/** The request details to use when creating a new assistant. */
1212
export interface AssistantCreationOptions {
13-
/** The ID of the model to use. */
13+
/** The ID of the model to use. (In Azure AI Studio, corresponds to "Deployment name") */
1414
model: string;
1515
/** The name of the new assistant. */
1616
name?: string | null;

0 commit comments

Comments
 (0)