diff --git a/sdk/ai/ai-projects/samples-dev/agents/file_search.ts b/sdk/ai/ai-projects/samples-dev/agents/file_search.ts index 3d490a9e248e..6a2a79c9dede 100644 --- a/sdk/ai/ai-projects/samples-dev/agents/file_search.ts +++ b/sdk/ai/ai-projects/samples-dev/agents/file_search.ts @@ -15,7 +15,7 @@ export async function main(): Promise { const client = AIProjectsClient.fromConnectionString(connectionString || "", new DefaultAzureCredential()); // Upload file - const localFileStream = fs.createReadStream("sample_file_for_upload.txt"); + const localFileStream = fs.createReadStream("./samples-dev/agents/sample_file_for_upload.txt"); const file = await client.agents.uploadFile(localFileStream, "assistants", "sample_file_for_upload.txt"); console.log(`Uploaded file, ID: ${file.id}`); diff --git a/sdk/ai/ai-projects/samples-dev/agents/sample_file_for_upload.txt b/sdk/ai/ai-projects/samples-dev/agents/sample_file_for_upload.txt new file mode 100644 index 000000000000..ab553b3304c1 --- /dev/null +++ b/sdk/ai/ai-projects/samples-dev/agents/sample_file_for_upload.txt @@ -0,0 +1 @@ +The word 'apple' uses the code 442345, while the word 'banana' uses the code 673457.