Skip to content

Commit

Permalink
Merge pull request #122 from OlibhiaGhosh/feat_1
Browse files Browse the repository at this point in the history
[fix]: Removed the `askQuestion` function
  • Loading branch information
shivay-at-pieces committed Jun 5, 2024
2 parents 06f9522 + 5cfc8ac commit 15cf8cd
Showing 1 changed file with 0 additions and 37 deletions.
37 changes: 0 additions & 37 deletions src/app/components/Copilot/Copilot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,43 +74,6 @@ export function createNewConversation() {
// // GlobalConversationAnswers = [..._answers];
// })
// }

export async function askQuestion({
query,
relevant,
}: {
query: string;
relevant: string;
}) {
// TODO: need to get instance here - current config is stored in app.tsx (maybe not actually)
// const config = ConnectorSingleton.getInstance();
const params: Pieces.QGPTQuestionInput = {
query,
relevant: {
iterable: [
{
seed: {
type: Pieces.SeedTypeEnum.Asset,
asset: {
application: applicationData,
format: {
fragment: {
string: {
raw: relevant,
},
},
},
},
},
},
],
},
};
// const result = await Pieces.QGPTApi.question({qGPTQuestionInput: params});
const result = new Pieces.QGPTApi().question({qGPTQuestionInput: params});
return {result, query};
}

export function CopilotChat(): React.JSX.Element {
const [chatSelected, setChatSelected] = useState('-- no chat selected --');
const [chatInputData, setData] = useState('');
Expand Down

0 comments on commit 15cf8cd

Please sign in to comment.