Skip to content

Commit

Permalink
Changing app and README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
paraskuk committed Mar 29, 2024
1 parent de95c99 commit b0dd920
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ This application is built using FastAPI for the API and JavaScript ,HTML and CSS
- OpenAI API key
- FastAPI
- JavaScript
- Redis
- Redis Server
- HTML, CSS
- Chrome Browser
- Install packages as outlined in the requirements.txt file
- Get GitHub Client ID for your OAuth App
- Get GitHub Client Secret for your OAuth App
- Get Secret Session Key for your OAuth App

## Installation

Expand Down
11 changes: 4 additions & 7 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,11 +305,11 @@ async def ask_gpt4(query_params: QueryModel) -> JSONResponse:
)

# Moderation API to evaluate the query
moderation_result = create_client_moderation(query_params)
# moderation_result = create_client_moderation(query_params)

# moderation_result = client.moderations.create(
# input=query_params.user_input
# )
moderation_result = client.moderations.create(
input=query_params.user_input
)

if not code_completion:
raise HTTPException(status_code=500, detail="No response from the model for code completion.")
Expand Down Expand Up @@ -382,6 +382,3 @@ async def send_feedback(feedback_data: FeedbackModel):
log.info(f"Received feedback: {feedback_data.feedback} for response ID: {feedback_data.responseId}")

return {"message": "Feedback received"}



0 comments on commit b0dd920

Please sign in to comment.