-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
…ient component
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ import { | |
import { NAV_LINKS } from '$/app/(private)/_lib/constants' | ||
import BreadcrumbLink from '$/components/BreadcrumbLink' | ||
import { AppLayout } from '$/components/layouts' | ||
import providerApiKeyPresenter from '$/presenters/providerApiKeyPresenter' | ||
import { getCurrentUser } from '$/services/auth/getCurrentUser' | ||
import { ROUTES } from '$/services/routes' | ||
|
||
|
@@ -49,7 +50,7 @@ export default async function DocumentPage({ | |
<EvaluationTabSelector evaluation={evaluation} /> | ||
<div className='flex-grow'> | ||
<EvaluationEditor | ||
providerApiKeys={providerApiKeys} | ||
providerApiKeys={providerApiKeys.map(providerApiKeyPresenter)} | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
geclos
Author
Collaborator
|
||
evaluationUuid={evaluationUuid} | ||
defaultPrompt={evaluation.metadata.prompt} | ||
/> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -122,7 +122,12 @@ export default async function ConnectedEvaluationLayout({ | |
metadata.config.provider && | ||
typeof metadata.config.provider === 'string' | ||
) { | ||
provider = await getProviderApiKeyCached(metadata.config.provider) | ||
try { | ||
provider = await getProviderApiKeyCached(metadata.config.provider) | ||
} catch (error) { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
geclos
Author
Collaborator
|
||
// do nothing, it could be that the provider name does not match any | ||
// provider in the workspace | ||
} | ||
} | ||
} | ||
return ( | ||
|
Why this is not done inside
getProviderApiKeyCached
? The consumer shouldn't be concerned with this. Is like api endpoints and presenters in old world