diff --git a/examples/decorator.py b/examples/decorator.py index 7a2cef9..8340b55 100644 --- a/examples/decorator.py +++ b/examples/decorator.py @@ -7,16 +7,16 @@ @runnable def generate_poem(topic: str, context: str) -> str: """ - Generate a short poem about the topic with the given context. + Generate a poem about the topic with the given context. """ return chain() vectorstore = FAISS.from_texts( [ + "cold showers are good for your immune system", + "i dont like when people are mean to me", "japanese tea is full of heart warming flavors", - "in the morning you should take a walk", - "cold showers are good for your health", ], embedding=OpenAIEmbeddings(), ) @@ -27,5 +27,4 @@ def generate_poem(topic: str, context: str) -> str: "topic": RunnablePassthrough(), } | generate_poem - print(retrieval_chain.invoke("love")) diff --git a/examples/llamacpp.py b/examples/llamacpp.py index 4b7e796..18c1cf0 100644 --- a/examples/llamacpp.py +++ b/examples/llamacpp.py @@ -19,7 +19,7 @@ def analyze(text: str) -> SentimentAnalysis: if __name__ == "__main__": # set global llm - settings.llm = "llamacpp/Nous-Hermes-2-SOLAR-10.7B" + settings.llm = "llamacpp/nous-hermes-2-solar-10.7B" # log tokens as stream to console settings.console_stream = True diff --git a/examples/pydantic_validation.py b/examples/pydantic_validation.py index cfc104e..83b5d83 100644 --- a/examples/pydantic_validation.py +++ b/examples/pydantic_validation.py @@ -31,6 +31,5 @@ def gather_infos(user_description: str) -> Task: return chain() -if __name__ == "__main__": - task = gather_infos("cleanup the kitchen") - print(f"{task=}") +task = gather_infos("cleanup the kitchen") +print(f"{task=}")