Skip to main content

Make class instantiation easy with auto-imports

Project description

AINI

aini

Make AI class initialization easy with auto-imports.

Installation

pip install aini

Usage

Autogen

from aini import aini, aview

# Load assistant agent with DeepSeek as its model
ds = aini('autogen/llm', 'ds')
agent = aini('autogen/assistant', name='deepseek', model=ds)

# Run the agent
ans = await agent.run('What is your name')

# Display component structure
aview(ans)
[Output]
<autogen_agentchat.base._task.TaskResult>
{
  'messages': [
    {
      'source': 'user',
      'content': 'What is your name',
      'type': 'TextMessage'
    },
    {
      'source': 'ds',
      'models_usage <autogen_core.models._types.RequestUsage>': {
        'prompt_tokens': 32,
        'completion_tokens': 17
      },
      'content': 'My name is DeepSeek Chat! 😊 How can I assist you today?',
      'type': 'TextMessage'
    }
  ]
}

Agno

# Load an agent with tools from configuration files
agent = aini('agno/agent', tools=[aini('agno/tools', 'google')])

# Run the agent
ans = agent.run('Compare MCP and A2A')

# Display component structure with filtering
aview(ans, exclude_keys=['metric'])
[Output]
<agno.run.response.RunResponse>
{
  'content': "Here's a comparison between **MCP** and **A2A**: ...",
  'content_type': 'str',
  'event': 'RunResponse',
  'messages': [
    {
      'role': 'user',
      'content': 'Compare MCP and A2A',
      'add_to_agent_memory': True,
      'created_at': 1746758165
    },
    {
      'role': 'assistant',
      'tool_calls': [
        {
          'id': 'call_0_21871e19-3de7-4a8a-9275-9b4128fb743c',
          'function': {
            'arguments': '{"query":"MCP vs A2A comparison","max_results":5}',
            'name': 'google_search'
          },
          'type': 'function'
        }
      ]
    }
  ]
  ...
}

# Export to YAML for debugging
aview(ans, to_file='debug/output.yaml')

Mem0

memory = aini('mem0/mem0', 'mem0')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aini-0.1.6.tar.gz (17.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aini-0.1.6-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

Details for the file aini-0.1.6.tar.gz.

File metadata

  • Download URL: aini-0.1.6.tar.gz
  • Upload date:
  • Size: 17.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for aini-0.1.6.tar.gz
Algorithm Hash digest
SHA256 7ebaa1c43312c7bd0b63725a11906df8c332de9e0c60d32e2eb4784bdce26f81
MD5 17a2e64aa3d88714645eefed1a145855
BLAKE2b-256 1d5c04eaa5b9af87a86e602049bfe644e5d7feaafd0201d5c283d5f9f4300748

See more details on using hashes here.

File details

Details for the file aini-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: aini-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 19.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for aini-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 e3e11b32b53b6605bed315696ae5bfc9d36f86c9915f89cfff7ea71ad769bd37
MD5 c49d977e19081b7321db936fb83e241e
BLAKE2b-256 358aa0823d93e0f829dade43edfcbcf4568e448ed99159c0b675f648dc189380

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page