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

Documentation for GPT Feature #144

Merged
merged 1 commit into from
Oct 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,50 @@ You may need to change `IP_ADDRESS` in `.env` to match the ip of the host runnin
Now, running `python3 server.py` will launch the website!


### 🧠 GPT Surf Report

**cli-surf** can generate personalized surf reports using OpenAI's GPT models. This section is for those that choose to not rely on gpt4free as the repo faces pending legal action.
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion (documentation): Consider revising the wording for better clarity

Change 'for those that choose' to 'for those who choose' for grammatical correctness.

Suggested change
**cli-surf** can generate personalized surf reports using OpenAI's GPT models. This section is for those that choose to not rely on gpt4free as the repo faces pending legal action.
**cli-surf** can generate personalized surf reports using OpenAI's GPT models. This section is for those who choose not to rely on gpt4free, as the repo faces pending legal action.


**Enabling GPT Reports**

1. **Obtain an OpenAI API Key**:

- Sign up at [OpenAI](https://beta.openai.com/signup/).
- Navigate to the API section and create a new API key.
- Make sure to add a payment method.

2. **Update `.env` File**:

```bash
GPT_PROMPT=With this data, recommend what size board I should ride and nearby surf spots that may be better with the given conditions.
API_KEY=your_openai_api_key_here
GPT_MODEL=gpt-3.5-turbo # Or use gpt-4 for better results
```

3. **Use the GPT Argument:**:
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick (documentation): Remove extra colon for consistency

The line should read '3. Use the GPT Argument:'

- Example Usage:
```bash
curl localhost:8000?location=Malibu,gpt
```

**Customizing the GPT Prompt**
You can tailor the response by changing the GPT_PROMPT in your .env file to get different types of reports.

- Common Examples:
```bash
GPT_PROMPT="Analyze the surf conditions and suggest the best time of day to surf."
```
Comment on lines +228 to +230
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion (documentation): Adjust indentation of example prompts

Align the example prompts with the bullet point above them for better readability.

Suggested change
```bash
GPT_PROMPT="Analyze the surf conditions and suggest the best time of day to surf."
```
```bash
GPT_PROMPT="Analyze the surf conditions and suggest the best time of day to surf."
```

```bash
GPT_PROMPT="What are some good places to eat around this surf spot"
```

**Notes on Usage**
- Common Issue: Without a payment method, this feature will not work as OpenAI will deny API requests from these accounts.
- API Costs: Using the GPT feature will consume tokens from your OpenAI account based on the size of your custom prompt and the responses.
- Response Time: Generating GPT responses may take longer than standard outputs, especially if there are outages.
- Model Selection: Using gpt-4 provides better results but may be slower and more expensive than gpt-3.5-turbo.
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion (documentation): Expand on model selection trade-offs

Consider providing more details on the differences between gpt-3.5-turbo and gpt-4 to help users make an informed decision.

Suggested change
- Model Selection: Using gpt-4 provides better results but may be slower and more expensive than gpt-3.5-turbo.
- Model Selection: GPT-4 provides more accurate and nuanced responses, especially for complex tasks, but is slower and more expensive. GPT-3.5-turbo is faster and more cost-effective, suitable for simpler queries or when quick responses are needed. Consider your specific use case and budget when choosing between these models.



## 📈 Contributing

Thank you for considering contributing to cli-surf!
Expand Down