mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-02-04 08:41:49 +01:00
✨ Release v0.6.5 (#1391)
* ✨ Release v0.6.5
* fix(ci): use dynamic currentDateString
This commit is contained in:
parent
8d563d61f1
commit
5b28362282
8 changed files with 18 additions and 11 deletions
|
|
@ -569,8 +569,15 @@ describe('OpenAIClient', () => {
|
|||
|
||||
expect(getCompletion).toHaveBeenCalled();
|
||||
expect(getCompletion.mock.calls.length).toBe(1);
|
||||
|
||||
const currentDateString = new Date().toLocaleDateString('en-us', {
|
||||
year: 'numeric',
|
||||
month: 'long',
|
||||
day: 'numeric',
|
||||
});
|
||||
|
||||
expect(getCompletion.mock.calls[0][0]).toBe(
|
||||
'||>Instructions:\nYou are ChatGPT, a large language model trained by OpenAI. Respond conversationally.\nCurrent date: December 18, 2023\n\n||>User:\nHi mom!\n||>Assistant:\n',
|
||||
`||>Instructions:\nYou are ChatGPT, a large language model trained by OpenAI. Respond conversationally.\nCurrent date: ${currentDateString}\n\n||>User:\nHi mom!\n||>Assistant:\n`,
|
||||
);
|
||||
|
||||
expect(fetchEventSource).toHaveBeenCalled();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue