Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a post about ChatGPT in Galaxy Interactive tool #2114

Merged
merged 7 commits into from
Aug 19, 2023

Conversation

anuprulez
Copy link
Member

No description provided.

@anuprulez
Copy link
Member Author

ping @bgruening thanks!

@kysrpex kysrpex requested a review from bgruening August 18, 2023 09:13
@@ -0,0 +1,55 @@
---
title: "ChatGPT in Galaxy"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
title: "ChatGPT in Galaxy"
title: "ChatGPT in Galaxy via Jupyter notebooks"


![Jupyternaut 2](./chatgpt_2.png)

Another way to use ChatGPT is via a notebook using "magic commands `%%ai`". Refer to the following image.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Another way to use ChatGPT is via a notebook using "magic commands `%%ai`". Refer to the following image.
Another way to use ChatGPT is from inside a notebook using the "magic command" `%%ai`, see the next images to get an idea.


### How to access on Galaxy Europe:

1. Acquire an OpenAI access token by creating an [OpenAI](https://openai.com/) account. It should be noted that using OpenAI models requires a premium/paid account.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Acquire an OpenAI access token by creating an [OpenAI](https://openai.com/) account. It should be noted that using OpenAI models requires a premium/paid account.
1. Acquire an OpenAI access token by creating an [OpenAI](https://openai.com/) account. It should be noted that using OpenAI models requires a premium/paid account from OpenAI.

![ChatGPT in a notebook](./chatgpt_4.png)


### Pricing for OpenAI token
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably soon outdated, so we really want to include this here?

### How to access on Galaxy Europe:

1. Acquire an OpenAI access token by creating an [OpenAI](https://openai.com/) account. It should be noted that using OpenAI models requires a premium/paid account.
2. Apply for using GPU JupyterLab using http://usegalaxy.eu/gpu-request. Ignore this step if you have access to GPU JupyterLab in Galaxy Europe.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
2. Apply for using GPU JupyterLab using http://usegalaxy.eu/gpu-request. Ignore this step if you have access to GPU JupyterLab in Galaxy Europe.
2. If you do not have already, please apply for using GPU JupyterLab via http://usegalaxy.eu/gpu-request.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should that maybe the first step?


1. Acquire an OpenAI access token by creating an [OpenAI](https://openai.com/) account. It should be noted that using OpenAI models requires a premium/paid account.
2. Apply for using GPU JupyterLab using http://usegalaxy.eu/gpu-request. Ignore this step if you have access to GPU JupyterLab in Galaxy Europe.
3. Go to GPU JupyterLab tool in Galaxy Europe and choose tool version 0.2. Currently, it has been deployed on this version only. It may be deployed on other interactive tools (ITs) in Galaxy, serving Jupyter notebooks online.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

link to the GPU Jupterlab?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
3. Go to GPU JupyterLab tool in Galaxy Europe and choose tool version 0.2. Currently, it has been deployed on this version only. It may be deployed on other interactive tools (ITs) in Galaxy, serving Jupyter notebooks online.
3. Go to GPU JupyterLab tool in Galaxy Europe and choose tool version 0.2.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I would add a direct link

2. Apply for using GPU JupyterLab using http://usegalaxy.eu/gpu-request. Ignore this step if you have access to GPU JupyterLab in Galaxy Europe.
3. Go to GPU JupyterLab tool in Galaxy Europe and choose tool version 0.2. Currently, it has been deployed on this version only. It may be deployed on other interactive tools (ITs) in Galaxy, serving Jupyter notebooks online.
4. Open the JupyterLab and click the "chat" icon at the bottom of the left panel. Choose the model you want to use and provide an OpenAI access token. It gives a chatbox to write questions. Refer to images 1 and 2.
5. Creating a regular notebook is Another way to use these models. Type the following commands in the same order in a notebook:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
5. Creating a regular notebook is Another way to use these models. Type the following commands in the same order in a notebook:
5. Creating a regular notebook is another way to use these models. Type the following commands in the same order in a notebook:


d. `Write a program for plotting heatmap using matplotlib`

6. One example notebook is provided at `/notebooks/test-Generative-AI.ipynb`. Click [Jupyter AI](https://jupyter-ai.readthedocs.io/en/latest/users/index.html) for further examples and details.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
6. One example notebook is provided at `/notebooks/test-Generative-AI.ipynb`. Click [Jupyter AI](https://jupyter-ai.readthedocs.io/en/latest/users/index.html) for further examples and details.
6. An example is provided at `/notebooks/test-Generative-AI.ipynb` inside the notebook.
For further examples and details see the [Jupyter AI page](https://jupyter-ai.readthedocs.io/en/latest/users/index.html).

The cost of using OpenAI models depends on factors such as the type of model (LLM) used and the number of tokens. The [price chart](https://openai.com/pricing) describes the detailed cost of using different LLMs. Models such as GPT4 are more expensive than GPT-3.5 Turbo. Usage cost also depends on the number of tokens/words used in the query and its response. Refer to the [tokens guide](https://platform.openai.com/docs/guides/gpt/managing-tokens) for more understanding. A straightforward example of how tokens are managed inside models is - the string "ChatGPT is great!" is encoded into six tokens: ["Chat", "G", "PT", " is", " great", "!"]. Using the GPT-3.5 Turbo model for 1000 tokens costs $0.0015.


### How to access on Galaxy Europe:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't that section a bit redundant with the general usage section?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bgruening, thanks a lot for your comments. I have update the blog according to your comments

@bgruening bgruening merged commit 247a1f5 into galaxyproject:master Aug 19, 2023
3 checks passed
@bgruening
Copy link
Member

Cool!

paulzierep pushed a commit to paulzierep/galaxy-hub that referenced this pull request Nov 7, 2023
* add chatgpt post

* update blog new

* Update index.md

* fix review comments

* fix review comments

* update
paulzierep pushed a commit to paulzierep/galaxy-hub that referenced this pull request Nov 28, 2023
* add chatgpt post

* update blog new

* Update index.md

* fix review comments

* fix review comments

* update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants