2
0

(openai) Truncate messages sequence automatically if reaching token limit

This commit is contained in:
Baptiste Arnaud
2023-05-02 13:37:02 -04:00
parent 94735638a6
commit e58016e43a
6 changed files with 73 additions and 18 deletions

View File

@@ -17,7 +17,7 @@ export const useToast = () => {
}: Omit<ToastProps, 'onClose'>) => {
toast({
position: 'top-right',
duration: details ? null : undefined,
duration: details && status === 'error' ? null : undefined,
render: ({ onClose }) => (
<Toast
title={title}