Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com> Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
16 lines
331 B
TypeScript
16 lines
331 B
TypeScript
export function getResponseMetadata({
|
|
id,
|
|
model,
|
|
created,
|
|
}: {
|
|
id?: string | undefined | null;
|
|
created?: number | undefined | null;
|
|
model?: string | undefined | null;
|
|
}) {
|
|
return {
|
|
id: id ?? undefined,
|
|
modelId: model ?? undefined,
|
|
timestamp: created != null ? new Date(created * 1000) : undefined,
|
|
};
|
|
}
|