Skip to content

Zai-Kun/duck.ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python wrapper for duck.ai API

A python lib that allows you to chat with AI models through duck.ai

Example Usage

import asyncio

from duck_ai import DuckAI, Models


async def main():
    duck = DuckAI()

    chat = duck.create_new_chat(Models.GPT_4_MINI)

    while True:
        msg = input("User: ")
        print("\nAssistant: ", end="")
        async for chunk in chat.send(msg):
            print(chunk, end="", flush=True)
        print("\n")


if __name__ == "__main__":
    asyncio.run(main())