MCPcopy
hub / github.com/CodeWithHarry/The-Ultimate-Python-Course / aiProcess

Function aiProcess

Mega Project 1 - Jarvis/main.py:41–53  ·  view source on GitHub ↗
(command)

Source from the content-addressed store, hash-verified

39 os.remove("temp.mp3")
40
41def 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
55def processCommand(c):
56 if "open google" in c.lower():

Callers 1

processCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected