This repository was archived by the owner on Jun 5, 2025. It is now read-only.
Record the output of the LLM in the DB#165
Merged
aponcedeleonch merged 1 commit intomainfrom Dec 3, 2024
Merged
Conversation
53c1cdd to
4d573ae
Compare
We are going to store the complete output of the LLMs. - If the response was stream then a list of JSON objects will get stored. - If not stream then a single JSON object will get stored. The PR also changes the initial schema. The schema will now also store the complete input request to the LLM. Storing the complete input and output should help debug any problem with CodeGate as well as reproduce faithfully in the dashboard all the conversations.
4d573ae to
b0fe051
Compare
jhrozek
reviewed
Dec 3, 2024
| logger.warning("No user prompt found in request.") | ||
| return None | ||
| request_str = None | ||
| if isinstance(normalized_request, BaseModel): |
Contributor
There was a problem hiding this comment.
With the normalizing one of the things I was hoping for was that we can stop guessing and branching. Do we need this isinstance?
Member
Author
There was a problem hiding this comment.
That's true! I guess I'm just too used to not rely on Python and always expect that something wild will appear in your function. I will test and remove on another PR
jhrozek
approved these changes
Dec 3, 2024
Contributor
jhrozek
left a comment
There was a problem hiding this comment.
I had one question about the normalizing but feel free to proceed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We are going to store the complete output of the LLMs.
The PR also changes the initial schema. The schema will now also store the complete input request to the LLM.
Storing the complete input and output should help debug any problem with CodeGate as well as reproduce faithfully in the dashboard all the conversations.