Usage
This section provides examples for using AuxKnow.
Examples
Basic Mode
The basic mode sends a query to AuxKnow and retrieves a response.
from auxknow import AuxKnow
# Initialize the AuxKnow instance
auxknow = AuxKnow(
perplexity_api_key="your_api_key", # Required
openai_api_key="your_openai_api_key", # Required
verbose=True, # Optional, default: False
auto_prompt_augment=True, # Optional, default: False
auto_model_routing=True, # Optional, default: True
auto_query_restructuring=False, # Optional, default: False
enable_unibiased_reasoning=True, # Optional, default: True
performance_logging_enabled=False, # Optional, default: False
fast_mode=False # Optional, default: False
)
# Ask a question
response = auxknow.ask(
question="What is the theory of evolution?",
context="", # Optional context
deep_research=False, # Optional, enables in-depth research mode
fast_mode=False, # Optional, prioritizes speed over quality
enable_reasoning=False, # Optional, enables reasoning mode
for_citations=True # Optional, enables citation extraction
)
print("Answer:", response.answer)
print("Citations:", response.citations)Streaming Mode
The streaming mode allows you to receive responses in real-time as they are generated.
Context-Aware Sessions
AuxKnow allows you to create sessions to maintain conversation context.
Custom Configuration
You can customize AuxKnow's behavior by setting specific configurations.
Fast Mode
Fast Mode enables rapid responses by using the most efficient model and settings.
Deep Research Mode
Deep Research mode provides comprehensive, fact-driven responses suitable for:
Scientific Research
Legal & Compliance Queries
Business & Market Analysis
Historical & Geopolitical Analysis
Reasoning Mode
Reasoning mode provides logical and structured responses suitable for:
Analytical Problem Solving
Logical Explanations
Decision-Making Support
Citation Extraction
AuxKnow automatically extracts citations for responses:
Version Information
You can check the current version of AuxKnow:
NOTE:
Frame your queries as questions for better results
Deep Research mode is recommended for complex queries requiring detailed analysis
Fast mode overrides other settings for maximum speed
Reasoning mode provides logical and structured responses
Citations are automatically extracted when
for_citations=TrueUse sessions for maintaining context in conversational interactions
Last updated