AI SDK v5 migration (#14549)
Co-authored-by: Félix Malfait <felix@twenty.com>
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import type { StreamEvent } from '../types/StreamEvent';
|
||||
|
||||
export const parseStreamLine = (line: string): StreamEvent | null => {
|
||||
try {
|
||||
return JSON.parse(line) as StreamEvent;
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user