Skip to content

Commit

Permalink
Use own api key if the organization hasnt set one (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
fedeq authored Jul 14, 2023
1 parent 6078c84 commit b5bcac9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/services/slack_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,8 @@ def process_event_payload(payload):
print("Getting thread messages finish")

print("Responding to user")
response = respond_to_user(messages, team_data["openai_key"])
key = team_data["openai_key"] if team_data["openai_key"] else os.environ["OPENAI_API_KEY"]
response = respond_to_user(messages, key)
print("Responding to user FINISH")
# try:
# increment_request_count(team_id)
Expand Down

0 comments on commit b5bcac9

Please sign in to comment.