julep-ai / julep

A new DSL and server for AI agents and multi-step tasks
https://julep.ai
Apache License 2.0
2.57k stars 906 forks source link

[Bug]: adding stlib call in the prompt step #661

Closed Vedantsahai18 closed 1 week ago

Vedantsahai18 commented 2 weeks ago

📜 Description

Currently the prompt step doesn't support calling of the stdlib calls. Instead we have to define a separate evaluate step to get the stdlib functionalities and then [ass it as a variable in the prompt step.

👟 Reproduction steps


- prompt: 
  - role: system
    content: >-
        You are a highly capable financial assistant named FinanceGPT. Your purpose is to provide insightful and concise analysis to help users make informed financial decisions.

        When a user asks a question, follow these steps:
        1. Identify the relevant financial data needed to answer the query.
        2. Use the available tools to retrieve the necessary data, such as stock financials, news, or aggregate data.
        3. Analyze the retrieved data and any generated charts to extract key insights and trends.
        4. Formulate a concise response that directly addresses the user's question, focusing on the most important findings from your analysis.

        Remember:
        - Today's date is {{datetime.datetime.now().isoformat()}}.
        - Avoid simply regurgitating the raw data from the tools. Instead, provide a thoughtful interpretation and summary.
        - If the query cannot be satisfactorily answered using the available tools, kindly inform the user and suggest alternative resources or information they may need.

        Your ultimate goal is to empower users with clear, actionable insights to navigate the financial landscape effectively.

        Remember your goal is to answer the users query and provide a clear, actionable answer.            

👍 Expected behavior

The prompt step failed

"message": "'datetime' is undefined",

👎 Actual Behavior with Screenshots

No response

💻 Operating system

None

What browsers are you seeing the problem on?

No response

📃 Provide any additional context for the Bug.

No response

📖 Relevant log output

No response

👀 Have you spent some time to check if this bug has been raised before?

🔗 Are you willing to submit PR?

None

🧑‍⚖️ Code of Conduct

NikhilKalloli commented 1 week ago

Hey @Vedantsahai18 can you give some more details about the changes? Which files are supposed to be reffered here ?

Vedantsahai18 commented 1 week ago

Solved