Next-Gen Solutions for LLM Application Development
TaskingAI delivers an agent framework with cloud hosting and an intuitive console, perfect for developers to efficiently build flexible LLM applications.
Sleek Console
Manage your agents via the intuitive console and troubleshoot in the playground
Comprehensive Client SDK
REST API, Python SDK, OpenAI compatible API, and more in the future
Abundant Integration
Integrate with leading LLM and plugin providers to ensure broad compatibility
Simplified Operation
Monitor agent performance via message history and log analysis
Examples to Get Started
Explore practical examples to rapidly learn Agent development and smoothly get started with your TaskingAI projects.
from openai import OpenAI
# Initialize OpenAI client with TaskingAI's server address and API Key
client = OpenAI(
api_key="YOUR_TASKINGAI_API_KEY",
base_url="https://oapi.tasking.ai/v1",
)
# Chat with your model or assistant
response = client.chat.completions.create(
model="YOUR_TASKINGAI_ASSISTANT_ID",
messages=[
{"role": "user", "content": "How to build agents with TaskingAI?"},
],
)
import taskingai
taskingai.init("YOUR_API_KEY") # Replace with your real values
# Replace with your real assistant info
assistant_id = "YOUR_ASSISTANT_ID"
chat_id = "YOUR_CHAT_ID"
# Send the first user message
user_message = taskingai.assistant.create_message(
assistant_id=assistant_id,
chat_id=chat_id,
text="How to build agents with TaskingAI?",
)
# Generate response
assistant_message = taskingai.assistant.generate_message(
assistant_id=assistant_id,
chat_id=chat_id
)
# Sending a new user message, with the conversation context kept
user_message_2 = taskingai.assistant.create_message(
assistant_id=assistant_id,
chat_id=chat_id,
text="Thank you. Please write an itemized list of its features",
)
import taskingai
taskingai.init("YOUR_API_KEY") # Replace with your real values
# Use taskingai.retrieval.list_collections or get_collection to get your collections
collection_id = "YOUR_COLLECTION_ID"
# Create a new record for wikipedia page: History of Earth
record: Record = taskingai.retrieval.create_record(
collection_id=collection_id,
type="web",
url="https://en.wikipedia.org/wiki/History_of_Earth",
text_splitter={"type": "token", "chunk_size": 200, "chunk_overlap": 20),
)
# Query for chunks using semantic search
chunks = taskingai.retrieval.query_chunks(
collection_id=collection_id,
query_text="dinosaurs",
top_k=3,
)