Named after a Mesopotamian reputed to know the cures to many incurable diseases. This is an accelerator for combining natural language queries and FHIR queries to assist medical research.
This pull request includes changes to the ChatApp.Server project, primarily focusing on refactoring the chat service, updating the API endpoints, and modifying the models. The most significant changes include the removal of the Azure.AI.OpenAI package, refactoring the IChatCompletionService to IChatService, and the modification of the PostConversation method in Endpoints.Api.cs to use IChatService and include a ConversationRequest parameter.
src/ChatApp/ChatApp.Server/Endpoints.Api.cs: The PostConversation method now uses IChatService and includes a ConversationRequest parameter. The GetFrontEndSettings method was removed.
This pull request includes changes to the
ChatApp.Server
project, primarily focusing on refactoring the chat service, updating the API endpoints, and modifying the models. The most significant changes include the removal of theAzure.AI.OpenAI
package, refactoring theIChatCompletionService
toIChatService
, and the modification of thePostConversation
method inEndpoints.Api.cs
to useIChatService
and include aConversationRequest
parameter.Refactoring of the chat service:
src/ChatApp/ChatApp.Server/OpenAiExtensions.cs
: TheIChatCompletionService
was replaced withIChatService
in theAddOpenAiServices
method.src/ChatApp/ChatApp.Server/Services/ChatCompletionService.cs
: TheChatCompletionService
class now implementsIChatService
instead ofIChatCompletionService
. TheCompleteChat
method was updated to accept aMessage
array and return aChatCompletion
object. [1] [2]src/ChatApp/ChatApp.Server/Services/IChatService.cs
: The newIChatService
interface was created withCompleteChat
methods that accept either a string or aMessage
array.API endpoints and services updates:
src/ChatApp/ChatApp.Server/Endpoints.Api.cs
: ThePostConversation
method now usesIChatService
and includes aConversationRequest
parameter. TheGetFrontEndSettings
method was removed.src/ChatApp/ChatApp.Server/Endpoints.History.cs
: The API endpoints were updated to include the/history
prefix.src/ChatApp/ChatApp.Server/ChatApp.Server.csproj
: TheAzure.AI.OpenAI
package was removed.Models updates:
src/ChatApp/ChatApp.Server/Models/ChatCompletion.cs
: TheChatCompletionModel
class was renamed toChatCompletion
, and theMessageModel
class was replaced with theMessage
class. [1] [2]src/ChatApp/ChatApp.Server/Models/Conversation.cs
: TheConversation
class was updated to include aConversationRequest
class.src/ChatApp/ChatApp.Server/Models/Message.cs
: TheMessage
class was simplified to include only theId
,Role
,Content
, andDate
properties.