Skip to content

Missing Python async/await examples #6

@nagasatish007

Description

@nagasatish007

Documentation Type

Code Examples

Documentation Location

https://github.com/agentguard-ai/tealtiger-python

Issue Type

Missing information

Issue Description

The Python SDK documentation only shows synchronous examples, but the SDK supports async/await. New users might not realize they can use async operations.

Suggested Fix

Add async/await examples to the README, showing:

  1. How to use async client initialization
  2. How to make async API calls
  3. How to use async context managers

Additional Context

Example:

import asyncio
from tealtiger.clients import TealOpenAI, TealOpenAIConfig

async def main():
    config = TealOpenAIConfig(
        api_key="your-api-key",
        enable_guardrails=True,
    )
    
    async with TealOpenAI(config) as client:
        response = await client.chat.create(
            model="gpt-4",
            messages=[{"role": "user", "content": "Hello!"}]
        )
        print(response)

asyncio.run(main())

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions