Mercurial > repos > bgruening > chatgpt_openai_api
annotate chatgpt.xml @ 3:7770a4bd42e2 draft default tip
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit c21d9a2cb410ee30dc47f4a13247862481816266
author | bgruening |
---|---|
date | Wed, 11 Sep 2024 16:36:21 +0000 |
parents | dab494dce303 |
children |
rev | line source |
---|---|
0
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
1 <tool id="chatgpt_openai_api" name="chatGPT" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="23.0"> |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
2 <description>Integrating OpenAI's ChatGPT into Galaxy</description> |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
3 <macros> |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
4 <token name="@TOOL_VERSION@">2024</token> |
3
7770a4bd42e2
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit c21d9a2cb410ee30dc47f4a13247862481816266
bgruening
parents:
2
diff
changeset
|
5 <token name="@VERSION_SUFFIX@">2</token> |
0
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
6 </macros> |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
7 <requirements> |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
8 <requirement type="package" version="3.12">python</requirement> |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
9 <requirement type="package" version="1.35.13">openai</requirement> |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
10 </requirements> |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
11 <command detect_errors="exit_code"><![CDATA[ |
3
7770a4bd42e2
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit c21d9a2cb410ee30dc47f4a13247862481816266
bgruening
parents:
2
diff
changeset
|
12 #import json |
7770a4bd42e2
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit c21d9a2cb410ee30dc47f4a13247862481816266
bgruening
parents:
2
diff
changeset
|
13 #import os |
7770a4bd42e2
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit c21d9a2cb410ee30dc47f4a13247862481816266
bgruening
parents:
2
diff
changeset
|
14 #import re |
7770a4bd42e2
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit c21d9a2cb410ee30dc47f4a13247862481816266
bgruening
parents:
2
diff
changeset
|
15 #set LINK_LIST = [] |
7770a4bd42e2
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit c21d9a2cb410ee30dc47f4a13247862481816266
bgruening
parents:
2
diff
changeset
|
16 #for $input in $context |
7770a4bd42e2
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit c21d9a2cb410ee30dc47f4a13247862481816266
bgruening
parents:
2
diff
changeset
|
17 #set file_name = os.path.splitext($input.element_identifier)[0] |
7770a4bd42e2
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit c21d9a2cb410ee30dc47f4a13247862481816266
bgruening
parents:
2
diff
changeset
|
18 ## list of supported filetypes in OpenAI. If Galaxy has a filetype that is not in this list, just use the generic `txt`. |
7770a4bd42e2
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit c21d9a2cb410ee30dc47f4a13247862481816266
bgruening
parents:
2
diff
changeset
|
19 #set ext = $input.ext if $input.ext in ['c', 'cpp', 'css', 'csv', 'docx', 'gif', 'html', 'java', 'jpeg', 'jpg', 'js', 'json', 'md', 'pdf', 'php', 'pkl', 'png', 'pptx', 'py', 'rb', 'tar', 'tex', 'ts', 'txt', 'webp', 'xlsx', 'xml', 'zip'] else 'txt' |
7770a4bd42e2
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit c21d9a2cb410ee30dc47f4a13247862481816266
bgruening
parents:
2
diff
changeset
|
20 #set LINK = re.sub('[^\w\-]', '_', $file_name)+'.'+$ext |
7770a4bd42e2
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit c21d9a2cb410ee30dc47f4a13247862481816266
bgruening
parents:
2
diff
changeset
|
21 ln -s '$input' '$LINK' && |
7770a4bd42e2
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit c21d9a2cb410ee30dc47f4a13247862481816266
bgruening
parents:
2
diff
changeset
|
22 ## OpenAI has some special handling of "images", so let's annotate this here and pass it to the script |
7770a4bd42e2
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit c21d9a2cb410ee30dc47f4a13247862481816266
bgruening
parents:
2
diff
changeset
|
23 #set type = 'image' if $input.ext in ['jpg', 'jpeg', 'png', 'webp', 'gif'] else 'text' |
7770a4bd42e2
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit c21d9a2cb410ee30dc47f4a13247862481816266
bgruening
parents:
2
diff
changeset
|
24 $LINK_LIST.append([$LINK, $type]) |
7770a4bd42e2
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit c21d9a2cb410ee30dc47f4a13247862481816266
bgruening
parents:
2
diff
changeset
|
25 #end for |
7770a4bd42e2
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit c21d9a2cb410ee30dc47f4a13247862481816266
bgruening
parents:
2
diff
changeset
|
26 #set context_files = json.dumps($LINK_LIST) |
0
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
27 |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
28 python '$__tool_directory__/chatgpt.py' |
3
7770a4bd42e2
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit c21d9a2cb410ee30dc47f4a13247862481816266
bgruening
parents:
2
diff
changeset
|
29 '$context_files' |
7770a4bd42e2
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit c21d9a2cb410ee30dc47f4a13247862481816266
bgruening
parents:
2
diff
changeset
|
30 '$prompt' |
0
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
31 '$model' |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
32 '$openai_api_key_file' |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
33 ]]></command> |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
34 <configfiles> |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
35 <configfile name="openai_api_key_file"><![CDATA[ |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
36 $__user__.extra_preferences.get('chatgpt|api_key', "") |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
37 ]]></configfile> |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
38 </configfiles> |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
39 <inputs> |
2
dab494dce303
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit d2d08c3866c0f4a2f10372ae15c5dac5ea2d0bf0
bgruening
parents:
1
diff
changeset
|
40 <conditional name="input_type"> |
dab494dce303
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit d2d08c3866c0f4a2f10372ae15c5dac5ea2d0bf0
bgruening
parents:
1
diff
changeset
|
41 <param name="input_type_selector" type="select" label="Choose the model" help="Vision models are capable to have image as input."> |
dab494dce303
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit d2d08c3866c0f4a2f10372ae15c5dac5ea2d0bf0
bgruening
parents:
1
diff
changeset
|
42 <option value="vision" selected="true">Vision models</option> |
dab494dce303
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit d2d08c3866c0f4a2f10372ae15c5dac5ea2d0bf0
bgruening
parents:
1
diff
changeset
|
43 <option value="all">All models</option> |
dab494dce303
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit d2d08c3866c0f4a2f10372ae15c5dac5ea2d0bf0
bgruening
parents:
1
diff
changeset
|
44 </param> |
dab494dce303
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit d2d08c3866c0f4a2f10372ae15c5dac5ea2d0bf0
bgruening
parents:
1
diff
changeset
|
45 <when value="vision"> |
3
7770a4bd42e2
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit c21d9a2cb410ee30dc47f4a13247862481816266
bgruening
parents:
2
diff
changeset
|
46 <param name="model" type="select" optional="false" label="Model" help="Select the model you want to use."> |
2
dab494dce303
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit d2d08c3866c0f4a2f10372ae15c5dac5ea2d0bf0
bgruening
parents:
1
diff
changeset
|
47 <option value="gpt-4o-mini" selected="true">Affordable and intelligent small model for fast, lightweight tasks (gpt-4o-mini)</option> |
dab494dce303
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit d2d08c3866c0f4a2f10372ae15c5dac5ea2d0bf0
bgruening
parents:
1
diff
changeset
|
48 <option value="gpt-4o">High-intelligence flagship model for complex, multi-step tasks (gpt-4o)</option> |
dab494dce303
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit d2d08c3866c0f4a2f10372ae15c5dac5ea2d0bf0
bgruening
parents:
1
diff
changeset
|
49 <option value="gpt-4-turbo">The previous set of high-intelligence model with vision capabilities (gpt-4-turbo)</option> |
dab494dce303
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit d2d08c3866c0f4a2f10372ae15c5dac5ea2d0bf0
bgruening
parents:
1
diff
changeset
|
50 </param> |
dab494dce303
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit d2d08c3866c0f4a2f10372ae15c5dac5ea2d0bf0
bgruening
parents:
1
diff
changeset
|
51 <param name="context" type="data" multiple="true" optional="false" format="doc,docx,html,json,pdf,txt,jpg,jpeg,png,webp,gif" label="Context" max="500" help="This data will be uploaded to OpenAI's servers for processing."/> |
dab494dce303
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit d2d08c3866c0f4a2f10372ae15c5dac5ea2d0bf0
bgruening
parents:
1
diff
changeset
|
52 </when> |
dab494dce303
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit d2d08c3866c0f4a2f10372ae15c5dac5ea2d0bf0
bgruening
parents:
1
diff
changeset
|
53 <when value="all"> |
3
7770a4bd42e2
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit c21d9a2cb410ee30dc47f4a13247862481816266
bgruening
parents:
2
diff
changeset
|
54 <param name="model" type="select" optional="false" label="Model" help="Select the model you want to use."> |
2
dab494dce303
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit d2d08c3866c0f4a2f10372ae15c5dac5ea2d0bf0
bgruening
parents:
1
diff
changeset
|
55 <option value="gpt-4o-mini" selected="true">Affordable and intelligent small model for fast, lightweight tasks (gpt-4o-mini)</option> |
dab494dce303
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit d2d08c3866c0f4a2f10372ae15c5dac5ea2d0bf0
bgruening
parents:
1
diff
changeset
|
56 <option value="gpt-4o">High-intelligence flagship model for complex, multi-step tasks (gpt-4o)</option> |
dab494dce303
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit d2d08c3866c0f4a2f10372ae15c5dac5ea2d0bf0
bgruening
parents:
1
diff
changeset
|
57 <option value="gpt-4-turbo">The previous set of high-intelligence model with vision capabilities (gpt-4-turbo)</option> |
dab494dce303
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit d2d08c3866c0f4a2f10372ae15c5dac5ea2d0bf0
bgruening
parents:
1
diff
changeset
|
58 <option value="gpt-4" selected="true">The previous set of high-intelligence model (gpt-4)</option> |
dab494dce303
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit d2d08c3866c0f4a2f10372ae15c5dac5ea2d0bf0
bgruening
parents:
1
diff
changeset
|
59 <option value="gpt-3.5-turbo">A fast, inexpensive model for simple tasks (GPT-3.5-turbo)</option> |
dab494dce303
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit d2d08c3866c0f4a2f10372ae15c5dac5ea2d0bf0
bgruening
parents:
1
diff
changeset
|
60 </param> |
dab494dce303
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit d2d08c3866c0f4a2f10372ae15c5dac5ea2d0bf0
bgruening
parents:
1
diff
changeset
|
61 <param name="context" type="data" multiple="true" optional="false" format="doc,docx,html,json,pdf,txt" label="Context" max="500" help="This data will be uploaded to OpenAI's servers for processing."/> |
dab494dce303
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit d2d08c3866c0f4a2f10372ae15c5dac5ea2d0bf0
bgruening
parents:
1
diff
changeset
|
62 </when> |
dab494dce303
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit d2d08c3866c0f4a2f10372ae15c5dac5ea2d0bf0
bgruening
parents:
1
diff
changeset
|
63 </conditional> |
3
7770a4bd42e2
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit c21d9a2cb410ee30dc47f4a13247862481816266
bgruening
parents:
2
diff
changeset
|
64 <param name="prompt" type="text" optional="false" label="Prompt" help="Prompts or tasks you want ChatGPT to perform." area="true"> |
1
08c658e9aa9e
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 13c168a7d6a2d5050c04253754fb86321ad57d54
bgruening
parents:
0
diff
changeset
|
65 <validator type="empty_field"/> |
08c658e9aa9e
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 13c168a7d6a2d5050c04253754fb86321ad57d54
bgruening
parents:
0
diff
changeset
|
66 </param> |
0
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
67 </inputs> |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
68 <outputs> |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
69 <data name="output" format="txt" label="${tool.name} on ${on_string}" from_work_dir="./output.txt"/> |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
70 </outputs> |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
71 <tests> |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
72 <test expect_failure="true" expect_exit_code="1"> |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
73 <param name="context" value="chatgpt_test.txt" ftype="txt"/> |
3
7770a4bd42e2
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit c21d9a2cb410ee30dc47f4a13247862481816266
bgruening
parents:
2
diff
changeset
|
74 <param name="prompt" value="What is this?"/> |
0
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
75 <param name="model" value="gpt-4o-mini"/> |
1
08c658e9aa9e
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 13c168a7d6a2d5050c04253754fb86321ad57d54
bgruening
parents:
0
diff
changeset
|
76 <assert_stdout> |
08c658e9aa9e
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 13c168a7d6a2d5050c04253754fb86321ad57d54
bgruening
parents:
0
diff
changeset
|
77 <has_text text="OpenAI API key is not provided in user preferences!"/> |
08c658e9aa9e
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 13c168a7d6a2d5050c04253754fb86321ad57d54
bgruening
parents:
0
diff
changeset
|
78 </assert_stdout> |
0
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
79 </test> |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
80 </tests> |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
81 <help><![CDATA[ |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
82 |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
83 .. class:: infomark |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
84 |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
85 **What it does** |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
86 |
3
7770a4bd42e2
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit c21d9a2cb410ee30dc47f4a13247862481816266
bgruening
parents:
2
diff
changeset
|
87 This tool leverages OpenAI's ChatGPT API to generate responses based on user-provided context and prompt. |
7770a4bd42e2
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit c21d9a2cb410ee30dc47f4a13247862481816266
bgruening
parents:
2
diff
changeset
|
88 Users can upload context data in various formats and ask questions or execute prompts related to that data. |
0
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
89 The tool then uploads the data to a OpenAI server and processes them using the selected ChatGPT model, returning an AI-generated response tailored to the context provided. |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
90 |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
91 To utilize this tool, users need to input their OpenAI API key in the user preferences. To obtain an API key, visit API keys page in your OpenAI Dashboard. |
3
7770a4bd42e2
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit c21d9a2cb410ee30dc47f4a13247862481816266
bgruening
parents:
2
diff
changeset
|
92 Make sure to setup the payment method in your OpenAI account to use the API key. |
0
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
93 |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
94 When you run this tool, your input data is sent to OpenAI's servers using your API-key. |
3
7770a4bd42e2
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit c21d9a2cb410ee30dc47f4a13247862481816266
bgruening
parents:
2
diff
changeset
|
95 OpenAI's models process the data and generate a response based on the context and prompt provided. |
0
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
96 After receiving the response from the OpenAI server, the tool returns it to Galaxy and puts it in your history. |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
97 The files that have been uploaded are then deleted from the OpenAI's server, so they are not stored beyond their necessary use. |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
98 If the tool fails to delete your uploaded files automatically, you can manually delete them in your openai account page. You might want to check your OpenAI storage from time to time as they also have a quota. |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
99 |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
100 For more information on the tool refer to GitHub README_ file. |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
101 |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
102 .. _README: https://github.com/bgruening/galaxytools/blob/master/tools/chatgpt/README.md |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
103 |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
104 Usage |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
105 ..... |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
106 |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
107 **Input** |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
108 |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
109 1. **Upload Context Data**: Users can upload up to 500 files in formats such as DOC, DOCX, HTML, JSON, PDF, TXT, JPG, JPEG, PNG, WEBP, or GIF. |
3
7770a4bd42e2
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit c21d9a2cb410ee30dc47f4a13247862481816266
bgruening
parents:
2
diff
changeset
|
110 This context data serves as the input for the prompt you wish to execute. |
0
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
111 |
3
7770a4bd42e2
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit c21d9a2cb410ee30dc47f4a13247862481816266
bgruening
parents:
2
diff
changeset
|
112 2. **Provide a Prompt**: Once the context data is added, users can provide a prompt for a task ChatGPT should execute. |
7770a4bd42e2
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit c21d9a2cb410ee30dc47f4a13247862481816266
bgruening
parents:
2
diff
changeset
|
113 The more specific the prompt, the more tailored the response will be. |
0
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
114 |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
115 3. **Select a Model**: Choose the ChatGPT model that best fits your needs. |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
116 Information about different models and their pricing can be found on the OpenAI website. |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
117 |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
118 |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
119 **Output** |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
120 |
3
7770a4bd42e2
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit c21d9a2cb410ee30dc47f4a13247862481816266
bgruening
parents:
2
diff
changeset
|
121 The output is a response generated by ChatGPT, crafted based on the provided context data and the prompt posed. |
0
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
122 This response is saved in the `output.txt` file. |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
123 |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
124 |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
125 ]]></help> |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
126 <citations> |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
127 <citation type="bibtex"> |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
128 @misc{openai, |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
129 author = {OpenAI}, |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
130 title = {OpenAI's ChatGPT}, |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
131 howpublished = {\url{https://openai.com/chatgpt}}, |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
132 year = {2024}, |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
133 note = {Accessed: 2024-07-26} |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
134 } |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
135 </citation> |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
136 </citations> |
f256dc85e1a0
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/chatgpt commit 840e66e7f23cf775ebd3083c6e07d1819b17f74c
bgruening
parents:
diff
changeset
|
137 </tool> |