ka1kuk commited on
Commit
f1b6599
1 Parent(s): 4e4986b

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +5 -5
main.py CHANGED
@@ -62,8 +62,8 @@ def gpt_with_google_search(prompt):
62
 
63
  class Linlada(BaseModel):
64
  prompt: str
65
- web_access: str = None
66
- model: str = None
67
 
68
 
69
 
@@ -73,10 +73,10 @@ def linlada(request: Linlada):
73
  model = request.model
74
  web_access = request.web_access
75
  llm = G4F(model=model)
76
- if web_access == "None":
77
- chat = llm(prompt)
78
- else:
79
  chat = gpt_with_google_search(prompt)
 
 
80
  return chat
81
 
82
 
 
62
 
63
  class Linlada(BaseModel):
64
  prompt: str
65
+ web_access: str = True
66
+ model: str = 'gpt-3.5-turbo'
67
 
68
 
69
 
 
73
  model = request.model
74
  web_access = request.web_access
75
  llm = G4F(model=model)
76
+ if web_access == "True":
 
 
77
  chat = gpt_with_google_search(prompt)
78
+ else:
79
+ chat = llm(prompt)
80
  return chat
81
 
82