Skip to content

Commit

Permalink
🐛 fix: fix pull models error in new ai provider (lobehub#5441)
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx authored and gecsp committed Jan 22, 2025
1 parent cbdb25e commit c0bee04
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ export const LobeOpenAICompatibleFactory = <T extends Record<string, any> = any>

const toReleasedAt = () => {
if (!item.created) return;
dayjs.extend(utc);

// guarantee item.created in Date String format
if (
Expand All @@ -299,8 +300,6 @@ export const LobeOpenAICompatibleFactory = <T extends Record<string, any> = any>
const knownModel = LOBE_DEFAULT_MODEL_LIST.find((model) => model.id === item.id);

if (knownModel) {
dayjs.extend(utc);

const releasedAt = knownModel.releasedAt ?? toReleasedAt();

return { ...knownModel, releasedAt };
Expand Down

0 comments on commit c0bee04

Please sign in to comment.