Skip to content

Commit

Permalink
Merge pull request #92 from cloudera/sample-ticket-header
Browse files Browse the repository at this point in the history
Update ticketing-agent-app.py to remove apikey header
  • Loading branch information
jasonmeverett authored Nov 18, 2024
2 parents 1bf7459 + 3cba1c9 commit 2f45754
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/ticketing-agent-app/ticketing-agent-app.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def call_cml_model(customer_input):
print(ticketing_model_input)
response = requests.post(MODEL_SERVICE_URL,
data='{"request":{"prompt":"%s"}}' % ticketing_model_input,
headers={'Content-Type': 'application/json', 'Authorization': 'Bearer %s' % os.getenv('CDSW_APIV2_KEY')})
headers={'Content-Type': 'application/json'})
response_dict = response.json()
if 'success' in response_dict:
print(response_dict)
Expand Down Expand Up @@ -99,4 +99,4 @@ def main():
suggestion_txt.write(st.session_state['Suggested Customer Service Actions'])

if __name__ == "__main__":
main()
main()

0 comments on commit 2f45754

Please sign in to comment.