1import asyncio
2
3from kern.agent import Agent
4from kern.knowledge.knowledge import Knowledge
5from kern.vectordb.qdrant import Qdrant
6
7COLLECTION_NAME = "thai-recipes"
8
9vector_db = Qdrant(collection=COLLECTION_NAME, url="http://localhost:6333")
10
11knowledge = Knowledge(
12 vector_db=vector_db,
13)
14
15agent = Agent(knowledge=knowledge)
16
17if __name__ == "__main__":
18 asyncio.run(
19 knowledge.ainsert(
20 url="https://kern-public.s3.amazonaws.com/recipes/ThaiRecipes.pdf"
21 )
22 )
23
24 asyncio.run(agent.aprint_response("How to make Tom Kha Gai", markdown=True))