Spaces:
Running
Running
luanpoppe
commited on
Commit
·
fb553fb
1
Parent(s):
869c9f9
fix
Browse files
langchain_backend/utils.py
CHANGED
@@ -10,8 +10,6 @@ from langchain_huggingface import HuggingFaceEndpoint
|
|
10 |
|
11 |
os.environ.get("OPENAI_API_KEY")
|
12 |
os.environ.get("HUGGINGFACEHUB_API_TOKEN")
|
13 |
-
print('\n\n\n')
|
14 |
-
print(os.environ.get("HUGGINGFACEHUB_API_TOKEN"))
|
15 |
|
16 |
def getPDF(file_path="./nike.pdf"):
|
17 |
text_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=200)
|
@@ -36,6 +34,9 @@ def create_prompt_llm_chain(system_prompt, modelParam="gpt-4o-mini"):
|
|
36 |
if modelParam == "gpt-4o-mini":
|
37 |
model = ChatOpenAI(model=modelParam)
|
38 |
else:
|
|
|
|
|
|
|
39 |
|
40 |
model = HuggingFaceEndpoint(
|
41 |
repo_id=modelParam,
|
|
|
10 |
|
11 |
os.environ.get("OPENAI_API_KEY")
|
12 |
os.environ.get("HUGGINGFACEHUB_API_TOKEN")
|
|
|
|
|
13 |
|
14 |
def getPDF(file_path="./nike.pdf"):
|
15 |
text_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=200)
|
|
|
34 |
if modelParam == "gpt-4o-mini":
|
35 |
model = ChatOpenAI(model=modelParam)
|
36 |
else:
|
37 |
+
|
38 |
+
print('\n\n\n')
|
39 |
+
print(os.environ.get("HUGGINGFACEHUB_API_TOKEN"))
|
40 |
|
41 |
model = HuggingFaceEndpoint(
|
42 |
repo_id=modelParam,
|