})
/**
* Goal - build an agent that can answer any questions that might require knowledge about my
current location and the current weather at my location.
*/
/**
PLAN:
1. Design a well-written ReAct prompt
2. Build a loop for my agent to run in.
3. Parse any actions that the LLM determines are necessary
4. End condition - final Answer is given
*/
// const response = await openai.chat.completions.create({
// model: "gpt-3.5-turbo",
// messages: [
// {
// role: "user",
// content: `Give me a list of activity ideas based on my current location of $
{location} and weather of ${weather}`
// }
// ]
// })
// console.log(response.choices[0].message.content)
import OpenAI from "openai"
import { getCurrentWeather, getLocation } from "./tools"
export const openai = new OpenAI({
apiKey: process.env.OPENAI_API_KEY,
dangerouslyAllowBrowser: true