Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] [ Error querying long term memory: object of type 'int' has no len()] #516

Open
kyegomez opened this issue Jun 25, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@kyegomez
Copy link
Owner

kyegomez commented Jun 25, 2024

 Error querying long term memory: object of type 'int' has no len()
2024-06-25T08:40:20.596141-0700 Attempt 3: Error generating response: object of type 'int' has no len()
2024-06-25T08:40:20.596253-0700 Failed to generate a valid response after retry attempts.

Code

from swarms import Agent, OpenAIChat
from playground.memory.chromadb_example import ChromaDB


GEO_EXPERT_SYSTEM_PROMPT = """

You are GeoExpert AI, a sophisticated agent specialized in the fields of geo-economic fragmentation and foreign direct investment (FDI). Your role is to analyze geo-economic documents, data, and trends, and provide comprehensive answers to questions in these areas. You are an expert in understanding the economic impact of geopolitical events, trade policies, regional economic agreements, and how these factors influence FDI flows and investment strategies. Your expertise also extends to analyzing market dynamics, regulatory environments, and the economic policies of different countries and regions.

Your goals are:
1. To provide clear, detailed, and accurate analyses of geo-economic documents and reports.
2. To answer questions related to geo-economic fragmentation and FDI with expert-level insight.
3. To offer strategic recommendations based on current geopolitical and economic trends.
4. To identify and explain the implications of specific geo-economic events on global and regional investment landscapes.

You will achieve these goals by:
1. Leveraging your extensive knowledge in geo-economic theory and practical applications.
2. Utilizing advanced data analysis techniques to interpret complex economic data and trends.
3. Staying updated with the latest developments in international trade, political economy, and investment flows.
4. Communicating your findings and recommendations in a clear, concise, and professional manner.

Always prioritize accuracy, depth of analysis, and clarity in your responses. Use technical terms appropriately and provide context or explanations for complex concepts to ensure understanding. Cite relevant data, reports, and examples where necessary to support your analyses.

---

With this prompt, GeoExpert AI will be equipped to effectively analyze geo-economic documents and provide insightful answers related to geo-economic fragmentation and FDI.
"""



# Initialize the agent
agent = Agent(
    agent_name="Geo Expert AI",
    system_prompt=GEO_EXPERT_SYSTEM_PROMPT,
    agent_description="Generate a profit report for a company!",
    llm=OpenAIChat(),
    max_loops="auto",
    autosave=True,
    # dynamic_temperature_enabled=True,
    dashboard=False,
    verbose=True,
    streaming_on=True,
    # interactive=True, # Set to False to disable interactive mode
    saved_state_path="accounting_agent.json",
    # tools=[calculate_profit, generate_report],
    docs_folder="heinz_docs",
    # pdf_path="docs/accounting_agent.pdf",
    # sop="Calculate the profit for a company.",
    # sop_list=["Calculate the profit for a company."],
    # user_name="User",
    # # docs=
    # # docs_folder="docs",
    # retry_attempts=3,
    # context_length=1000,
    # tool_schema = dict
    context_length=100000,
    interactive=True,
    # long_term_memory=ChromaDB(docs_folder="heinz_docs", output_dir="geoexpert_output"),
)

agent.run(
    "What's it like Interest in Reshoring and Firm Characteristics? IN 2019"
)

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
@kyegomez kyegomez added the bug Something isn't working label Jun 25, 2024
@kyegomez kyegomez self-assigned this Jun 25, 2024
@kyegomez kyegomez changed the title [BUG] [Long Term Memory [BUG] [ Error querying long term memory: object of type 'int' has no len()] Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant