Skip to content

Commit 29a39c6

Browse files
author
Dhivya-Bharathy
committed
Reorganize models and providers structure - Move Kimi2 agents to models/kimi with kimi_ prefix - Move Grok4 agents to models/grok with grok_ prefix - Create 10 new Groq agents in models/groq with groq_ prefix - Add provider examples for OpenAI, Anthropic, Google, DeepSeek, Mistral, Cohere, xAI - Remove README files as requested
1 parent 42a4e09 commit 29a39c6

File tree

64 files changed

+575
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+575
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
"""
2+
Basic example of using Grok model in PraisonAI
3+
"""
4+
5+
from praisonai import PraisonAI
6+
7+
def main():
8+
# Initialize PraisonAI with Grok model
9+
praison = PraisonAI(
10+
model="grok",
11+
api_key="your-grok-api-key-here" # Replace with your actual Grok API key
12+
)
13+
14+
# Create a simple agent
15+
agent = praison.create_agent(
16+
name="Grok Agent",
17+
description="A basic agent using Grok model"
18+
)
19+
20+
# Example conversation
21+
response = agent.run("Hello! Can you explain quantum computing in simple terms?")
22+
print("Agent Response:", response)
23+
24+
# Example with mathematical reasoning
25+
math_task = """
26+
Solve this problem step by step:
27+
If a train travels at 60 mph for 2.5 hours, how far does it travel?
28+
"""
29+
30+
response = agent.run(math_task)
31+
print("\nMath Task Response:")
32+
print(response)
33+
34+
# Example with creative writing
35+
creative_task = """
36+
Write a short story about a robot learning to paint.
37+
Make it engaging and about 100 words.
38+
"""
39+
40+
response = agent.run(creative_task)
41+
print("\nCreative Task Response:")
42+
print(response)
43+
44+
if __name__ == "__main__":
45+
main()

0 commit comments

Comments
 (0)