mirror of
https://github.com/openai/openai-cookbook
synced 2024-11-04 06:00:33 +00:00
58b63dfb0e
I have added handling for the last chunk in the split_into_sentences function. Previously, the function did not account for the last chunk, which could lead to incomplete sentences in the output. To solve this, I added a conditional statement to check if the last chunk is non-empty. If it is, I append it to the list of chunks with a period to ensure the last sentence is complete. This change improves the accuracy of the split_into_sentences function and ensures that all sentences in the input text are properly segmented. Please review and let me know if you have any feedback or concerns. |
||
---|---|---|
apps | ||
examples | ||
images | ||
transition_guides_for_deprecated_API_endpoints | ||
.gitignore | ||
code_editing_examples.md | ||
code_explanation_examples.md | ||
code_writing_examples.md | ||
how_to_work_with_large_language_models.md | ||
LICENSE | ||
README.md | ||
techniques_to_improve_reliability.md | ||
text_comparison_examples.md | ||
text_editing_examples.md | ||
text_explanation_examples.md | ||
text_writing_examples.md |
OpenAI Cookbook
The OpenAI Cookbook shares example code for accomplishing common tasks with the OpenAI API.
To run these examples, you'll need an OpenAI account and associated API key (create a free account).
Most code examples are written in Python, though the concepts can be applied in any language.
Recently added 🆕 ✨
- Using Vector Databases for Embeddings Search with Redis [Feb 15th, 2023]
- Website Q&A with Embeddings [Feb 11th, 2023]
- File Q&A with Embeddings [Feb 11th, 2023]
- Visualize Embeddings in Weights & Biases [Feb 9th, 2023]
- Retrieval Enhanced Generative Question Answering with Pinecone [Feb 8th, 2023]
Guides & examples
- API usage
- GPT-3
- Embeddings
- Fine-tuning GPT-3
- DALL-E
- Azure OpenAI (alternative API from Microsoft Azure)
- Apps
Related resources
Beyond the code examples here, you can learn about the OpenAI API from the following resources:
- Try out the API in the OpenAI Playground
- Read about the API in the OpenAI Documentation
- Discuss the API in the OpenAI Community Forum
- Look for help in the OpenAI Help Center
- See example prompts in the OpenAI Examples
- Play with a free research preview of ChatGPT
- Stay up to date with the OpenAI Blog
Contributing
If there are examples or guides you'd like to see, feel free to suggest them on the issues page.