ka1kuk commited on
Commit
c70f382
1 Parent(s): a1505c8

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +3 -3
main.py CHANGED
@@ -3,7 +3,7 @@ from langchain.memory import ConversationBufferMemory
3
  from langchain.utilities import GoogleSearchAPIWrapper
4
  from langchain.agents import initialize_agent, Tool
5
  from lang import G4F
6
- from fastapi import FastAPI
7
  from pydantic import BaseModel
8
  from fastapi.middleware.cors import CORSMiddleware
9
 
@@ -44,7 +44,7 @@ def gello():
44
  return "Hello! My name is Linlada."
45
 
46
  @app.post('/linlada')
47
- async def hello_post():
48
  llm = G4F(model=model)
49
  data = await request.json()
50
  prompt = data['prompt']
@@ -52,7 +52,7 @@ async def hello_post():
52
  return chat
53
 
54
  @app.post('/search')
55
- async def searches():
56
  data = await request.json()
57
  prompt = data['prompt']
58
  response = agent_chain.run(input=prompt)
 
3
  from langchain.utilities import GoogleSearchAPIWrapper
4
  from langchain.agents import initialize_agent, Tool
5
  from lang import G4F
6
+ from fastapi import FastAPI, Request
7
  from pydantic import BaseModel
8
  from fastapi.middleware.cors import CORSMiddleware
9
 
 
44
  return "Hello! My name is Linlada."
45
 
46
  @app.post('/linlada')
47
+ async def hello_post(request: Request):
48
  llm = G4F(model=model)
49
  data = await request.json()
50
  prompt = data['prompt']
 
52
  return chat
53
 
54
  @app.post('/search')
55
+ async def searches(request: Request):
56
  data = await request.json()
57
  prompt = data['prompt']
58
  response = agent_chain.run(input=prompt)