ask
The ask
function is designed for seamless interaction with the AI chat named Cloude using Asynchronous
.
Properties:
prompt
: Your query or message sent to the AI.history
: The conversation history, which must be an object of typeAsyncHistory
.
Example Usage:
from litegpt import AsyncLiteGPT
import asyncio
async def main():
bot = AsyncLiteGPT(http2=True)
print(await bot.ask("Your query text..."))
asyncio.run(main())
Thus, the ask
function provides a convenient and efficient way to send queries to the AI chat while maintaining the dialogue context.
Last updated