Skip to content

Commit

Permalink
Fixed errors in Completion Service.
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisIvanov committed Jun 1, 2024
1 parent f16ad2e commit 587aa23
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/server/CookingApp/Services/OpenAI/Completions/Recipe.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public Recipe(IOpenAIService openAIService)
_openAIService = openAIService;
}

public async Task<T> CreateCompletion()
public async Task<string> CreateCompletion()
{
// var user = await _userManager.GetUser();
// var userAllergies = await _userSettings.Where(x => x.UserId == user.Id).Select(x => x.Allergies).ToListAsync();
Expand Down Expand Up @@ -82,8 +82,10 @@ public async Task<T> CreateCompletion()
});
if (completionResult.Successful)
{
Console.WriteLine(completionResult.Choices.First().Message.Content);
return completionResult.Choices.First().Message.Content;
}

return null;
}
}
}

0 comments on commit 587aa23

Please sign in to comment.