Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/open ai api improvements #36

Merged
merged 12 commits into from
Nov 9, 2023
Merged

Conversation

mirakst
Copy link
Collaborator

@mirakst mirakst commented Nov 8, 2023

  • Switched out OpenAiLlmClient implementation to use (unofficial) OpenAI package from nuget
  • Added the option to stream OpenAI API responses
  • Preserved ability to mock responses
  • Improved general stability of campaign page
  • Added component for displaying OpenAiGptMessages
  • Deleted any traces of original API testing page and food waste API client

Could re-add old OpenAiLlmClient and still use it for non-streamed requests. However, the nuget package works fine as well and I was able to do everything with it that I found necessary.

All files except ChatRPG.csproj are relevant for review.
This pull request closes #23

@mirakst mirakst added the enhancement New feature or request label Nov 8, 2023
@mirakst mirakst self-assigned this Nov 8, 2023
@mirakst mirakst linked an issue Nov 8, 2023 that may be closed by this pull request
Copy link
Owner

@KarmaKamikaze KarmaKamikaze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ser skide godt ud, Mikkel! Jeg har ikke lige kunne teste flowet ift. streaming af text fra APIen, men jeg har lagt lidt comments i mellemtiden.

ChatRPG/API/IOpenAiLlmClient.cs Outdated Show resolved Hide resolved
ChatRPG/ChatRPG.csproj Outdated Show resolved Hide resolved
ChatRPG/Pages/OpenAiGptMessageComponent.razor Outdated Show resolved Hide resolved
ChatRPG/ChatRPG.csproj Outdated Show resolved Hide resolved
ChatRPG/Pages/Campaign.razor Show resolved Hide resolved
ChatRPG/API/OpenAiLlmClient.cs Outdated Show resolved Hide resolved
ChatRPG/API/OpenAiLlmClient.cs Outdated Show resolved Hide resolved
ChatRPG/API/OpenAiLlmClient.cs Outdated Show resolved Hide resolved
ChatRPG/API/OpenAiLlmClient.cs Outdated Show resolved Hide resolved
ChatRPG/API/OpenAiLlmClient.cs Outdated Show resolved Hide resolved
Copy link
Collaborator

@damniko damniko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Har kun suggestions

ChatRPG/API/OpenAiLlmClient.cs Outdated Show resolved Hide resolved
ChatRPG/API/OpenAiLlmClient.cs Outdated Show resolved Hide resolved
ChatRPG/API/OpenAiLlmClient.cs Outdated Show resolved Hide resolved
ChatRPG/Pages/Campaign.razor Outdated Show resolved Hide resolved
Copy link
Owner

@KarmaKamikaze KarmaKamikaze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Efter var er blevet yeetet er der kommet en smule build warnings, som lige bør fixes inden merge.

ChatRPG/API/HttpMessageHandlerFactory.cs Outdated Show resolved Hide resolved
ChatRPG/Pages/Shared/_Layout.cshtml Outdated Show resolved Hide resolved
ChatRPG/Data/Models/Character.cs Outdated Show resolved Hide resolved
ChatRPG/Program.cs Outdated Show resolved Hide resolved
Copy link
Owner

@KarmaKamikaze KarmaKamikaze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Godt arbejde!

@mirakst mirakst merged commit 299b120 into dev Nov 9, 2023
3 checks passed
@KarmaKamikaze KarmaKamikaze deleted the feature/OpenAI_API_Improvements branch November 10, 2023 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

Feature - Streaming of OpenAI API requests
5 participants