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