Adds documentation and fixes

This commit is contained in:
2026-01-23 14:49:44 -03:00
parent 9eecd617b3
commit 4e9e18faea
6 changed files with 1058 additions and 7 deletions

View File

@@ -12,10 +12,12 @@ import uuid
import difflib
import re
from collections import Counter
import os
secrets=json.loads(secrets.get_secret())
langfuse = Langfuse(
public_key=json.loads(secrets.get_secret())['api-langfuse-public'],
secret_key=json.loads(secrets.get_secret())['api-langfuse-secret'],
host="http://3.218.244.68:3000"
public_key=secrets['api-langfuse-public'],
secret_key=secrets['api-langfuse-secret'],
host=os.environ["LANGFUSE_HOST"]
)
@tool
def out_of_scope_and_dont_know_answer():
@@ -277,7 +279,7 @@ Na prática, isso significa que o Comm.Pix monetiza o fluxo de pagamento, mas se
O Comm.Pix ganha nas taxas já embutidas no valor pago pelo cliente, e não do parceiro. Assim, o vendor opera sem custos diretos e com total transparência sobre o valor que vai receber.
<\general_info>
Answer the following questions as best you can, and use the """+language+"""language. You have access to the following tools:
Answer the following questions as best you can,and use the """+language+"""language. You have access to the following tools:
{tools}
@@ -289,12 +291,9 @@ Chat History:"""+str(history)
#input_message=[{"role":"user","content":"aluno superior, nunca recebi auxilio, campus são paulo, Meu pai não é registrado, como faço para ganhar auxilio?"}]
response=""
started=False
finished=False
firstspan=[]
for step in agent_executor.stream({"messages": input_message}, config, stream_mode="values"):
if not started:
with langfuse.start_as_current_span(name="my-operation") as span:
firstspan=span
span.score_trace(
name="Origem",
value=origem,