Skip to content

Commit

Permalink
Create Running_Observability.py
Browse files Browse the repository at this point in the history
  • Loading branch information
taha-aiplanet authored and tarun-aiplanet committed Jun 5, 2024
1 parent c27838f commit 9def522
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions cookbook/Running_Observability.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from beyondllm import source,retrieve,generator, llms, embeddings
from beyondllm.observe import Observer
import os

os.environ['OPENAI_API_KEY'] = 'sk-****'

Observe = Observer()
Observe.run()

llm=llms.ChatOpenAIModel()
embed_model = embeddings.OpenAIEmbeddings()

data = source.fit("https://www.youtube.com/watch?v=oJJyTztI_6g",dtype="youtube",chunk_size=512,chunk_overlap=50)
retriever = retrieve.auto_retriever(data,embed_model,type="normal",top_k=4)

pipeline = generator.Generate(question="what tool is video mentioning about?",retriever=retriever, llm=llm)
pipeline = generator.Generate(question="What is the tool used for?",retriever=retriever, llm=llm)
pipeline = generator.Generate(question="How can i use the tool for my own use?",retriever=retriever, llm=llm)


0 comments on commit 9def522

Please sign in to comment.