| 39 | os.remove("temp.mp3") |
| 40 | |
| 41 | def aiProcess(command): |
| 42 | client = OpenAI(api_key="<Your Key Here>", |
| 43 | ) |
| 44 | |
| 45 | completion = client.chat.completions.create( |
| 46 | model="gpt-3.5-turbo", |
| 47 | messages=[ |
| 48 | {"role": "system", "content": "You are a virtual assistant named jarvis skilled in general tasks like Alexa and Google Cloud. Give short responses please"}, |
| 49 | {"role": "user", "content": command} |
| 50 | ] |
| 51 | ) |
| 52 | |
| 53 | return completion.choices[0].message.content |
| 54 | |
| 55 | def processCommand(c): |
| 56 | if "open google" in c.lower(): |