Go to file
Sung Kim 58b63dfb0e Add handling for last chunk in split_into_sentences function
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.
2023-02-19 11:00:27 +09:00
apps Add handling for last chunk in split_into_sentences function 2023-02-19 11:00:27 +09:00
examples Merge pull request #131 from Spartee/add-redis-example 2023-02-15 08:04:01 -08:00
images adds guide on techniques to improve reliability 2022-09-02 12:19:11 -07:00
transition_guides_for_deprecated_API_endpoints removes deprecated Search function from deprecation code example (#130) 2023-02-13 16:59:22 -08:00
.gitignore Resolved PR comments from Boris 2022-10-26 16:30:38 +01:00
code_editing_examples.md refactors readme 2023-01-20 14:20:03 -08:00
code_explanation_examples.md refactors readme 2023-01-20 14:20:03 -08:00
code_writing_examples.md refactors readme 2023-01-20 14:20:03 -08:00
how_to_work_with_large_language_models.md small grammar fix 2023-01-29 11:56:13 -05:00
LICENSE Create LICENSE (#136) 2023-02-15 15:20:06 -08:00
README.md Add in the new Redis notebook to "new" section 2023-02-15 15:32:58 -06:00
techniques_to_improve_reliability.md Update techniques_to_improve_reliability.md 2023-01-20 19:58:37 -08:00
text_comparison_examples.md refactors readme 2023-01-20 14:20:03 -08:00
text_editing_examples.md refactors readme 2023-01-20 14:20:03 -08:00
text_explanation_examples.md refactors readme 2023-01-20 14:20:03 -08:00
text_writing_examples.md refactors readme 2023-01-20 14:20:03 -08:00

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 🆕

Guides & examples

Beyond the code examples here, you can learn about the OpenAI API from the following resources:

Contributing

If there are examples or guides you'd like to see, feel free to suggest them on the issues page.