Skip to content

Commit

Permalink
Fixing one of the tests to be less picky about the implementation det…
Browse files Browse the repository at this point in the history
…ails of a model
  • Loading branch information
Richard Park committed Jul 27, 2023
1 parent ff4e6cf commit 51c3e46
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sdk/ai/azopenai/custom_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,11 @@ func testGetCompletionsStream(t *testing.T, client *azopenai.Client, tv testVars
const want = "\n\nAzure OpenAI is a platform from Microsoft that provides access to OpenAI's artificial intelligence (AI) technologies. It enables developers to build, train, and deploy AI models in the cloud. Azure OpenAI provides access to OpenAI's powerful AI technologies, such as GPT-3, which can be used to create natural language processing (NLP) applications, computer vision models, and reinforcement learning models."

require.Equal(t, want, got)
require.Equal(t, 86, eventCount)

// there's no strict requirement of how the response is streamed so just
// choosing something that's reasonable but will be lower than typical usage
// (which is usually somewhere around the 80s).
require.GreaterOrEqual(t, eventCount, 50)
}

func TestClient_GetCompletions_Error(t *testing.T) {
Expand Down

0 comments on commit 51c3e46

Please sign in to comment.