Skip to content

Commit

Permalink
upload system message
Browse files Browse the repository at this point in the history
  • Loading branch information
gulixin0922 committed Apr 24, 2024
1 parent a032917 commit b228e2f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
8 changes: 4 additions & 4 deletions src/bisheng-langchain/experimental/document_ie_v2/config.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"unstructured_api_url": "https://bisheng.dataelem.com/api/v1/etl4llm/predict",
"llm_model_name": "qwen1.5",
"llm_model_api_url": "http://34.87.129.78:9300/v1",
"server_type": "openai_api",
"llm_model_name": "qwen1.5-72b-chat",
"llm_model_api_url": "https://dashscope.aliyuncs.com/api/v1/services/aigc/text-generation/generation",
"server_type": "qwen_api",
"web_host": "192.168.106.20",
"web_port": "7118",
"web_port": 8118,
"api_port": 6118
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@
import os
import tempfile

from flask import Flask, Response, abort, request
from flask import Flask, Response, request
from llm_extract import LlmExtract, init_logger
from prompt import system_template
from tqdm import tqdm

logger = init_logger(__name__)


app = Flask(__name__)


Expand Down Expand Up @@ -44,7 +42,7 @@ def predict_one_pdf(self, pdf_path, schema, system_message=system_template, save
with open(save_llm_path, 'r') as f:
llm_kv_results = json.load(f)
else:
llm_kv_results = self.llm_client.predict(pdf_path, schema)
llm_kv_results = self.llm_client.predict(pdf_path, schema, system_message)

return llm_kv_results

Expand Down
3 changes: 1 addition & 2 deletions src/bisheng-langchain/experimental/document_ie_v2/run_web.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
unstructured_api_url = config['unstructured_api_url']
llm_model_name = config['llm_model_name']
llm_model_api_url = config['llm_model_api_url']

server_type = 'openai_api'
server_type = config['server_type']
web_host = config['web_host']
web_port = config['web_port']

Expand Down

0 comments on commit b228e2f

Please sign in to comment.