comparison chatgpt.py @ 1:08c658e9aa9e draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 13c168a7d6a2d5050c04253754fb86321ad57d54
author bgruening
date Wed, 14 Aug 2024 11:33:44 +0000
parents f256dc85e1a0
children dab494dce303
comparison
equal deleted inserted replaced
0:f256dc85e1a0 1:08c658e9aa9e
7 question = sys.argv[2] 7 question = sys.argv[2]
8 model = sys.argv[3] 8 model = sys.argv[3]
9 with open(sys.argv[4], "r") as f: 9 with open(sys.argv[4], "r") as f:
10 openai_api_key = f.read().strip() 10 openai_api_key = f.read().strip()
11 if not openai_api_key: 11 if not openai_api_key:
12 raise Exception("OpenAI API key is not provided in user preferences!") 12 print("OpenAI API key is not provided in user preferences!")
13 sys.exit(1)
13 14
14 client = OpenAI(api_key=openai_api_key) 15 client = OpenAI(api_key=openai_api_key)
15 16
16 file_search_sup_ext = [ 17 file_search_sup_ext = [
17 "c", 18 "c",