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)
|
||||
|
||||
@@ -147,8 +147,6 @@ func (s *OllamaService) PullModel(ctx context.Context, modelName string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
logger.GetLogger(ctx).Infof("Pulling model %s...", modelName)
|
||||
|
||||
// Use official client to pull model
|
||||
pullReq := &api.PullRequest{
|
||||
Name: modelName,
|
||||
|
||||
Reference in New Issue
Block a user