Update localKB_construct.py
Browse files- localKB_construct.py +1 -4
localKB_construct.py
CHANGED
@@ -2,12 +2,10 @@
|
|
2 |
1.更新了llama-index的库。对应的函数名和用法都有所改变。
|
3 |
'''
|
4 |
|
5 |
-
# import gradio as gr
|
6 |
import openai
|
7 |
import requests
|
8 |
import csv
|
9 |
from llama_index import PromptHelper
|
10 |
-
# from llama_index import GPTSimpleVectorIndex ## renamed in the latest version.
|
11 |
from llama_index import LLMPredictor
|
12 |
from llama_index import ServiceContext
|
13 |
from langchain.chat_models import ChatOpenAI
|
@@ -16,7 +14,6 @@ from fastapi import FastAPI #* 实现流式数据
|
|
16 |
from fastapi.responses import StreamingResponse #* 实现流式数据
|
17 |
import sys
|
18 |
import os
|
19 |
-
import torch
|
20 |
import math
|
21 |
import pandas as pd
|
22 |
import numpy as np
|
@@ -31,7 +28,7 @@ from llama_index import download_loader
|
|
31 |
from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler
|
32 |
import sys
|
33 |
import os
|
34 |
-
|
35 |
|
36 |
## enironment settings.
|
37 |
os.environ["OPENAI_API_KEY"] = "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"
|
|
|
2 |
1.更新了llama-index的库。对应的函数名和用法都有所改变。
|
3 |
'''
|
4 |
|
|
|
5 |
import openai
|
6 |
import requests
|
7 |
import csv
|
8 |
from llama_index import PromptHelper
|
|
|
9 |
from llama_index import LLMPredictor
|
10 |
from llama_index import ServiceContext
|
11 |
from langchain.chat_models import ChatOpenAI
|
|
|
14 |
from fastapi.responses import StreamingResponse #* 实现流式数据
|
15 |
import sys
|
16 |
import os
|
|
|
17 |
import math
|
18 |
import pandas as pd
|
19 |
import numpy as np
|
|
|
28 |
from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler
|
29 |
import sys
|
30 |
import os
|
31 |
+
|
32 |
|
33 |
## enironment settings.
|
34 |
os.environ["OPENAI_API_KEY"] = "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"
|