How to load customized tools like (pandas dataframe tools) to the LLM Compiler #176
Unanswered
GuillePardo
asked this question in
Q&A
Replies: 1 comment
-
Probably needs to update the prompt. The llm compilier prompt is a bit fragile (was devloped by academics for a specific llm context) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm testing the LLM compiler using dpandas tools but it's not working properly. This is the code for the tool I want to use :
#Crear agente de facturación que consultará los datos de facturación cargados como df_facturación
agent_facturacion = create_pandas_dataframe_agent(
ChatOpenAI(temperature=0, model="gpt-3.5-turbo-1106"),df_facturacion,verbose=True,agent_type=AgentType.OPENAI_FUNCTIONS)
In[6]:
Definición de la clase para tool facturación
class FacturacionQuery(BaseModel):
query: str = Field(
...,
title="Consulta",
description="La consulta específica sobre facturación, fechas de corte, novedades de ingreso o retiro de servicios."
)
In[19]:
Definición de la herramienta de facturación con esquema de argumentos correcto
tool_facturacion = Tool(
name="Sistema de Facturación",
func=agent_facturacion.run,
description="Útil cuando se desea consultar información de facturación como montos, fechas de corte, y novedades de ingreso y retiro de servicios.",
args_schema=FacturacionQuery,
return_direct=True
).
When I execute "example_question = "How much was billed to Mrs. Nuria Gil identified with Document Number 321617489 in September 2021?"
for task in planner.stream([HumanMessage(content=example_question)]):
print(task["tool"], task["args"])
print("---")" it prints : just "join ()
---" any help?
Beta Was this translation helpful? Give feedback.
All reactions