Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Ent Search] Update Playground copy #181951

Merged
merged 5 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export const Chat = () => {
{
id: uuidv4(),
role: MessageRole.system,
content: 'You can start chat now',
content: 'Welcome to Playground! Ask a question to get started.',
},
...transformFromChatMessages(messages),
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ export const ChatSidebar: React.FC<ChatSidebarProps> = ({ selectedIndicesCount }
{
id: useGeneratedHtmlId({ prefix: 'summarizationAccordion' }),
title: i18n.translate('xpack.searchPlayground.sidebar.summarizationTitle', {
defaultMessage: 'Summarization',
defaultMessage: 'Model settings',
}),
children: <SummarizationPanel />,
},
{
id: useGeneratedHtmlId({ prefix: 'sourcesAccordion' }),
title: i18n.translate('xpack.searchPlayground.sidebar.sourceTitle', {
defaultMessage: 'Sources',
defaultMessage: 'Indices',
}),
extraAction: !!selectedIndicesCount && (
<EuiText size="xs">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const EditContextAction: React.FC = () => {
<EuiButtonEmpty onClick={() => setShowFlyout(true)} disabled={selectedIndices?.length === 0}>
<FormattedMessage
id="xpack.searchPlayground.editContext.actionButtonLabel"
defaultMessage="Edit Context"
defaultMessage="Edit context"
/>
</EuiButtonEmpty>
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const EditContextFlyout: React.FC<EditContextFlyoutProps> = ({ onClose })
<h2>
<FormattedMessage
id="xpack.searchPlayground.editContext.flyout.title"
defaultMessage="Edit Context"
defaultMessage="Edit context"
/>
</h2>
</EuiTitle>
Expand All @@ -86,7 +86,7 @@ export const EditContextFlyout: React.FC<EditContextFlyoutProps> = ({ onClose })
<p>
<FormattedMessage
id="xpack.searchPlayground.editContext.flyout.description"
defaultMessage="Documents retrieved and selected fields will be used to build the context."
defaultMessage="Context is the information you provide to the LLM, by selecting fields from your Elasticsearch documents. Optimize context for better results."
leemthompo marked this conversation as resolved.
Show resolved Hide resolved
/>
</p>
</EuiText>
Expand All @@ -100,7 +100,7 @@ export const EditContextFlyout: React.FC<EditContextFlyoutProps> = ({ onClose })
prepend={i18n.translate(
'xpack.searchPlayground.editContext.flyout.docsRetrievedCount',
{
defaultMessage: 'Retrieved Documents',
defaultMessage: 'Retrieved documents',
}
)}
options={[
Expand All @@ -125,7 +125,7 @@ export const EditContextFlyout: React.FC<EditContextFlyoutProps> = ({ onClose })
<h5>
<FormattedMessage
id="xpack.searchPlayground.editContext.flyout.table.title"
defaultMessage="Selected Fields"
defaultMessage="Selected fields"
/>
</h5>
</EuiText>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export const RetrievalDocsFlyout: React.FC<RetrievalDocsFlyoutProps> = ({
<p>
{i18n.translate('xpack.searchPlayground.chat.message.assistant.retrievalDoc.subtitle', {
defaultMessage:
'The documents that were referenced in order to create an answer to your query. You can change the context field using the Edit Context button.',
'The documents that were referenced in order to create an answer to your query. You can change the context field using the Edit context button.',
})}
</p>
</EuiText>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ export const SetUpConnectorPanelForStartChat: React.FC = () => {
<>
<StartChatPanel
title={i18n.translate('xpack.searchPlayground.emptyPrompts.setUpConnector.title', {
defaultMessage: 'Set up a Gen AI connector',
defaultMessage: 'Connect to LLM',
})}
description={
<FormattedMessage
id="xpack.searchPlayground.emptyPrompts.setUpConnector.description"
defaultMessage="A large-language model is required to use a chat bot. Set up a connection to your LLM provider to continue."
defaultMessage="You need to connect to a large-language model to use this feature. Start by adding connection details for your LLM provider."
/>
}
>
Expand All @@ -70,7 +70,7 @@ export const SetUpConnectorPanelForStartChat: React.FC = () => {
>
<FormattedMessage
id="xpack.searchPlayground.emptyPrompts.setUpConnector.btn"
defaultMessage="Set up GenAI connector"
defaultMessage="Connect"
/>
</EuiButton>
</EuiFlexItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const AddIndicesField: React.FC<AddIndicesFieldProps> = ({
<EuiComboBox
singleSelection={{ asPlainText: true }}
placeholder={i18n.translate('xpack.searchPlayground.sources.addIndex.placeholder', {
defaultMessage: 'Select new data source',
defaultMessage: 'Search for index',
})}
async
isLoading={isLoading}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const CreateIndexCallout: React.FC = () => {
<p>
<FormattedMessage
id="xpack.searchPlayground.sources.createIndexCallout.description"
defaultMessage="You can not continue without having at least one index with data to search."
defaultMessage="You need at least one index with data to search. "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpik: Is the last space intentional?

/>
</p>
</EuiText>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ export const SourcesPanelForStartChat: React.FC = () => {
return (
<StartChatPanel
title={i18n.translate('xpack.searchPlayground.emptyPrompts.sources.title', {
defaultMessage: 'Select sources',
defaultMessage: 'Select indices',
})}
description={i18n.translate('xpack.searchPlayground.emptyPrompts.sources.description', {
defaultMessage: 'Where should the data for this chat experience be retrieved from?',
defaultMessage:
"Select the Elasticsearch indices you'd like to query, providing additional context for the LLM.",
})}
isValid={!!selectedIndices.length}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const SourcesPanelSidebar: React.FC = () => {
<EuiFlexItem>
<EuiCallOut
title={i18n.translate('xpack.searchPlayground.sources.callout', {
defaultMessage: 'Changes here will reset your custom query',
defaultMessage: 'Changes update the query used to search your data',
})}
iconType="warning"
size="s"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const InstructionsField: React.FC<InstructionsFieldProps> = ({ value, onC
<EuiToolTip
content={i18n.translate('xpack.searchPlayground.sidebar.instructionsField.help', {
defaultMessage:
'This is the instruction or question you want the AI to respond to. Be clear and specific for the best results.',
'These preliminary instructions and guidelines define the behavior of the model. Be clear and specific for the best results.',
})}
>
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {
EuiFlexItem,
EuiFormRow,
EuiIcon,
EuiIconTip,
EuiSuperSelect,
EuiText,
EuiToolTip,
Expand Down Expand Up @@ -102,13 +101,8 @@ export const SummarizationModel: React.FC<SummarizationModelProps> = ({
<>
<FormattedMessage
id="xpack.searchPlayground.sidebar.summarizationModel.label"
defaultMessage="Summarization Model"
defaultMessage="Model"
/>{' '}
<EuiIconTip
content={i18n.translate('xpack.searchPlayground.sidebar.summarizationModel.help', {
defaultMessage: 'The large language model used to summarize your documents.',
})}
/>
</>
}
labelAppend={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export const ViewCodeFlyout: React.FC<ViewCodeFlyoutProps> = ({ onClose }) => {
<h2>
<FormattedMessage
id="xpack.searchPlayground.viewCode.flyout.title"
defaultMessage="View Code"
defaultMessage="Application code"
/>
</h2>
</EuiTitle>
Expand All @@ -79,7 +79,7 @@ export const ViewCodeFlyout: React.FC<ViewCodeFlyoutProps> = ({ onClose }) => {
<p>
<FormattedMessage
id="xpack.searchPlayground.viewCode.flyout.subtitle"
defaultMessage="Copy the code into your app to use this. Modify the code as needed to fit your use case."
defaultMessage="Here's the code used to render this search experience. You can integrate it into your own application, modifying as needed."
/>
</p>
</EuiText>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const ViewQueryAction: React.FC = () => {
<EuiButtonEmpty onClick={() => setShowFlyout(true)} disabled={selectedIndices?.length === 0}>
<FormattedMessage
id="xpack.searchPlayground.viewQuery.actionButtonLabel"
defaultMessage="View Query"
defaultMessage="View query"
/>
</EuiButtonEmpty>
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export const ViewQueryFlyout: React.FC<ViewQueryFlyoutProps> = ({ onClose }) =>
<h2>
<FormattedMessage
id="xpack.searchPlayground.viewQuery.flyout.title"
defaultMessage="Customise your Elasticsearch Query"
defaultMessage="Customize your Elasticsearch query"
/>
</h2>
</EuiTitle>
Expand All @@ -92,8 +92,8 @@ export const ViewQueryFlyout: React.FC<ViewQueryFlyoutProps> = ({ onClose }) =>
<p>
<FormattedMessage
id="xpack.searchPlayground.viewQuery.flyout.description"
defaultMessage="The query that will be used to search your data. You can customise it by choosing which
fields to search on."
defaultMessage="This query will be used to search your indices. Customize by choosing which
fields in your Elasticsearch documents to search."
/>
</p>
</EuiText>
Expand All @@ -117,7 +117,7 @@ export const ViewQueryFlyout: React.FC<ViewQueryFlyoutProps> = ({ onClose }) =>
<h5>
<FormattedMessage
id="xpack.searchPlayground.viewQuery.flyout.table.title"
defaultMessage="Selected Fields"
defaultMessage="Fields to search (per index)"
/>
</h5>
</EuiText>
Expand Down