Spaces:
Running
Running
Update AI_Chat_bot.py
Browse files- AI_Chat_bot.py +3 -3
AI_Chat_bot.py
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
-
import
|
2 |
import gradio
|
3 |
|
4 |
-
|
5 |
|
6 |
messages = [{"role": "system", "content": "You are a Indian Lawyer and Gave Advice according to Indian constitution"}]
|
7 |
|
8 |
def CustomChatGPT(user_input):
|
9 |
messages.append({"role": "user", "content": user_input})
|
10 |
-
response =
|
11 |
model = "gpt-3.5-turbo",
|
12 |
messages = messages
|
13 |
)
|
|
|
1 |
+
import groq
|
2 |
import gradio
|
3 |
|
4 |
+
groq.api_key = "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"
|
5 |
|
6 |
messages = [{"role": "system", "content": "You are a Indian Lawyer and Gave Advice according to Indian constitution"}]
|
7 |
|
8 |
def CustomChatGPT(user_input):
|
9 |
messages.append({"role": "user", "content": user_input})
|
10 |
+
response = groq.ChatCompletion.create(
|
11 |
model = "gpt-3.5-turbo",
|
12 |
messages = messages
|
13 |
)
|