bpandey23 commited on
Commit
05660cd
·
verified ·
1 Parent(s): 77aeb21

Update main.py

Browse files

suitable place for logging

Files changed (1) hide show
  1. main.py +5 -3
main.py CHANGED
@@ -15,12 +15,14 @@ class validation(BaseModel):
15
  prompt: str
16
  #Fast API
17
  app = FastAPI()
18
- #payload_llm = "This was the payload used : " + str
19
- logging.basicConfig(format='%(process)d-%(levelname)s-%(message)s')
20
- logging.info(str)
21
 
22
  @app.post("/bpandey23_llm")
23
  async def stream(item: validation):
 
 
 
 
 
24
  system_prompt = 'Below is an instruction that describes a task. Write a response that appropriately completes the request.'
25
  E_INST = "</s>"
26
  user, assistant = "<|user|>", "<|assistant|>"
 
15
  prompt: str
16
  #Fast API
17
  app = FastAPI()
 
 
 
18
 
19
  @app.post("/bpandey23_llm")
20
  async def stream(item: validation):
21
+ logging.basicConfig(format='%(process)d-%(levelname)s-%(message)s')
22
+ payload_llm="This is the prompt by the user: " + item.prompt
23
+ logging.info(payload_llm)
24
+
25
+ #llm stuff starts now
26
  system_prompt = 'Below is an instruction that describes a task. Write a response that appropriately completes the request.'
27
  E_INST = "</s>"
28
  user, assistant = "<|user|>", "<|assistant|>"