fix(formatMessages): Conform Name Property to OpenAI Expected Regex (#1076)

* fix(formatMessages): conform name property to OpenAI expected regex

* fix(ci): prior test was expecting non-sanitized name input
This commit is contained in:
Danny Avila 2023-10-19 10:02:20 -04:00 committed by GitHub
parent fd99bac121
commit abbc57a49a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 41 additions and 1 deletions

View file

@ -221,7 +221,7 @@ describe('OpenAIClient', () => {
isChatCompletion: true,
});
const hasUserWithName = result.prompt.some(
(item) => item.role === 'user' && item.name === 'Test User',
(item) => item.role === 'user' && item.name === 'Test_User',
);
expect(hasUserWithName).toBe(true);
});