Josh-XT / AGiXT

AGiXT is a dynamic AI Agent Automation Platform that seamlessly orchestrates instruction management and complex task execution across diverse AI providers. Combining adaptive memory, smart features, and a versatile plugin system, AGiXT delivers efficient and comprehensive AI solutions.
https://AGiXT.com
MIT License
2.63k stars 350 forks source link

Add tests for each file type on learn_file #1263

Closed Josh-XT closed 2 days ago

Josh-XT commented 5 days ago

Add tests for each file type on learn_file

Modify The Test Notebook to include a learn_file test for the missing file types. We will want to add the additional tests after Have the Agent Learn from a File. Note: This excludes images and plain-text files as they're already tested.

Example to download a CSV file and learn from it.

import requests

csv_url = "https://people.sc.fsu.edu/~jburkardt/data/csv/hurricanes.csv"
response = requests.get(csv_url)
# Save the file
learn_file_path = os.path.join(os.getcwd(), "hurricanes.csv")
with open(learn_file_path, "wb") as f:
    f.write(response.content)
learn_file_content = base64.b64encode(response.content).decode("utf-8")

file_learning = agixt.learn_file(
    agent_name=agent_name,
    file_name=learn_file_path,
    file_content=learn_file_content,
    collection_number="0",
)
birdup000 commented 2 days ago

1266 Pr is there but will add all those file types mentioned