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

Feat: add clean logging for api routes #2928

Merged
merged 4 commits into from
Oct 27, 2024
Merged

Feat: add clean logging for api routes #2928

merged 4 commits into from
Oct 27, 2024

Conversation

pablodanswer
Copy link
Contributor

@pablodanswer pablodanswer commented Oct 26, 2024

Description

Logs now look like the following in API routes (unchanged for non multi tenant scenario or background/model server)

INFO:     10/26/2024 11:04:20 AM                    h11_impl.py  499: ::1:0 - "POST /chat/send-message HTTP/1.1" 200
DEBUG:    10/26/2024 11:04:20 AM                       utils.py  351: [t:f18c51e1] Using model object for gpt-4
INFO:     10/26/2024 11:04:20 AM                       utils.py  367: [t:f18c51e1] Max tokens for gpt-4: 8192 (from max_input_tokens)
DEBUG:    10/26/2024 11:04:21 AM             process_message.py  785: [t:f18c51e1] Reached end of stream
DEBUG:    10/26/2024 11:04:21 AM             process_message.py  851: [t:f18c51e1] Committing messages
INFO:     10/26/2024 11:04:21 AM                      timing.py   76: [t:f18c51e1] stream_chat_message took 0.6505191326141357 seconds

How Has This Been Tested?

[Describe the tests you ran to verify your changes]

Accepted Risk (provide if relevant)

N/A

Related Issue(s) (provide if relevant)

N/A

Mental Checklist:

  • All of the automated tests pass
  • All PR comments are addressed and marked resolved
  • If there are migrations, they have been rebased to latest main
  • If there are new dependencies, they are added to the requirements
  • If there are new environment variables, they are added to all of the deployment methods
  • If there are new APIs that don't require auth, they are added to PUBLIC_ENDPOINT_SPECS
  • Docker images build and basic functionalities work
  • Author has done a final read through of the PR right before merge

Backporting (check the box to trigger backport action)

Note: You have to check that the action passes, otherwise resolve the conflicts manually and tag the patches.

  • This PR should be backported (make sure to check that the backport attempt succeeds)

Copy link

vercel bot commented Oct 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
internal-search ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 27, 2024 5:04am

@pablodanswer pablodanswer added this pull request to the merge queue Oct 27, 2024
Merged via the queue into main with commit da3c5e3 Oct 27, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants