Skip to content

Quick Start

Here we will take you to quickly get started with Memnetai

Basic Package Usage

TIP

We provide a very easy-to-extend basic Python SDK, but you may need some programming knowledge to use it.
If you have a relatively weak programming foundation, we have built an enhanced client based on the basic Python SDK that you can use directly.

Get Started:

Enhanced Client Code Example

python
pip install memnetai-python-sdk
python
`python
from memnetai import MemNetAIClientPlus
from memnetai import OpenAIConfig

# Configuration parameters
config = OpenAIConfig(
    # MemNet AI configuration
    memnetai_api_key="your_memnet_api_key",
    memory_agent_name="my_agent",
    namespace="my_app",
    
    # OpenAI configuration
    base_url="https://api.openai.com/v1",
    api_key="your_openai_api_key",
    model_name="gpt-3.5-turbo",
    temperature=0.7,
    max_tokens=1000,
    
    # Conversation window configuration
    window_size=64
)

# Create client
client = MemNetAIClientPlus(config)

try:
    print("Welcome to use MemNet AI Enhanced Client! Enter 'exit' or 'quit' to exit.")
    while True:
        user_input = input("\nUser: ")
        if user_input.lower() in ['exit', 'quit']:
            print("Thank you for using, goodbye!")
            break
            
        # Add user message and get AI response
        if client.input(user_input):
            response = client.chat()
            print(f"AI: {response}")
            
finally:
    client.close()

More Information

Check out python SDKdocumentation.