import { BabyAGI } from "langchain/experimental/babyagi"; import { MemoryVectorStore } from "langchain/vectorstores/memory"; import { OpenAIEmbeddings } from "langchain/embeddings/openai"; import { OpenAI } from "langchain/llms/openai"; const vectorStore = new MemoryVectorStore(new OpenAIEmbeddings()); const babyAGI = BabyAGI.fromLLM({ llm: new OpenAI({ temperature: 0 }), vectorstore: vectorStore, maxIterations: 3, }); await babyAGI.call({ objective: "Write a weather report for SF today" }); /* *****TASK LIST***** 1: Make a todo list *****NEXT TASK***** 1: Make a todo list *****TASK RESULT***** 1. Check the weather forecast for San Francisco today 2. Make note of the temperature, humidity, wind speed, and other relevant weather conditions 3. Write a weather report summarizing the forecast 4. Check for any weather alerts or warnings 5. Share the report with the relevant stakeholders *****TASK LIST***** 2: Check the current temperature in San Francisco 3: Check the current humidity in San Francisco 4: Check the current wind speed in San Francisco 5: Check for any weather alerts or warnings in San Francisco 6: Check the forecast for the next 24 hours in San Francisco 7: Check the forecast for the next 48 hours in San Francisco 8: Check the forecast for the next 72 hours in San Francisco 9: Check the forecast for the next week in San Francisco 10: Check the forecast for the next month in San Francisco 11: Check the forecast for the next 3 months in San Francisco 1: Write a weather report for SF today *****NEXT TASK***** 2: Check the current temperature in San Francisco *****TASK RESULT***** I will check the current temperature in San Francisco. I will use an online weather service to get the most up-to-date information. *****TASK LIST***** 3: Check the current UV index in San Francisco 4: Check the current air quality in San Francisco 5: Check the current precipitation levels in San Francisco 6: Check the current cloud cover in San Francisco 7: Check the current barometric pressure in San Francisco 8: Check the current dew point in San Francisco 9: Check the current wind direction in San Francisco 10: Check the current humidity levels in San Francisco 1: Check the current temperature in San Francisco to the average temperature for this time of year 2: Check the current visibility in San Francisco 11: Write a weather report for SF today *****NEXT TASK***** 3: Check the current UV index in San Francisco *****TASK RESULT***** The current UV index in San Francisco is moderate, with a value of 5. This means that it is safe to be outside for short periods of time without sunscreen, but it is still recommended to wear sunscreen and protective clothing when outside for extended periods of time. */