-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #135 from Samstar10/feat/ai-llm-implementation
Feat/ai llm implementation
- Loading branch information
Showing
11 changed files
with
159 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
packages/esm-ai-model-app/src/ai-model-action-button/ai-model-action-button.extension.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
packages/esm-ai-model-app/src/ai-model/ai-model-generated.workspace.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import React from "react"; | ||
import styles from './ai-model.scss' | ||
import PrimaryButton from "../components/primary-button.component"; | ||
|
||
const AIModelResponse: React.FC = () => { | ||
return ( | ||
<div className={styles.container}> | ||
<div className={styles.body}> | ||
<div className={styles.summary}> | ||
<p>This will be the final message to be sent to the client</p> | ||
</div> | ||
|
||
<div className={styles.actions}> | ||
<PrimaryButton>Send via SMS</PrimaryButton> | ||
<PrimaryButton>Send via Email</PrimaryButton> | ||
<PrimaryButton>Send via WhatsApp</PrimaryButton> | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
} | ||
|
||
export default AIModelResponse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
packages/esm-ai-model-app/src/components/feedback.component.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import React, { useState } from 'react'; | ||
import styles from '../ai-model/ai-model.scss' | ||
import { Tile, Dropdown } from '@carbon/react'; | ||
import { TextInput } from '@carbon/react'; | ||
|
||
interface FeedbackProps { | ||
title: string, | ||
} | ||
|
||
const Feedback: React.FC<FeedbackProps> = ({ title }) => { | ||
const [selectedItem, setSelectedItem] = useState(null); | ||
|
||
const items = [ | ||
{text: 'Dissatisfied with the response'}, | ||
{text: 'Missing information'}, | ||
{text: "Other"} | ||
] | ||
|
||
return ( | ||
<div> | ||
<Tile className={styles.feedback}> | ||
<h1 className={styles.title}>{title}</h1> | ||
<Dropdown | ||
items={items} | ||
itemToString={item => item ? item.text : ''} | ||
label="Select" | ||
onChange={({ selectedItem }) => setSelectedItem(selectedItem)} | ||
/> | ||
|
||
{selectedItem?.text === 'Other' && ( | ||
<TextInput | ||
placeholder="Type other reason here" | ||
/> | ||
)} | ||
</Tile> | ||
</div> | ||
) | ||
} | ||
|
||
export default Feedback |
23 changes: 23 additions & 0 deletions
23
packages/esm-ai-model-app/src/components/generated-response.component.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import React from 'react'; | ||
import { Tile } from '@carbon/react'; | ||
import styles from '../ai-model/ai-model.scss' | ||
import { Edit } from '@carbon/react/icons'; | ||
|
||
interface GeneratedResponseProps { | ||
toggleEditMode: () => void | ||
} | ||
|
||
const GeneratedResponse: React.FC<GeneratedResponseProps> = ({ toggleEditMode }) => { | ||
return ( | ||
<Tile> | ||
<div className={styles.generated}> | ||
This is the generated text from the LLM | ||
<div className={styles.editButton} onClick={toggleEditMode}> | ||
<Edit aria-label="Edit response" size={20} /> | ||
</div> | ||
</div> | ||
</Tile> | ||
) | ||
} | ||
|
||
export default GeneratedResponse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters