Spaces:
Running
Running
luanpoppe
commited on
Commit
·
7d2e972
1
Parent(s):
480b14d
fix: adicionando print
Browse files- langchain_backend/main.py +1 -0
- langchain_backend/utils.py +1 -0
langchain_backend/main.py
CHANGED
@@ -5,6 +5,7 @@ from langchain.chains import create_retrieval_chain
|
|
5 |
os.environ.get("OPENAI_API_KEY")
|
6 |
|
7 |
def get_llm_answer(system_prompt, user_prompt, pdf_url, model):
|
|
|
8 |
pages = None
|
9 |
if pdf_url:
|
10 |
pages = getPDF(pdf_url)
|
|
|
5 |
os.environ.get("OPENAI_API_KEY")
|
6 |
|
7 |
def get_llm_answer(system_prompt, user_prompt, pdf_url, model):
|
8 |
+
print('model: ', model)
|
9 |
pages = None
|
10 |
if pdf_url:
|
11 |
pages = getPDF(pdf_url)
|
langchain_backend/utils.py
CHANGED
@@ -29,6 +29,7 @@ def create_retriever(documents):
|
|
29 |
return retriever
|
30 |
|
31 |
def create_prompt_llm_chain(system_prompt, model="gpt-4o-mini"):
|
|
|
32 |
model = ChatOpenAI(model=model)
|
33 |
|
34 |
system_prompt = system_prompt + "\n\n" + "{context}"
|
|
|
29 |
return retriever
|
30 |
|
31 |
def create_prompt_llm_chain(system_prompt, model="gpt-4o-mini"):
|
32 |
+
print('model: ', model)
|
33 |
model = ChatOpenAI(model=model)
|
34 |
|
35 |
system_prompt = system_prompt + "\n\n" + "{context}"
|