File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed
frontend/src/components/experiment_dashboard Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import {
1717 ApiKeyType ,
1818 AgentPersonaType ,
1919 createAgentModelSettings ,
20+ DEFAULT_AGENT_PARTICIPANT_ID ,
2021} from '@deliberation-lab/utils' ;
2122
2223import { styles } from './cohort_settings_dialog.scss' ;
@@ -86,7 +87,7 @@ export class AgentParticipantDialog extends MobxLitElement {
8687 ) ;
8788 if ( this . cohort && this . model ) {
8889 this . experimentEditor . addAgentParticipant ( ) ;
89- this . agentId = '' ; //Make agent ID blank for agents added from cohort panel that use default prompts
90+ this . agentId = DEFAULT_AGENT_PARTICIPANT_ID ;
9091 const modelSettings = createAgentModelSettings ( {
9192 apiType : ApiKeyType . GEMINI_API_KEY ,
9293 modelName : this . model ,
Original file line number Diff line number Diff line change @@ -388,6 +388,10 @@ export async function getAgentParticipantPrompt(
388388 stageId : string ,
389389 agentId : string ,
390390) : Promise < ParticipantPromptConfig | null > {
391+ if ( ! agentId ) {
392+ return null ;
393+ }
394+
391395 const prompt = await app
392396 . firestore ( )
393397 . collection ( 'experiments' )
Original file line number Diff line number Diff line change @@ -179,6 +179,9 @@ export const DEFAULT_AGENT_MODEL_SETTINGS: AgentModelSettings = {
179179 modelName : DEFAULT_AGENT_API_MODEL ,
180180} ;
181181
182+ // Use this ID when defining agent participants in experiment dashboard
183+ export const DEFAULT_AGENT_PARTICIPANT_ID = '' ;
184+
182185// ************************************************************************* //
183186// FUNCTIONS //
184187// ************************************************************************* //
You can’t perform that action at this time.
0 commit comments