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 Current Datetime to Assistants (v1/v2) #4952

Merged
merged 5 commits into from
Dec 11, 2024

Conversation

danny-avila
Copy link
Owner

Originally #4833

Summary

Please provide a brief summary of your changes and the related issue. Include any motivation and context that is relevant to your changes. If there are any dependencies necessary for your changes, please list them here.

Change Type

Please delete any irrelevant options.

  • New feature (non-breaking change which adds functionality)
  • Translation update

Testing

Using either OpenAI or Azure assistants (v1 or v2), ask "What is today's date and time without using any tools?". The request will either return that it doesn't know, or a date in 2023.
Open Assistant builder, tick the checkbox "Append current date and time" below the instructions, and ask the same question above. Now the assistant will return your client's date and time.
Should reporting the client time fail for any reason, it will fall back to the server time.

Test Configuration:

Checklist

Please delete any irrelevant options.

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have commented in any complex areas of my code
  • My changes do not introduce new warnings
  • Local unit tests pass with my changes

@danny-avila danny-avila merged commit 1dbe6ee into main Dec 11, 2024
4 checks passed
@danny-avila danny-avila deleted the feat/datetime-assistants branch December 11, 2024 20:26
Tsounguinzo pushed a commit to Tsounguinzo/LibreChat that referenced this pull request Dec 14, 2024
* Feature: Added ability to send current date and time to v1 and v2 assistants

* remove date_feature.patch

* fix: rename append_today_date to append_current_datetime

* feat: Refactor time handling in chatV1 and chatV2, add date and time utility functions

* fix: Add warning log and response for missing run values in abortRun middleware

---------

Co-authored-by: Max Sanna <[email protected]>
owengo pushed a commit to openwengo/LibreChat that referenced this pull request Dec 20, 2024
* Feature: Added ability to send current date and time to v1 and v2 assistants

* remove date_feature.patch

* fix: rename append_today_date to append_current_datetime

* feat: Refactor time handling in chatV1 and chatV2, add date and time utility functions

* fix: Add warning log and response for missing run values in abortRun middleware

---------

Co-authored-by: Max Sanna <[email protected]>
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