refactor: Improve Elasticsearch query construction and error handling
This commit is contained in:
@@ -110,6 +110,7 @@ func TestRemoteAPIChat(t *testing.T) {
|
||||
t.Run("Basic Chat", func(t *testing.T) {
|
||||
response, err := chat.Chat(ctx, testMessages, testOptions)
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, response, "response should not be nil")
|
||||
assert.NotEmpty(t, response.Content)
|
||||
assert.Greater(t, response.Usage.TotalTokens, 0)
|
||||
assert.Greater(t, response.Usage.PromptTokens, 0)
|
||||
|
||||
Reference in New Issue
Block a user