mirror of
https://github.com/ItzCrazyKns/Perplexica.git
synced 2025-10-14 03:28:14 +00:00
feat(app): lint & beautify
This commit is contained in:
@@ -67,7 +67,9 @@ class MetaSearchAgent implements MetaSearchAgentType {
|
||||
ChatPromptTemplate.fromMessages([
|
||||
['system', this.config.queryGeneratorPrompt],
|
||||
...this.config.queryGeneratorFewShots,
|
||||
['user', `
|
||||
[
|
||||
'user',
|
||||
`
|
||||
<conversation>
|
||||
{chat_history}
|
||||
</conversation>
|
||||
@@ -75,7 +77,8 @@ class MetaSearchAgent implements MetaSearchAgentType {
|
||||
<query>
|
||||
{query}
|
||||
</query>
|
||||
`]
|
||||
`,
|
||||
],
|
||||
]),
|
||||
llm,
|
||||
this.strParser,
|
||||
@@ -87,9 +90,9 @@ class MetaSearchAgent implements MetaSearchAgentType {
|
||||
const questionOutputParser = new LineOutputParser({
|
||||
key: 'question',
|
||||
});
|
||||
|
||||
|
||||
const links = await linksOutputParser.parse(input);
|
||||
let question = await questionOutputParser.parse(input) ?? input;
|
||||
let question = (await questionOutputParser.parse(input)) ?? input;
|
||||
|
||||
if (question === 'not_needed') {
|
||||
return { query: '', docs: [] };
|
||||
|
Reference in New Issue
Block a user