Skip to content

Commit 109f5f8

Browse files
[azopenaiextensions] Of course, the streaming version can throttle as well. (Azure#23544)
* Of course, the streaming version can throttle as well. * The listing API depends on the "after this assistant" ID existing. I was just paging over the list of assistants randomly, and that is hazardous - now I always start with a known assistant ID (my own).
1 parent 50a2665 commit 109f5f8

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

sdk/ai/azopenaiextensions/client_assistants_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ func TestAssistants(t *testing.T) {
6161
// listing assistants
6262
{
6363
pager, err := assistantClient.List(context.Background(), openai.BetaAssistantListParams{
64+
After: openai.F(assistant.ID),
6465
Limit: openai.Int(1),
6566
})
6667
require.NoError(t, err)

sdk/ai/azopenaiextensions/client_chat_completions_extensions_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func TestChatExtensionsStreaming_extensions_bringYourOwnData(t *testing.T) {
8989
}
9090
}
9191

92-
require.NoError(t, streamer.Err())
92+
customRequireNoError(t, streamer.Err())
9393
require.NotEmpty(t, text)
9494

9595
t.Logf("Streaming content = %s", text)

0 commit comments

Comments
 (0)