for AI agents:        1. LLM with simple prompting, such as "Steps for XYZ." or "What are the subgoals for achieving XYZ?"    2. Task-specific instructions, such as "Write a story outline" for writing a novel.    3. Human inputs.You can also get logging for tokens.from langchain.schema import LLMResultfrom langchain.callbacks.base import BaseCallbackHandlerclass GenerationStatisticsCallback(BaseCallbackHandler):    def on_llm_end(self, response: LLMResult, **kwargs) -> None:        print(response.generations[0][0].generation_info)        callback_manager = CallbackManager([StreamingStdOutCallbackHandler(), GenerationStatisticsCallback()])chat_model = ChatOllama(model="llama2:13b-chat",                        verbose=True,                        callback_manager=callback_manager)qa_chain = RetrievalQA.from_chain_type(    chat_model,    retriever=vectorstore.as_retriever(),    chain_type_kwargs={"prompt": QA_CHAIN_PROMPT},)question = "What are the approaches to Task Decomposition?"result = qa_chain({"query": question})     Based on the given context, here is the answer to the question "What are the approaches to Task Decomposition?"        There are three approaches to task decomposition:        1. LLM with simple prompting, such as "Steps for XYZ." or "What are the subgoals for achieving XYZ?"    2. Using task-specific instructions, like "Write a story outline" for writing a novel.    3. With human inputs.{'model': 'llama2:13b-chat', 'created_at': '2023-08-23T15:37:51.469127Z', 'done': True, 'context': [1, 29871, 1, 29961, 25580, 29962, 518, 25580, 29962, 518, 25580, 29962, 3532, 14816, 29903, 6778, 4803, 278, 1494, 12785, 310, 3030, 304, 1234, 278, 1139, 472, 278, 1095, 29889, 29871, 13, 3644, 366, 1016, 29915, 29873, 1073, 278, 1234, 29892, 925, 1827, 393, 366, 1016, 29915, 29873, 1073, 29892, 1016, 29915, 29873, 1018, 304, 1207, 701, 385, 1234, 29889, 29871, 13, 11403, 2211, 25260, 7472, 322, 3013, 278, 1234, 408, 3022, 895, 408, 1950, 29889, 529, 829, 14816,
Ollama allows you to run open-source large language models, such as LLaMA2, locally.
Ollama allows you to run open-source large language models, such as LLaMA2, locally. ->: for AI agents:        1. LLM with simple prompting, such as "Steps for XYZ." or "What are the subgoals for achieving XYZ?"    2. Task-specific instructions, such as "Write a story outline" for writing a novel.    3. Human inputs.You can also get logging for tokens.from langchain.schema import LLMResultfrom langchain.callbacks.base import BaseCallbackHandlerclass GenerationStatisticsCallback(BaseCallbackHandler):    def on_llm_end(self, response: LLMResult, **kwargs) -> None:        print(response.generations[0][0].generation_info)        callback_manager = CallbackManager([StreamingStdOutCallbackHandler(), GenerationStatisticsCallback()])chat_model = ChatOllama(model="llama2:13b-chat",                        verbose=True,                        callback_manager=callback_manager)qa_chain = RetrievalQA.from_chain_type(    chat_model,    retriever=vectorstore.as_retriever(),    chain_type_kwargs={"prompt": QA_CHAIN_PROMPT},)question = "What are the approaches to Task Decomposition?"result = qa_chain({"query": question})     Based on the given context, here is the answer to the question "What are the approaches to Task Decomposition?"        There are three approaches to task decomposition:        1. LLM with simple prompting, such as "Steps for XYZ." or "What are the subgoals for achieving XYZ?"    2. Using task-specific instructions, like "Write a story outline" for writing a novel.    3. With human inputs.{'model': 'llama2:13b-chat', 'created_at': '2023-08-23T15:37:51.469127Z', 'done': True, 'context': [1, 29871, 1, 29961, 25580, 29962, 518, 25580, 29962, 518, 25580, 29962, 3532, 14816, 29903, 6778, 4803, 278, 1494, 12785, 310, 3030, 304, 1234, 278, 1139, 472, 278, 1095, 29889, 29871, 13, 3644, 366, 1016, 29915, 29873, 1073, 278, 1234, 29892, 925, 1827, 393, 366, 1016, 29915, 29873, 1073, 29892, 1016, 29915, 29873, 1018, 304, 1207, 701, 385, 1234, 29889, 29871, 13, 11403, 2211, 25260, 7472, 322, 3013, 278, 1234, 408, 3022, 895, 408, 1950, 29889, 529, 829, 14816,