-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Expand file tree
/
Copy pathbasic_example.py
More file actions
22 lines (18 loc) · 746 Bytes
/
basic_example.py
File metadata and controls
22 lines (18 loc) · 746 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from praisonai import PraisonAI
import os
def basic_agent_example():
# Get the correct path to agents.yaml relative to the test file
current_dir = os.path.dirname(os.path.abspath(__file__))
agent_file_path = os.path.join(current_dir, "agents.yaml")
# For fast tests, we don't actually run the LLM calls
# Just verify that PraisonAI can be instantiated properly
try:
praisonai = PraisonAI(agent_file=agent_file_path)
# Return success without making actual API calls
return "Basic example setup completed successfully"
except Exception as e:
return f"Basic example failed during setup: {e}"
def main():
return basic_agent_example()
if __name__ == "__main__":
print(main())