diff --git a/packages/chat-component/src/components/chat-component.ts b/packages/chat-component/src/components/chat-component.ts index 679a0ec5..29fdc862 100644 --- a/packages/chat-component/src/components/chat-component.ts +++ b/packages/chat-component/src/components/chat-component.ts @@ -70,6 +70,9 @@ export class ChatComponent extends LitElement { @property({ type: String, attribute: 'data-use-stream', converter: (value) => value?.toLowerCase() === 'true' }) useStream: boolean = chatHttpOptions.stream; + @property({ type: String, attribute: 'data-approach' }) + approach = requestOptions.approach; + @property({ type: String, attribute: 'data-overrides', converter: (value) => JSON.parse(value || '{}') }) overrides: RequestOverrides = {}; @@ -232,6 +235,7 @@ export class ChatComponent extends LitElement { await this.chatController.generateAnswer( { ...requestOptions, + approach: this.approach, overrides: { ...requestOptions.overrides, ...this.overrides, diff --git a/packages/webapp/src/pages/oneshot/OneShot.tsx b/packages/webapp/src/pages/oneshot/OneShot.tsx index b15de44d..68136ba0 100644 --- a/packages/webapp/src/pages/oneshot/OneShot.tsx +++ b/packages/webapp/src/pages/oneshot/OneShot.tsx @@ -22,7 +22,7 @@ import { toolTipText, toolTipTextCalloutProps } from '../../i18n/tooltips.js'; export function Component(): JSX.Element { const [isConfigPanelOpen, setIsConfigPanelOpen] = useState(false); - const [approach, setApproach] = useState(Approaches.RetrieveThenRead); + const [approach, setApproach] = useState(Approaches.ReadRetrieveRead); const [promptTemplate, setPromptTemplate] = useState(''); const [promptTemplatePrefix, setPromptTemplatePrefix] = useState(''); const [promptTemplateSuffix, setPromptTemplateSuffix] = useState(''); @@ -113,7 +113,7 @@ export function Component(): JSX.Element { data-interaction-model="ask" data-api-url={apiBaseUrl} data-use-stream="false" - data-approach="rrr" + data-approach={approach} data-overrides={JSON.stringify(overrides)} >