mirror of
https://github.com/ItzCrazyKns/Perplexica.git
synced 2025-08-03 14:28:40 +00:00
Compare commits
3 Commits
7052fc74d1
...
3609f9a9fb
Author | SHA1 | Date | |
---|---|---|---|
3609f9a9fb | |||
f37686189e | |||
4e56cccea5 |
@ -29,6 +29,15 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- perplexica-network
|
- perplexica-network
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
develop:
|
||||||
|
watch:
|
||||||
|
- action: sync
|
||||||
|
path: ./backend
|
||||||
|
target: /home/perplexica
|
||||||
|
ignore:
|
||||||
|
- node_modules/
|
||||||
|
- action: rebuild
|
||||||
|
path: backend.dockerfile
|
||||||
|
|
||||||
perplexica-frontend:
|
perplexica-frontend:
|
||||||
build:
|
build:
|
||||||
@ -45,6 +54,16 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- perplexica-network
|
- perplexica-network
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
develop:
|
||||||
|
watch:
|
||||||
|
- action: sync
|
||||||
|
path: ./frontend
|
||||||
|
target: /app
|
||||||
|
ignore:
|
||||||
|
- node_modules/
|
||||||
|
- .next/
|
||||||
|
- action: rebuild
|
||||||
|
path: app.dockerfile
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
perplexica-network:
|
perplexica-network:
|
||||||
|
@ -19,6 +19,8 @@ class LineOutputParser extends BaseOutputParser<string> {
|
|||||||
lc_namespace = ['langchain', 'output_parsers', 'line_output_parser'];
|
lc_namespace = ['langchain', 'output_parsers', 'line_output_parser'];
|
||||||
|
|
||||||
async parse(text: string): Promise<string> {
|
async parse(text: string): Promise<string> {
|
||||||
|
text = text.trim() || '';
|
||||||
|
|
||||||
const regex = /^(\s*(-|\*|\d+\.\s|\d+\)\s|\u2022)\s*)+/;
|
const regex = /^(\s*(-|\*|\d+\.\s|\d+\)\s|\u2022)\s*)+/;
|
||||||
const startKeyIndex = text.indexOf(`<${this.key}>`);
|
const startKeyIndex = text.indexOf(`<${this.key}>`);
|
||||||
const endKeyIndex = text.indexOf(`</${this.key}>`);
|
const endKeyIndex = text.indexOf(`</${this.key}>`);
|
||||||
|
@ -19,11 +19,13 @@ class LineListOutputParser extends BaseOutputParser<string[]> {
|
|||||||
lc_namespace = ['langchain', 'output_parsers', 'line_list_output_parser'];
|
lc_namespace = ['langchain', 'output_parsers', 'line_list_output_parser'];
|
||||||
|
|
||||||
async parse(text: string): Promise<string[]> {
|
async parse(text: string): Promise<string[]> {
|
||||||
|
text = text.trim() || '';
|
||||||
|
|
||||||
const regex = /^(\s*(-|\*|\d+\.\s|\d+\)\s|\u2022)\s*)+/;
|
const regex = /^(\s*(-|\*|\d+\.\s|\d+\)\s|\u2022)\s*)+/;
|
||||||
const startKeyIndex = text.indexOf(`<${this.key}>`);
|
const startKeyIndex = text.indexOf(`<${this.key}>`);
|
||||||
const endKeyIndex = text.indexOf(`</${this.key}>`);
|
const endKeyIndex = text.indexOf(`</${this.key}>`);
|
||||||
|
|
||||||
if (startKeyIndex === -1 && endKeyIndex === -1) {
|
if (startKeyIndex === -1 || endKeyIndex === -1) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user