Skip to content

Commit

Permalink
REMOVED: LLAMA2 from groq
Browse files Browse the repository at this point in the history
  • Loading branch information
AquibPy committed May 4, 2024
1 parent a044a0c commit 6143a89
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions api.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ async def pdf_questions_generator(pdf: UploadFile = File(...)):
return ResponseText(response=f"Error: {str(e)}")

@app.post("/chat_groq", description= """This route uses groq for faster response using Language Processing Unit(LPU).
\n In model input default is mixtral-8x7b-32768 but you can choose llama2-70b-4096, gemma-7b-it, llama3-70b-8192 and llama3-8b-8192.
\n In model input default is mixtral-8x7b-32768 but you can choose gemma-7b-it, llama3-70b-8192 and llama3-8b-8192.
\n conversational_memory_length ranges from 1 to 10. It keeps a list of the interactions of the conversation over time.
It only uses the last K interactions """)
async def groq_chatbot(question: str = Form(...), model: Optional[str] = Form('mixtral-8x7b-32768'),
Expand Down Expand Up @@ -313,9 +313,9 @@ async def groq_text_summary(input_text: str = Form(...)):
return ResponseText(response=f"Error: {str(e)}")

@app.post("/RAG_PDF_Groq",description="The endpoint uses the pdf and give the answer based on the prompt provided using groq\
In model input default is mixtral-8x7b-32768 but you can choose llama2-70b-4096, gemma-7b-it, llama3-70b-8192 and llama3-8b-8192.")
In model input default is mixtral-8x7b-32768 but you can choose gemma-7b-it, llama3-70b-8192 and llama3-8b-8192.")
async def talk_pdf_groq(pdf: UploadFile = File(...),prompt: str = Form(...),
model: Optional[str] = Form('llama2-70b-4096')):
model: Optional[str] = Form('llama3-70b-8192')):
try:
rag_chain = groq_pdf(pdf.file,model)
out = rag_chain.invoke(prompt)
Expand Down
7 changes: 4 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ python-multipart
PyPDF2
unstructured
youtube_transcript_api
# llama-index
# pypdf
llama-index
pypdf
pymongo
pytest
groq
langchain-groq
jinja2
jinja2
tiktoken

0 comments on commit 6143a89

Please sign in to comment.