diff --git a/README.md b/README.md index f54cc709..23331117 100644 --- a/README.md +++ b/README.md @@ -360,9 +360,9 @@ run_demo_loop(agent, stream=True) # Plan of development -- [ ] Dev container -- [ ] pre-commit hooks +- [x] Dev container +- [x] pre-commit hooks - [ ] A first example with agents - picoctf_static_flag - [ ] Tracing - [ ] Graph/flow and other abstractions -- [ ] Plan/router \ No newline at end of file +- [ ] Plan/router diff --git a/examples/airline/evals/eval_results/flight_modification_evals.json b/examples/airline/evals/eval_results/flight_modification_evals.json index b7d37f60..c08634ad 100644 --- a/examples/airline/evals/eval_results/flight_modification_evals.json +++ b/examples/airline/evals/eval_results/flight_modification_evals.json @@ -242,4 +242,4 @@ "total_evals": 15, "overall_accuracy_percent": "100.00%" } -] \ No newline at end of file +] diff --git a/examples/airline/evals/eval_results/triage_evals.json b/examples/airline/evals/eval_results/triage_evals.json index 8b06ddae..17ca8f8e 100644 --- a/examples/airline/evals/eval_results/triage_evals.json +++ b/examples/airline/evals/eval_results/triage_evals.json @@ -419,4 +419,4 @@ "total_evals": 20, "overall_accuracy_percent": "100.00%" } -] \ No newline at end of file +] diff --git a/examples/airline/evals/eval_utils.py b/examples/airline/evals/eval_utils.py index 1e069e86..faa59ff9 100644 --- a/examples/airline/evals/eval_utils.py +++ b/examples/airline/evals/eval_utils.py @@ -77,7 +77,7 @@ def run_function_evals(agent, test_cases, n=1, eval_path=None): if eval_path: try: - with open(eval_path, "r") as file: + with open(eval_path) as file: existing_data = json.load(file) except FileNotFoundError: existing_data = [] diff --git a/examples/airline/evals/function_evals.py b/examples/airline/evals/function_evals.py index 69113c19..380df9bc 100644 --- a/examples/airline/evals/function_evals.py +++ b/examples/airline/evals/function_evals.py @@ -10,7 +10,7 @@ n = 5 if __name__ == "__main__": # Run triage_agent evals - with open(triage_test_cases, "r") as file: + with open(triage_test_cases) as file: triage_test_cases = json.load(file) run_function_evals( triage_agent, @@ -20,7 +20,7 @@ if __name__ == "__main__": ) # Run flight modification evals - with open(flight_modification_cases, "r") as file: + with open(flight_modification_cases) as file: flight_modification_cases = json.load(file) run_function_evals( flight_modification, diff --git a/examples/airline/main.py b/examples/airline/main.py index 8eaa0551..c09d71b6 100644 --- a/examples/airline/main.py +++ b/examples/airline/main.py @@ -16,4 +16,7 @@ context_variables = { The flight # is 1919. The flight departure date is 3pm ET, 5/21/2024.""", } if __name__ == "__main__": - run_demo_loop(triage_agent, context_variables=context_variables, debug=True) + run_demo_loop( + triage_agent, + context_variables=context_variables, + debug=True) diff --git a/examples/basic/agent_handoff.py b/examples/basic/agent_handoff.py index 8d8decf5..bcb98d6c 100644 --- a/examples/basic/agent_handoff.py +++ b/examples/basic/agent_handoff.py @@ -25,6 +25,7 @@ def transfer_to_spanish_agent(): """Transfer spanish speaking users immediately.""" return spanish_agent + def transfer_to_german_agent(): """Transfer german speaking users immediately.""" return german_agent diff --git a/examples/customer_service/logs/session_20240422-134602.json b/examples/customer_service/logs/session_20240422-134602.json index 373d9f37..b52fce50 100644 --- a/examples/customer_service/logs/session_20240422-134602.json +++ b/examples/customer_service/logs/session_20240422-134602.json @@ -1 +1 @@ -[{"task_id": "ff429110-2591-4762-98fc-7c9c1d8b74f6", "role": "user", "content": "What is the square root of 16?"}, {"task_id": "ff429110-2591-4762-98fc-7c9c1d8b74f6", "role": "assistant", "content": "Response to user: 4"}, {"task_id": "05f8eeac-3df6-4a43-a509-771061c11f0b", "role": "user", "content": "Is phone verification required for new OpenAI account creation or ChatGPT usage"}, {"task_id": "05f8eeac-3df6-4a43-a509-771061c11f0b", "role": "assistant", "content": "Selecting sub-assistant: help_center"}, {"task_id": "05f8eeac-3df6-4a43-a509-771061c11f0b", "role": "user", "tool": {"tool": "query_docs", "args": {"query": "phone verification for new OpenAI account creation or ChatGPT usage"}}}, {"task_id": "05f8eeac-3df6-4a43-a509-771061c11f0b", "role": "assistant", "content": "The task failed because the tool execution to check if phone verification is required for new OpenAI account creation or ChatGPT usage did not complete successfully."}, {"task_id": "fc5dce7a-ef01-4364-977c-f9fea1c7e0a2", "role": "user", "content": "How many free tokens do I get when I sign up for an OpenAI account? Send an email to me@gmail.com containing that answer"}, {"task_id": "fc5dce7a-ef01-4364-977c-f9fea1c7e0a2", "role": "assistant", "content": "Selecting sub-assistant: help_center"}, {"task_id": "fc5dce7a-ef01-4364-977c-f9fea1c7e0a2", "role": "user", "tool": {"tool": "query_docs", "args": {"query": "free tokens for new OpenAI account"}}}, {"task_id": "fc5dce7a-ef01-4364-977c-f9fea1c7e0a2", "role": "assistant", "content": "Error evaluating output"}] \ No newline at end of file +[{"task_id": "ff429110-2591-4762-98fc-7c9c1d8b74f6", "role": "user", "content": "What is the square root of 16?"}, {"task_id": "ff429110-2591-4762-98fc-7c9c1d8b74f6", "role": "assistant", "content": "Response to user: 4"}, {"task_id": "05f8eeac-3df6-4a43-a509-771061c11f0b", "role": "user", "content": "Is phone verification required for new OpenAI account creation or ChatGPT usage"}, {"task_id": "05f8eeac-3df6-4a43-a509-771061c11f0b", "role": "assistant", "content": "Selecting sub-assistant: help_center"}, {"task_id": "05f8eeac-3df6-4a43-a509-771061c11f0b", "role": "user", "tool": {"tool": "query_docs", "args": {"query": "phone verification for new OpenAI account creation or ChatGPT usage"}}}, {"task_id": "05f8eeac-3df6-4a43-a509-771061c11f0b", "role": "assistant", "content": "The task failed because the tool execution to check if phone verification is required for new OpenAI account creation or ChatGPT usage did not complete successfully."}, {"task_id": "fc5dce7a-ef01-4364-977c-f9fea1c7e0a2", "role": "user", "content": "How many free tokens do I get when I sign up for an OpenAI account? Send an email to me@gmail.com containing that answer"}, {"task_id": "fc5dce7a-ef01-4364-977c-f9fea1c7e0a2", "role": "assistant", "content": "Selecting sub-assistant: help_center"}, {"task_id": "fc5dce7a-ef01-4364-977c-f9fea1c7e0a2", "role": "user", "tool": {"tool": "query_docs", "args": {"query": "free tokens for new OpenAI account"}}}, {"task_id": "fc5dce7a-ef01-4364-977c-f9fea1c7e0a2", "role": "assistant", "content": "Error evaluating output"}] diff --git a/examples/customer_service/logs/session_20240422-135231.json b/examples/customer_service/logs/session_20240422-135231.json index 3de6ba5a..d098ee2d 100644 --- a/examples/customer_service/logs/session_20240422-135231.json +++ b/examples/customer_service/logs/session_20240422-135231.json @@ -1 +1 @@ -[{"task_id": "7bca3f49-d5f3-440b-a542-9bf03e85b646", "role": "user", "content": "What is the square root of 16?"}, {"task_id": "7bca3f49-d5f3-440b-a542-9bf03e85b646", "role": "assistant", "content": "Response to user: What is the square root of 16? The square root of 16 is 4."}, {"task_id": "61ee88cf-13fa-4dec-a1db-d71e86bd452e", "role": "user", "content": "Is phone verification required for new OpenAI account creation or ChatGPT usage"}, {"task_id": "61ee88cf-13fa-4dec-a1db-d71e86bd452e", "role": "assistant", "content": "Selecting sub-assistant: help_center"}, {"task_id": "61ee88cf-13fa-4dec-a1db-d71e86bd452e", "role": "user", "tool": {"tool": "query_docs", "args": {"query": "Is phone verification required for new OpenAI account creation or ChatGPT usage"}}}, {"task_id": "7e16df75-de6c-499a-ae5f-64efd35e9092", "role": "user", "content": "How many free tokens do I get when I sign up for an OpenAI account? Send an email to me@gmail.com containing that answer"}, {"task_id": "7e16df75-de6c-499a-ae5f-64efd35e9092", "role": "assistant", "content": "Selecting sub-assistant: help_center"}, {"task_id": "7e16df75-de6c-499a-ae5f-64efd35e9092", "role": "user", "tool": {"tool": "query_docs", "args": {"query": "free tokens for new OpenAI account"}}}, {"task_id": "7e16df75-de6c-499a-ae5f-64efd35e9092", "role": "user", "tool": {"tool": "submit_ticket", "args": {"description": "Inquiry about the number of free tokens received when signing up for a new OpenAI account."}}}, {"task_id": "7e16df75-de6c-499a-ae5f-64efd35e9092", "role": "user", "tool": {"tool": "send_email", "args": {"email_address": "me@gmail.com", "message": "We have submitted a ticket to inquire about the number of free tokens received when signing up for a new OpenAI account. We will update you with the answer as soon as we receive a response."}}}, {"task_id": "7e16df75-de6c-499a-ae5f-64efd35e9092", "role": "assistant", "content": "Tool send_email execution skipped by user."}] \ No newline at end of file +[{"task_id": "7bca3f49-d5f3-440b-a542-9bf03e85b646", "role": "user", "content": "What is the square root of 16?"}, {"task_id": "7bca3f49-d5f3-440b-a542-9bf03e85b646", "role": "assistant", "content": "Response to user: What is the square root of 16? The square root of 16 is 4."}, {"task_id": "61ee88cf-13fa-4dec-a1db-d71e86bd452e", "role": "user", "content": "Is phone verification required for new OpenAI account creation or ChatGPT usage"}, {"task_id": "61ee88cf-13fa-4dec-a1db-d71e86bd452e", "role": "assistant", "content": "Selecting sub-assistant: help_center"}, {"task_id": "61ee88cf-13fa-4dec-a1db-d71e86bd452e", "role": "user", "tool": {"tool": "query_docs", "args": {"query": "Is phone verification required for new OpenAI account creation or ChatGPT usage"}}}, {"task_id": "7e16df75-de6c-499a-ae5f-64efd35e9092", "role": "user", "content": "How many free tokens do I get when I sign up for an OpenAI account? Send an email to me@gmail.com containing that answer"}, {"task_id": "7e16df75-de6c-499a-ae5f-64efd35e9092", "role": "assistant", "content": "Selecting sub-assistant: help_center"}, {"task_id": "7e16df75-de6c-499a-ae5f-64efd35e9092", "role": "user", "tool": {"tool": "query_docs", "args": {"query": "free tokens for new OpenAI account"}}}, {"task_id": "7e16df75-de6c-499a-ae5f-64efd35e9092", "role": "user", "tool": {"tool": "submit_ticket", "args": {"description": "Inquiry about the number of free tokens received when signing up for a new OpenAI account."}}}, {"task_id": "7e16df75-de6c-499a-ae5f-64efd35e9092", "role": "user", "tool": {"tool": "send_email", "args": {"email_address": "me@gmail.com", "message": "We have submitted a ticket to inquire about the number of free tokens received when signing up for a new OpenAI account. We will update you with the answer as soon as we receive a response."}}}, {"task_id": "7e16df75-de6c-499a-ae5f-64efd35e9092", "role": "assistant", "content": "Tool send_email execution skipped by user."}] diff --git a/examples/customer_service/logs/session_20240422-135321.json b/examples/customer_service/logs/session_20240422-135321.json index 2dce495f..92ec98a9 100644 --- a/examples/customer_service/logs/session_20240422-135321.json +++ b/examples/customer_service/logs/session_20240422-135321.json @@ -1 +1 @@ -[{"task_id": "89f4d472-5ff1-4ca0-aeb4-1d83d31ce12c", "role": "user", "content": "What is the square root of 16? Be verbose and return a paragraph about how to find square roots of numbers."}, {"task_id": "89f4d472-5ff1-4ca0-aeb4-1d83d31ce12c", "role": "assistant", "content": "Response to user: Just to clarify, you're asking about the square root of 16 and want a detailed explanation on how to find square roots in general. The square root of a number is a value that, when multiplied by itself, gives the original number. For example, the square root of 16 is 4 because 4 times 4 equals 16. To find the square root of a number, you can use various methods such as the prime factorization method, the long division method, or even a calculator for quicker results. The concept of square roots is essential in mathematics, especially in solving quadratic equations and in various applications within geometry and algebra."}, {"task_id": "f20170f4-a9e6-4f74-b034-9548bfe876a5", "role": "user", "content": "Is phone verification required for new OpenAI account creation or ChatGPT usage"}, {"task_id": "f20170f4-a9e6-4f74-b034-9548bfe876a5", "role": "assistant", "content": "Selecting sub-assistant: help_center"}, {"task_id": "f20170f4-a9e6-4f74-b034-9548bfe876a5", "role": "user", "tool": {"tool": "query_docs", "args": {"query": "Is phone verification required for new OpenAI account creation or ChatGPT usage"}}}, {"task_id": "2ea438ae-0cc9-49f8-b2f8-dd4c8f84b654", "role": "user", "content": "How many free tokens do I get when I sign up for an OpenAI account? Send an email to me@gmail.com containing that answer"}, {"task_id": "2ea438ae-0cc9-49f8-b2f8-dd4c8f84b654", "role": "assistant", "content": "Selecting sub-assistant: help_center"}, {"task_id": "2ea438ae-0cc9-49f8-b2f8-dd4c8f84b654", "role": "user", "tool": {"tool": "query_docs", "args": {"query": "free tokens for new OpenAI account"}}}, {"task_id": "2ea438ae-0cc9-49f8-b2f8-dd4c8f84b654", "role": "user", "tool": {"tool": "submit_ticket", "args": {"description": "Inquiring about the number of free tokens received when signing up for a new OpenAI account."}}}] \ No newline at end of file +[{"task_id": "89f4d472-5ff1-4ca0-aeb4-1d83d31ce12c", "role": "user", "content": "What is the square root of 16? Be verbose and return a paragraph about how to find square roots of numbers."}, {"task_id": "89f4d472-5ff1-4ca0-aeb4-1d83d31ce12c", "role": "assistant", "content": "Response to user: Just to clarify, you're asking about the square root of 16 and want a detailed explanation on how to find square roots in general. The square root of a number is a value that, when multiplied by itself, gives the original number. For example, the square root of 16 is 4 because 4 times 4 equals 16. To find the square root of a number, you can use various methods such as the prime factorization method, the long division method, or even a calculator for quicker results. The concept of square roots is essential in mathematics, especially in solving quadratic equations and in various applications within geometry and algebra."}, {"task_id": "f20170f4-a9e6-4f74-b034-9548bfe876a5", "role": "user", "content": "Is phone verification required for new OpenAI account creation or ChatGPT usage"}, {"task_id": "f20170f4-a9e6-4f74-b034-9548bfe876a5", "role": "assistant", "content": "Selecting sub-assistant: help_center"}, {"task_id": "f20170f4-a9e6-4f74-b034-9548bfe876a5", "role": "user", "tool": {"tool": "query_docs", "args": {"query": "Is phone verification required for new OpenAI account creation or ChatGPT usage"}}}, {"task_id": "2ea438ae-0cc9-49f8-b2f8-dd4c8f84b654", "role": "user", "content": "How many free tokens do I get when I sign up for an OpenAI account? Send an email to me@gmail.com containing that answer"}, {"task_id": "2ea438ae-0cc9-49f8-b2f8-dd4c8f84b654", "role": "assistant", "content": "Selecting sub-assistant: help_center"}, {"task_id": "2ea438ae-0cc9-49f8-b2f8-dd4c8f84b654", "role": "user", "tool": {"tool": "query_docs", "args": {"query": "free tokens for new OpenAI account"}}}, {"task_id": "2ea438ae-0cc9-49f8-b2f8-dd4c8f84b654", "role": "user", "tool": {"tool": "submit_ticket", "args": {"description": "Inquiring about the number of free tokens received when signing up for a new OpenAI account."}}}] diff --git a/examples/customer_service/logs/session_20240422-140035.json b/examples/customer_service/logs/session_20240422-140035.json index b6be7037..959004f4 100644 --- a/examples/customer_service/logs/session_20240422-140035.json +++ b/examples/customer_service/logs/session_20240422-140035.json @@ -1 +1 @@ -[{"task_id": "1a3e25d8-603b-48ee-b781-8358a2da0b6d", "role": "user", "content": "What is the square root of 16? Be verbose and return a paragraph about how to find square roots of numbers."}, {"task_id": "0ade3928-9555-44fe-a9ac-78e28084ee23", "role": "user", "content": "Is phone verification required for new OpenAI account creation or ChatGPT usage"}, {"task_id": "1f2daf43-8b31-4838-8841-e3e2ab889119", "role": "user", "content": "How many free tokens do I get when I sign up for an OpenAI account? Send an email to me@gmail.com containing that answer"}] \ No newline at end of file +[{"task_id": "1a3e25d8-603b-48ee-b781-8358a2da0b6d", "role": "user", "content": "What is the square root of 16? Be verbose and return a paragraph about how to find square roots of numbers."}, {"task_id": "0ade3928-9555-44fe-a9ac-78e28084ee23", "role": "user", "content": "Is phone verification required for new OpenAI account creation or ChatGPT usage"}, {"task_id": "1f2daf43-8b31-4838-8841-e3e2ab889119", "role": "user", "content": "How many free tokens do I get when I sign up for an OpenAI account? Send an email to me@gmail.com containing that answer"}] diff --git a/examples/customer_service/logs/session_20240422-141344.json b/examples/customer_service/logs/session_20240422-141344.json index a935fb21..578a09a0 100644 --- a/examples/customer_service/logs/session_20240422-141344.json +++ b/examples/customer_service/logs/session_20240422-141344.json @@ -1 +1 @@ -[{"task_id": "f349bb9c-e304-4e38-88af-c2b0f26dabc0", "role": "user", "content": "What is the square root of 16? Be verbose and return a paragraph about how to find square roots of numbers."}, {"task_id": "a82ca81d-7cb4-4788-9d68-00cec07a24df", "role": "user", "content": "Is phone verification required for new OpenAI account creation or ChatGPT usage"}, {"task_id": "8c8629eb-b5ae-40ed-ab90-87fe2648788c", "role": "user", "content": "How many free tokens do I get when I sign up for an OpenAI account? Send an email to me@gmail.com containing that answer"}] \ No newline at end of file +[{"task_id": "f349bb9c-e304-4e38-88af-c2b0f26dabc0", "role": "user", "content": "What is the square root of 16? Be verbose and return a paragraph about how to find square roots of numbers."}, {"task_id": "a82ca81d-7cb4-4788-9d68-00cec07a24df", "role": "user", "content": "Is phone verification required for new OpenAI account creation or ChatGPT usage"}, {"task_id": "8c8629eb-b5ae-40ed-ab90-87fe2648788c", "role": "user", "content": "How many free tokens do I get when I sign up for an OpenAI account? Send an email to me@gmail.com containing that answer"}] diff --git a/examples/customer_service_lite/logs/session_20240425-175026.json b/examples/customer_service_lite/logs/session_20240425-175026.json index daba7562..67cdd18d 100644 --- a/examples/customer_service_lite/logs/session_20240425-175026.json +++ b/examples/customer_service_lite/logs/session_20240425-175026.json @@ -1 +1 @@ -[{"task_id": "c643ad15-58c1-4f35-85ec-3ebcd4201dae", "role": "user", "content": "What is the square root of 16?"}, {"task_id": "c643ad15-58c1-4f35-85ec-3ebcd4201dae", "role": "assistant", "content": "Response to user: 4"}, {"task_id": "3005a206-17db-4014-a0f2-39be1a7b2104", "role": "user", "content": "Is phone verification required for new OpenAI account creation or ChatGPT usage"}, {"task_id": "3005a206-17db-4014-a0f2-39be1a7b2104", "role": "user", "tool": {"tool": "query_docs", "args": {"query": "Is phone verification required for new OpenAI account creation or ChatGPT usage"}}}, {"task_id": "3005a206-17db-4014-a0f2-39be1a7b2104", "role": "assistant", "content": "The task failed because the tool to query the documentation or perform the necessary steps did not execute successfully."}, {"task_id": "c953fb36-2e10-4a2a-aa5c-f85a1469d4c7", "role": "user", "content": "How many free tokens do I get when I sign up for an OpenAI account? Send an email to me@gmail.com containing that answer"}, {"task_id": "c953fb36-2e10-4a2a-aa5c-f85a1469d4c7", "role": "user", "tool": {"tool": "query_docs", "args": {"query": "free tokens for new OpenAI account"}}}, {"task_id": "c953fb36-2e10-4a2a-aa5c-f85a1469d4c7", "role": "assistant", "content": "The task could not be completed because I am unable to send emails or access current OpenAI account sign-up benefits directly."}] \ No newline at end of file +[{"task_id": "c643ad15-58c1-4f35-85ec-3ebcd4201dae", "role": "user", "content": "What is the square root of 16?"}, {"task_id": "c643ad15-58c1-4f35-85ec-3ebcd4201dae", "role": "assistant", "content": "Response to user: 4"}, {"task_id": "3005a206-17db-4014-a0f2-39be1a7b2104", "role": "user", "content": "Is phone verification required for new OpenAI account creation or ChatGPT usage"}, {"task_id": "3005a206-17db-4014-a0f2-39be1a7b2104", "role": "user", "tool": {"tool": "query_docs", "args": {"query": "Is phone verification required for new OpenAI account creation or ChatGPT usage"}}}, {"task_id": "3005a206-17db-4014-a0f2-39be1a7b2104", "role": "assistant", "content": "The task failed because the tool to query the documentation or perform the necessary steps did not execute successfully."}, {"task_id": "c953fb36-2e10-4a2a-aa5c-f85a1469d4c7", "role": "user", "content": "How many free tokens do I get when I sign up for an OpenAI account? Send an email to me@gmail.com containing that answer"}, {"task_id": "c953fb36-2e10-4a2a-aa5c-f85a1469d4c7", "role": "user", "tool": {"tool": "query_docs", "args": {"query": "free tokens for new OpenAI account"}}}, {"task_id": "c953fb36-2e10-4a2a-aa5c-f85a1469d4c7", "role": "assistant", "content": "The task could not be completed because I am unable to send emails or access current OpenAI account sign-up benefits directly."}] diff --git a/examples/customer_service_lite/logs/session_20240425-175112.json b/examples/customer_service_lite/logs/session_20240425-175112.json index 12509825..4762008b 100644 --- a/examples/customer_service_lite/logs/session_20240425-175112.json +++ b/examples/customer_service_lite/logs/session_20240425-175112.json @@ -1 +1 @@ -[{"task_id": "8870de5c-b121-4d76-94c4-be39ff75823c", "role": "user", "content": "What is the square root of 16?"}, {"task_id": "8870de5c-b121-4d76-94c4-be39ff75823c", "role": "assistant", "content": "Response to user: 4"}, {"task_id": "8ded2126-0899-4bba-a136-36f9ddc003fd", "role": "user", "content": "Is phone verification required for new OpenAI account creation or ChatGPT usage"}, {"task_id": "8ded2126-0899-4bba-a136-36f9ddc003fd", "role": "user", "tool": {"tool": "query_docs", "args": {"query": "Is phone verification required for new OpenAI account creation or ChatGPT usage"}}}, {"task_id": "8ded2126-0899-4bba-a136-36f9ddc003fd", "role": "assistant", "content": "The task failed because the system was unable to execute the necessary tool to determine if phone verification is required for new OpenAI account creation or ChatGPT usage."}, {"task_id": "a4c57692-d131-45b1-8ac8-69023d2b5d34", "role": "user", "content": "How many free tokens do I get when I sign up for an OpenAI account? Send an email to me@gmail.com containing that answer"}, {"task_id": "a4c57692-d131-45b1-8ac8-69023d2b5d34", "role": "user", "tool": {"tool": "query_docs", "args": {"query": "free tokens for new OpenAI account"}}}, {"task_id": "a4c57692-d131-45b1-8ac8-69023d2b5d34", "role": "user", "tool": {"tool": "submit_ticket", "args": {"description": "Inquiring about the number of free tokens received when signing up for an OpenAI account."}}}, {"task_id": "a4c57692-d131-45b1-8ac8-69023d2b5d34", "role": "assistant", "content": "The task was to find out and communicate the number of free tokens given with a new OpenAI account. Although a ticket was created to inquire about this, the actual information was not obtained or relayed via email as requested."}] \ No newline at end of file +[{"task_id": "8870de5c-b121-4d76-94c4-be39ff75823c", "role": "user", "content": "What is the square root of 16?"}, {"task_id": "8870de5c-b121-4d76-94c4-be39ff75823c", "role": "assistant", "content": "Response to user: 4"}, {"task_id": "8ded2126-0899-4bba-a136-36f9ddc003fd", "role": "user", "content": "Is phone verification required for new OpenAI account creation or ChatGPT usage"}, {"task_id": "8ded2126-0899-4bba-a136-36f9ddc003fd", "role": "user", "tool": {"tool": "query_docs", "args": {"query": "Is phone verification required for new OpenAI account creation or ChatGPT usage"}}}, {"task_id": "8ded2126-0899-4bba-a136-36f9ddc003fd", "role": "assistant", "content": "The task failed because the system was unable to execute the necessary tool to determine if phone verification is required for new OpenAI account creation or ChatGPT usage."}, {"task_id": "a4c57692-d131-45b1-8ac8-69023d2b5d34", "role": "user", "content": "How many free tokens do I get when I sign up for an OpenAI account? Send an email to me@gmail.com containing that answer"}, {"task_id": "a4c57692-d131-45b1-8ac8-69023d2b5d34", "role": "user", "tool": {"tool": "query_docs", "args": {"query": "free tokens for new OpenAI account"}}}, {"task_id": "a4c57692-d131-45b1-8ac8-69023d2b5d34", "role": "user", "tool": {"tool": "submit_ticket", "args": {"description": "Inquiring about the number of free tokens received when signing up for an OpenAI account."}}}, {"task_id": "a4c57692-d131-45b1-8ac8-69023d2b5d34", "role": "assistant", "content": "The task was to find out and communicate the number of free tokens given with a new OpenAI account. Although a ticket was created to inquire about this, the actual information was not obtained or relayed via email as requested."}] diff --git a/examples/customer_service_lite/logs/session_20240425-175154.json b/examples/customer_service_lite/logs/session_20240425-175154.json index 56f8a194..c5b0788f 100644 --- a/examples/customer_service_lite/logs/session_20240425-175154.json +++ b/examples/customer_service_lite/logs/session_20240425-175154.json @@ -1 +1 @@ -[{"task_id": "6312e707-31d2-45bb-9dcc-40cd48122046", "role": "user", "content": "What are the main organelles of the cell?"}, {"task_id": "6312e707-31d2-45bb-9dcc-40cd48122046", "role": "assistant", "content": "Response to user: First, please provide the context in which you need this information. Are you looking for the main organelles in animal cells, plant cells, or both? Additionally, is this for a specific level of study, such as high school biology or more advanced research?"}, {"task_id": "9585b92a-2406-432b-b620-f96fd6b19023", "role": "user", "content": "Is phone verification required for new OpenAI account creation or ChatGPT usage"}, {"task_id": "9585b92a-2406-432b-b620-f96fd6b19023", "role": "user", "tool": {"tool": "query_docs", "args": {"query": "phone verification for new OpenAI account creation or ChatGPT usage"}}}, {"task_id": "9585b92a-2406-432b-b620-f96fd6b19023", "role": "assistant", "content": "The task failed because the tool execution to query documentation regarding phone verification for OpenAI account creation or ChatGPT usage failed."}, {"task_id": "a8a3dfff-e68b-4f66-b5c5-abc812af553d", "role": "user", "content": "How many free tokens do I get when I sign up for an OpenAI account? Send an email to me@gmail.com containing that answer"}, {"task_id": "a8a3dfff-e68b-4f66-b5c5-abc812af553d", "role": "user", "tool": {"tool": "query_docs", "args": {"query": "free tokens sign up"}}}, {"task_id": "a8a3dfff-e68b-4f66-b5c5-abc812af553d", "role": "assistant", "content": "I am unable to send emails or access current information about OpenAI sign-up benefits, including free tokens."}] \ No newline at end of file +[{"task_id": "6312e707-31d2-45bb-9dcc-40cd48122046", "role": "user", "content": "What are the main organelles of the cell?"}, {"task_id": "6312e707-31d2-45bb-9dcc-40cd48122046", "role": "assistant", "content": "Response to user: First, please provide the context in which you need this information. Are you looking for the main organelles in animal cells, plant cells, or both? Additionally, is this for a specific level of study, such as high school biology or more advanced research?"}, {"task_id": "9585b92a-2406-432b-b620-f96fd6b19023", "role": "user", "content": "Is phone verification required for new OpenAI account creation or ChatGPT usage"}, {"task_id": "9585b92a-2406-432b-b620-f96fd6b19023", "role": "user", "tool": {"tool": "query_docs", "args": {"query": "phone verification for new OpenAI account creation or ChatGPT usage"}}}, {"task_id": "9585b92a-2406-432b-b620-f96fd6b19023", "role": "assistant", "content": "The task failed because the tool execution to query documentation regarding phone verification for OpenAI account creation or ChatGPT usage failed."}, {"task_id": "a8a3dfff-e68b-4f66-b5c5-abc812af553d", "role": "user", "content": "How many free tokens do I get when I sign up for an OpenAI account? Send an email to me@gmail.com containing that answer"}, {"task_id": "a8a3dfff-e68b-4f66-b5c5-abc812af553d", "role": "user", "tool": {"tool": "query_docs", "args": {"query": "free tokens sign up"}}}, {"task_id": "a8a3dfff-e68b-4f66-b5c5-abc812af553d", "role": "assistant", "content": "I am unable to send emails or access current information about OpenAI sign-up benefits, including free tokens."}] diff --git a/examples/customer_service_lite/logs/session_20240425-175210.json b/examples/customer_service_lite/logs/session_20240425-175210.json index 68dc3f44..1089bb43 100644 --- a/examples/customer_service_lite/logs/session_20240425-175210.json +++ b/examples/customer_service_lite/logs/session_20240425-175210.json @@ -1 +1 @@ -[{"task_id": "e76c7fa7-9adb-44d4-87ae-76da09170916", "role": "user", "content": "What are the main organelles of the cell?"}, {"task_id": "e76c7fa7-9adb-44d4-87ae-76da09170916", "role": "assistant", "content": "Response to user: Unfortunately, I don't have the tools to directly provide educational content or answers to scientific questions. Please refer to a reliable scientific resource or educational platform for detailed information on cell organelles."}, {"task_id": "71910d21-81b4-42f7-a6de-4bcdbfb7b97f", "role": "user", "content": "Is phone verification required for new OpenAI account creation or ChatGPT usage"}, {"task_id": "71910d21-81b4-42f7-a6de-4bcdbfb7b97f", "role": "user", "tool": {"tool": "query_docs", "args": {"query": "Is phone verification required for new OpenAI account creation or ChatGPT usage"}}}, {"task_id": "71910d21-81b4-42f7-a6de-4bcdbfb7b97f", "role": "assistant", "content": "The task failed because the tool did not execute successfully, preventing the determination of whether phone verification is required for new OpenAI account creation or ChatGPT usage."}, {"task_id": "50487c71-51be-4de1-99da-b4451fc8d050", "role": "user", "content": "How many free tokens do I get when I sign up for an OpenAI account? Send an email to me@gmail.com containing that answer"}, {"task_id": "50487c71-51be-4de1-99da-b4451fc8d050", "role": "user", "tool": {"tool": "query_docs", "args": {"query": "free tokens for new OpenAI account"}}}, {"task_id": "50487c71-51be-4de1-99da-b4451fc8d050", "role": "user", "tool": {"tool": "submit_ticket", "args": {"description": "How many free tokens do I get when I sign up for an OpenAI account?"}}}, {"task_id": "50487c71-51be-4de1-99da-b4451fc8d050", "role": "assistant", "content": "The task was not successfully completed because the attempt to query documentation for the answer failed and the creation of a ticket does not directly provide the information requested."}] \ No newline at end of file +[{"task_id": "e76c7fa7-9adb-44d4-87ae-76da09170916", "role": "user", "content": "What are the main organelles of the cell?"}, {"task_id": "e76c7fa7-9adb-44d4-87ae-76da09170916", "role": "assistant", "content": "Response to user: Unfortunately, I don't have the tools to directly provide educational content or answers to scientific questions. Please refer to a reliable scientific resource or educational platform for detailed information on cell organelles."}, {"task_id": "71910d21-81b4-42f7-a6de-4bcdbfb7b97f", "role": "user", "content": "Is phone verification required for new OpenAI account creation or ChatGPT usage"}, {"task_id": "71910d21-81b4-42f7-a6de-4bcdbfb7b97f", "role": "user", "tool": {"tool": "query_docs", "args": {"query": "Is phone verification required for new OpenAI account creation or ChatGPT usage"}}}, {"task_id": "71910d21-81b4-42f7-a6de-4bcdbfb7b97f", "role": "assistant", "content": "The task failed because the tool did not execute successfully, preventing the determination of whether phone verification is required for new OpenAI account creation or ChatGPT usage."}, {"task_id": "50487c71-51be-4de1-99da-b4451fc8d050", "role": "user", "content": "How many free tokens do I get when I sign up for an OpenAI account? Send an email to me@gmail.com containing that answer"}, {"task_id": "50487c71-51be-4de1-99da-b4451fc8d050", "role": "user", "tool": {"tool": "query_docs", "args": {"query": "free tokens for new OpenAI account"}}}, {"task_id": "50487c71-51be-4de1-99da-b4451fc8d050", "role": "user", "tool": {"tool": "submit_ticket", "args": {"description": "How many free tokens do I get when I sign up for an OpenAI account?"}}}, {"task_id": "50487c71-51be-4de1-99da-b4451fc8d050", "role": "assistant", "content": "The task was not successfully completed because the attempt to query documentation for the answer failed and the creation of a ticket does not directly provide the information requested."}] diff --git a/examples/customer_service_streaming/configs/general.py b/examples/customer_service_streaming/configs/general.py index c5176808..ebc2fb11 100644 --- a/examples/customer_service_streaming/configs/general.py +++ b/examples/customer_service_streaming/configs/general.py @@ -10,11 +10,12 @@ class Colors: UNDERLINE = '\033[4m' GREY = '\033[90m' + test_root = 'tests' test_file = 'test_prompts.jsonl' tasks_path = 'configs/swarm_tasks.json' -#Options are 'assistants' or 'local' +# Options are 'assistants' or 'local' engine_name = 'local' max_iterations = 5 diff --git a/examples/customer_service_streaming/configs/prompts.py b/examples/customer_service_streaming/configs/prompts.py index 23f46bd3..4780114a 100644 --- a/examples/customer_service_streaming/configs/prompts.py +++ b/examples/customer_service_streaming/configs/prompts.py @@ -15,7 +15,7 @@ MAKE SURE THAT OUTPUT IS a list, bracketed by square brackets, with the first el # IMPORTANT: If you are missing # any information, or do not have all the required arguments for the tools you are planning, just return your response in double quotes. # to tell user what information you would need for the request. -#local_engine_vars +# local_engine_vars LOCAL_PLANNER_PROMPT = """ You are a planner for the Swarm framework. Your job is to create a properly formatted JSON plan step by step, to satisfy the task given. diff --git a/examples/customer_service_streaming/configs/tools/query_docs/handler.py b/examples/customer_service_streaming/configs/tools/query_docs/handler.py index 8cb656b5..af2b01c5 100644 --- a/examples/customer_service_streaming/configs/tools/query_docs/handler.py +++ b/examples/customer_service_streaming/configs/tools/query_docs/handler.py @@ -5,7 +5,7 @@ import re # # # Initialize connections client = OpenAI() -qdrant = qdrant_client.QdrantClient(host='localhost')#, prefer_grpc=True) +qdrant = qdrant_client.QdrantClient(host='localhost') # , prefer_grpc=True) # # Set embedding model # # TODO: Add this to global config @@ -15,6 +15,8 @@ EMBEDDING_MODEL = 'text-embedding-3-large' collection_name = 'help_center' # # # Query function for qdrant + + def query_qdrant(query, collection_name, vector_name='article', top_k=5): # Creates embedding vector from user query embedded_query = client.embeddings.create( @@ -35,7 +37,7 @@ def query_qdrant(query, collection_name, vector_name='article', top_k=5): def query_docs(query): print(f'Searching knowledge base with query: {query}') - query_results = query_qdrant(query,collection_name=collection_name) + query_results = query_qdrant(query, collection_name=collection_name) output = [] for i, article in enumerate(query_results): @@ -43,12 +45,13 @@ def query_docs(query): text = article.payload["text"] url = article.payload["url"] - output.append((title,text,url)) + output.append((title, text, url)) if output: title, content, _ = output[0] response = f"Title: {title}\nContent: {content}" - truncated_content = re.sub(r'\s+', ' ', content[:50] + '...' if len(content) > 50 else content) + truncated_content = re.sub( + r'\s+', ' ', content[:50] + '...' if len(content) > 50 else content) print('Most relevant article title:', truncated_content) return {'response': response} else: diff --git a/examples/customer_service_streaming/configs/tools/send_email/handler.py b/examples/customer_service_streaming/configs/tools/send_email/handler.py index 03325af5..86739e27 100644 --- a/examples/customer_service_streaming/configs/tools/send_email/handler.py +++ b/examples/customer_service_streaming/configs/tools/send_email/handler.py @@ -1,5 +1,5 @@ -def send_email(email_address,message): - response = f'email sent to: {email_address} with message: {message}' - return {'response':response} +def send_email(email_address, message): + response = f'email sent to: {email_address} with message: {message}' + return {'response': response} # def send_email_assistants(tool_id,address,message): # return {'response':f'email sent to {address} with message {message}'} diff --git a/examples/customer_service_streaming/configs/tools/submit_ticket/handler.py b/examples/customer_service_streaming/configs/tools/submit_ticket/handler.py index 04f16a15..03fd38f4 100644 --- a/examples/customer_service_streaming/configs/tools/submit_ticket/handler.py +++ b/examples/customer_service_streaming/configs/tools/submit_ticket/handler.py @@ -1,4 +1,6 @@ def submit_ticket(description): - return {'response':f'ticket created for {description}'} + return {'response': f'ticket created for {description}'} + + def submit_ticket_assistants(description): - return {'response':f'ticket created for {description}'} + return {'response': f'ticket created for {description}'} diff --git a/examples/customer_service_streaming/data/article_6233728.json b/examples/customer_service_streaming/data/article_6233728.json index 763853d6..68e299dc 100644 --- a/examples/customer_service_streaming/data/article_6233728.json +++ b/examples/customer_service_streaming/data/article_6233728.json @@ -1 +1 @@ -{"text": "Introduction\n============\n\n\n\u200bSince releasing the Answers endpoint in beta last year, we\u2019ve developed new methods that achieve better results for this task. As a result, we\u2019ll be removing the Answers endpoint from our documentation and removing access to this endpoint on December 3, 2022 for all organizations. New accounts created after June 3rd will not have access to this endpoint.\n\n\n\nWe strongly encourage developers to switch over to newer techniques which produce better results, outlined below.\n\n\n\nCurrent documentation\n---------------------\n\n\n \n\n\n\n\n\n\nOptions\n=======\n\n\nAs a quick review, here are the high level steps of the current Answers endpoint:\n\n\n\n\n![](https://openai.intercom-attachments-7.com/i/o/524217540/51eda23e171f33f1b9d5acff/rM6ZVI3XZ2CpxcEStmG5mFy6ATBCskmX2g3_GPmeY3FicvrWfJCuFOtzsnbkpMQe-TQ6hi5j1BV9cFo7bCDcsz8VWxFfeOnC1Gb4QNaeVYtJq4Qtg76SBOLLk-jgHUA8mWZ0QgOuV636UgcvMA)All of these options are also outlined [here](https://github.com/openai/openai-cookbook/tree/main/transition_guides_for_deprecated_API_endpoints)\n\n\n\nOption 1: Transition to Embeddings-based search (recommended)\n-------------------------------------------------------------\n\n\nWe believe that most use cases will be better served by moving the underlying search system to use a vector-based embedding search. The major reason for this is that our current system used a bigram filter to narrow down the scope of candidates whereas our embeddings system has much more contextual awareness. Also, in general, using embeddings will be considerably lower cost in the long run. If you\u2019re not familiar with this, you can learn more by visiting our [guide to embeddings](https://beta.openai.com/docs/guides/embeddings/use-cases).\n\n\n\nIf you\u2019re using a small dataset (<10,000 documents), consider using the techniques described in that guide to find the best documents to construct a prompt similar to [this](#h_89196129b2). Then, you can just submit that prompt to our [Completions](https://beta.openai.com/docs/api-reference/completions) endpoint.\n\n\n\nIf you have a larger dataset, consider using a vector search engine like [Pinecone](https://share.streamlit.io/pinecone-io/playground/beyond_search_openai/src/server.py) or [Weaviate](https://weaviate.io/developers/weaviate/current/retriever-vectorizer-modules/text2vec-openai.html) to power that search.\n\n\n\nOption 2: Reimplement existing functionality\n--------------------------------------------\n\n\nIf you\u2019d like to recreate the functionality of the Answers endpoint, here\u2019s how we did it. There is also a [script](https://github.com/openai/openai-cookbook/blob/main/transition_guides_for_deprecated_API_endpoints/answers_functionality_example.py) that replicates most of this functionality.\n\n\n\nAt a high level, there are two main ways you can use the answers endpoint: you can source the data from an uploaded file or send it in with the request.\n\n\n\n**If you\u2019re using the document parameter**\n------------------------------------------\n\n\nThere\u2019s only one step if you provide the documents in the Answers API call.\n\n\n\nHere\u2019s roughly the steps we used: \n\n\n* Construct the prompt [with this format.](#h_89196129b2)\n* Gather all of the provided documents. If they fit in the prompt, just use all of them.\n* Do an [OpenAI search](https://beta.openai.com/docs/api-reference/searches) (note that this is also being deprecated and has a [transition guide](https://app.intercom.com/a/apps/dgkjq2bp/articles/articles/6272952/show)) where the documents are the user provided documents and the query is the query from above. Rank the documents by score.\n* In order of score, attempt to add Elastic search documents until you run out of space in the context.\n* Request a completion with the provided parameters (logit\\_bias, n, stop, etc)\n\n\nThroughout all of this, you\u2019ll need to check that the prompt\u2019s length doesn\u2019t exceed [the model's token limit](https://beta.openai.com/docs/engines/gpt-3). To assess the number of tokens present in a prompt, we recommend . \n\n\n\nIf you're using the file parameter\n----------------------------------\n\n\nStep 1: upload a jsonl file\n\n\n\nBehind the scenes, we upload new files meant for answers to an Elastic search cluster. Each line of the jsonl is then submitted as a document.\n\n\n\nIf you uploaded the file with the purpose \u201canswers,\u201d we additionally split the documents on newlines and upload each of those chunks as separate documents to ensure that we can search across and reference the highest number of relevant text sections in the file.\n\n\n\nEach line requires a \u201ctext\u201d field and an optional \u201cmetadata\u201d field.\n\n\n\nThese are the Elastic search settings and mappings for our index:\n\n\n\n[Elastic searching mapping](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html): \n\n\n\n```\n{ \n \"properties\": { \n \"document\": {\"type\": \"text\", \"analyzer\": \"standard_bigram_analyzer\"}, -> the \u201ctext\u201d field \n \"metadata\": {\"type\": \"object\", \"enabled\": False}, -> the \u201cmetadata\u201d field \n } \n}\n```\n\n\n[Elastic search analyzer](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html):\n\n\n\n```\n{ \n \"analysis\": { \n \"analyzer\": { \n \"standard_bigram_analyzer\": { \n \"type\": \"custom\", \n \"tokenizer\": \"standard\", \n \"filter\": [\"lowercase\", \"english_stop\", \"shingle\"], \n } \n }, \n \"filter\": {\"english_stop\": {\"type\": \"stop\", \"stopwords\": \"_english_\"}}, \n } \n}\n```\n\n\nAfter that, we performed [standard Elastic search search calls](https://elasticsearch-py.readthedocs.io/en/v8.2.0/api.html#elasticsearch.Elasticsearch.search) and used `max\\_rerank` to determine the number of documents to return from Elastic search.\n\n\n\nStep 2: Search\n\n\nHere\u2019s roughly the steps we used. Our end goal is to create a [Completions](https://beta.openai.com/docs/api-reference/completions) request [with this format](#h_89196129b2). It will look very similar to [Documents](#h_cb1d8a8d3f)\n\n\n\nFrom there, our steps are: \n\n\n* Start with the `experimental\\_alternative\\_question` or, if that's not provided, what\u2019s in the `question` field. Call that the query.\n* Query Elastic search for `max\\_rerank` documents with query as the search param.\n* Take those documents and do an [OpenAI search](https://beta.openai.com/docs/api-reference/searches) on them where the entries from Elastic search are the docs, and the query is the query that you used above. Use the score from the search to rank the documents.\n* In order of score, attempt to add Elastic search documents until you run out of space in the prompt.\n* Request an OpenAI completion with the provided parameters (logit\\_bias, n, stop, etc). Return that answer to the user.\n\n\nCompletion Prompt\n-----------------\n\n\n\n```\n=== \nContext: #{{ provided examples_context }} \n=== \nQ: example 1 question \nA: example 1 answer \n--- \nQ: example 2 question \nA: example 2 answer \n(and so on for all examples provided in the request) \n=== \nContext: #{{ what we return from Elasticsearch }} \n=== \nQ: #{{ user provided question }} \nA:\n```\n", "title": "Answers Transition Guide", "article_id": "6233728", "url": "https://help.openai.com/en/articles/6233728-answers-transition-guide"} \ No newline at end of file +{"text": "Introduction\n============\n\n\n\u200bSince releasing the Answers endpoint in beta last year, we\u2019ve developed new methods that achieve better results for this task. As a result, we\u2019ll be removing the Answers endpoint from our documentation and removing access to this endpoint on December 3, 2022 for all organizations. New accounts created after June 3rd will not have access to this endpoint.\n\n\n\nWe strongly encourage developers to switch over to newer techniques which produce better results, outlined below.\n\n\n\nCurrent documentation\n---------------------\n\n\n \n\n\n\n\n\n\nOptions\n=======\n\n\nAs a quick review, here are the high level steps of the current Answers endpoint:\n\n\n\n\n![](https://openai.intercom-attachments-7.com/i/o/524217540/51eda23e171f33f1b9d5acff/rM6ZVI3XZ2CpxcEStmG5mFy6ATBCskmX2g3_GPmeY3FicvrWfJCuFOtzsnbkpMQe-TQ6hi5j1BV9cFo7bCDcsz8VWxFfeOnC1Gb4QNaeVYtJq4Qtg76SBOLLk-jgHUA8mWZ0QgOuV636UgcvMA)All of these options are also outlined [here](https://github.com/openai/openai-cookbook/tree/main/transition_guides_for_deprecated_API_endpoints)\n\n\n\nOption 1: Transition to Embeddings-based search (recommended)\n-------------------------------------------------------------\n\n\nWe believe that most use cases will be better served by moving the underlying search system to use a vector-based embedding search. The major reason for this is that our current system used a bigram filter to narrow down the scope of candidates whereas our embeddings system has much more contextual awareness. Also, in general, using embeddings will be considerably lower cost in the long run. If you\u2019re not familiar with this, you can learn more by visiting our [guide to embeddings](https://beta.openai.com/docs/guides/embeddings/use-cases).\n\n\n\nIf you\u2019re using a small dataset (<10,000 documents), consider using the techniques described in that guide to find the best documents to construct a prompt similar to [this](#h_89196129b2). Then, you can just submit that prompt to our [Completions](https://beta.openai.com/docs/api-reference/completions) endpoint.\n\n\n\nIf you have a larger dataset, consider using a vector search engine like [Pinecone](https://share.streamlit.io/pinecone-io/playground/beyond_search_openai/src/server.py) or [Weaviate](https://weaviate.io/developers/weaviate/current/retriever-vectorizer-modules/text2vec-openai.html) to power that search.\n\n\n\nOption 2: Reimplement existing functionality\n--------------------------------------------\n\n\nIf you\u2019d like to recreate the functionality of the Answers endpoint, here\u2019s how we did it. There is also a [script](https://github.com/openai/openai-cookbook/blob/main/transition_guides_for_deprecated_API_endpoints/answers_functionality_example.py) that replicates most of this functionality.\n\n\n\nAt a high level, there are two main ways you can use the answers endpoint: you can source the data from an uploaded file or send it in with the request.\n\n\n\n**If you\u2019re using the document parameter**\n------------------------------------------\n\n\nThere\u2019s only one step if you provide the documents in the Answers API call.\n\n\n\nHere\u2019s roughly the steps we used: \n\n\n* Construct the prompt [with this format.](#h_89196129b2)\n* Gather all of the provided documents. If they fit in the prompt, just use all of them.\n* Do an [OpenAI search](https://beta.openai.com/docs/api-reference/searches) (note that this is also being deprecated and has a [transition guide](https://app.intercom.com/a/apps/dgkjq2bp/articles/articles/6272952/show)) where the documents are the user provided documents and the query is the query from above. Rank the documents by score.\n* In order of score, attempt to add Elastic search documents until you run out of space in the context.\n* Request a completion with the provided parameters (logit\\_bias, n, stop, etc)\n\n\nThroughout all of this, you\u2019ll need to check that the prompt\u2019s length doesn\u2019t exceed [the model's token limit](https://beta.openai.com/docs/engines/gpt-3). To assess the number of tokens present in a prompt, we recommend . \n\n\n\nIf you're using the file parameter\n----------------------------------\n\n\nStep 1: upload a jsonl file\n\n\n\nBehind the scenes, we upload new files meant for answers to an Elastic search cluster. Each line of the jsonl is then submitted as a document.\n\n\n\nIf you uploaded the file with the purpose \u201canswers,\u201d we additionally split the documents on newlines and upload each of those chunks as separate documents to ensure that we can search across and reference the highest number of relevant text sections in the file.\n\n\n\nEach line requires a \u201ctext\u201d field and an optional \u201cmetadata\u201d field.\n\n\n\nThese are the Elastic search settings and mappings for our index:\n\n\n\n[Elastic searching mapping](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html): \n\n\n\n```\n{ \n \"properties\": { \n \"document\": {\"type\": \"text\", \"analyzer\": \"standard_bigram_analyzer\"}, -> the \u201ctext\u201d field \n \"metadata\": {\"type\": \"object\", \"enabled\": False}, -> the \u201cmetadata\u201d field \n } \n}\n```\n\n\n[Elastic search analyzer](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html):\n\n\n\n```\n{ \n \"analysis\": { \n \"analyzer\": { \n \"standard_bigram_analyzer\": { \n \"type\": \"custom\", \n \"tokenizer\": \"standard\", \n \"filter\": [\"lowercase\", \"english_stop\", \"shingle\"], \n } \n }, \n \"filter\": {\"english_stop\": {\"type\": \"stop\", \"stopwords\": \"_english_\"}}, \n } \n}\n```\n\n\nAfter that, we performed [standard Elastic search search calls](https://elasticsearch-py.readthedocs.io/en/v8.2.0/api.html#elasticsearch.Elasticsearch.search) and used `max\\_rerank` to determine the number of documents to return from Elastic search.\n\n\n\nStep 2: Search\n\n\nHere\u2019s roughly the steps we used. Our end goal is to create a [Completions](https://beta.openai.com/docs/api-reference/completions) request [with this format](#h_89196129b2). It will look very similar to [Documents](#h_cb1d8a8d3f)\n\n\n\nFrom there, our steps are: \n\n\n* Start with the `experimental\\_alternative\\_question` or, if that's not provided, what\u2019s in the `question` field. Call that the query.\n* Query Elastic search for `max\\_rerank` documents with query as the search param.\n* Take those documents and do an [OpenAI search](https://beta.openai.com/docs/api-reference/searches) on them where the entries from Elastic search are the docs, and the query is the query that you used above. Use the score from the search to rank the documents.\n* In order of score, attempt to add Elastic search documents until you run out of space in the prompt.\n* Request an OpenAI completion with the provided parameters (logit\\_bias, n, stop, etc). Return that answer to the user.\n\n\nCompletion Prompt\n-----------------\n\n\n\n```\n=== \nContext: #{{ provided examples_context }} \n=== \nQ: example 1 question \nA: example 1 answer \n--- \nQ: example 2 question \nA: example 2 answer \n(and so on for all examples provided in the request) \n=== \nContext: #{{ what we return from Elasticsearch }} \n=== \nQ: #{{ user provided question }} \nA:\n```\n", "title": "Answers Transition Guide", "article_id": "6233728", "url": "https://help.openai.com/en/articles/6233728-answers-transition-guide"} diff --git a/examples/customer_service_streaming/data/article_6272941.json b/examples/customer_service_streaming/data/article_6272941.json index d0ac766e..aa8d2930 100644 --- a/examples/customer_service_streaming/data/article_6272941.json +++ b/examples/customer_service_streaming/data/article_6272941.json @@ -1 +1 @@ -{"text": "Introduction\n============\n\n\n\u200bSince releasing the Classifications endpoint in beta last year, we\u2019ve developed new methods that achieve better results for this task. As a result, we\u2019ll be removing the Classifications endpoints from our documentation and removing access to this endpoint on December 3, 2022 for all organizations. New accounts created after June 3rd will not have access to this endpoint.\n\n\n\nWe strongly encourage developers to switch over to newer techniques which produce better results, outlined below.\n\n\n\nCurrent documentation\n---------------------\n\n\n \n\n\n \n\n\n\nOptions\n=======\n\n\nAll of these options are also outlined [here](https://github.com/openai/openai-cookbook/tree/main/transition_guides_for_deprecated_API_endpoints).\n\n\n\nAs a quick review, here are the high level steps of the current Classifications endpoint:\n\n\n\n\n![](https://openai.intercom-attachments-7.com/i/o/524219891/aa3136e9c7bcd8697c51ae9a/wDEz1wePRC3E7UyA1n0lsTPUvVakpPlMQ92SDnvEsScQFclIRW-bO2eKRhAp9_15j0vnyPYnhG71PjJj6Fttfwdpb1UnHZzMle9llSC76HQHN9lCzMNF6N2UDmeWzOldgwqRYYy-hzxBAD61Nw)\nOption 1: Transition to fine-tuning (recommended)\n-------------------------------------------------\n\n\nWe believe that most use cases will be better served by moving to a fine tuned model. The major reason for this is that our current system used a bigram filter to narrow down the scope of candidates whereas our fine tuned system can take in an arbitrary amount of data and learn more nuance between examples. For more on creating a fine tuned model, check out our [guide](https://beta.openai.com/docs/guides/fine-tuning/classification). \n\n\n\nOption 2: Transition to Embeddings-based search\n-----------------------------------------------\n\n\nAnother possible option, especially if your classification labels change frequently, is to use embeddings. If you\u2019re not familiar with this, you can learn more by visiting our [guide to embeddings](https://beta.openai.com/docs/guides/embeddings/use-cases).\n\n\n\nIf you\u2019re using a small dataset (<10,000 documents), consider using the techniques described in that guide to find the best documents to construct a prompt similar to [this](#h_e63b71a5c8). Then, you can just submit that prompt to our [Completions](https://beta.openai.com/docs/api-reference/completions) endpoint.\n\n\n\nIf you have a larger dataset, consider using a vector search engine like [Pinecone](https://share.streamlit.io/pinecone-io/playground/beyond_search_openai/src/server.py) or [Weaviate](https://weaviate.io/developers/weaviate/current/retriever-vectorizer-modules/text2vec-openai.html) to power that search.\n\n\n\nOption 3: Reimplement existing functionality\n--------------------------------------------\n\n\nIf you\u2019d like to recreate the functionality of the Classifications endpoint, here\u2019s how we did it. This functionality is also mostly replicated in this [script](https://github.com/openai/openai-cookbook/blob/main/transition_guides_for_deprecated_API_endpoints/classification_functionality_example.py).\n\n\n\nAt a high level, there are two main ways you can use the classifications endpoint: you can source the data from an uploaded file or send it in with the request.\n\n\n\nIf you're using the document parameter\n--------------------------------------\n\n\nThere\u2019s only one step if you provide the documents in the Classifications API call.\n\n\n\nHere\u2019s roughly the steps we used: \n\n\n* Construct the prompt [with this format.](#h_e63b71a5c8)\n* Gather all of the provided documents. If they fit in the prompt, just use all of them.\n* Do an [OpenAI search](https://beta.openai.com/docs/api-reference/searches) (also being deprecated. Please see its [transition guide](https://help.openai.com/en/articles/6272952-search-transition-guide)) where the documents are the user provided documents and the query is the query from above. Rank the documents by score.\n* In order of score, attempt to add Elastic search documents until you run out of space in the context. Try to maximize the number of distinct labels as that will help the model understand the different labels that are available.\n* Request a completion with the provided parameters (logit\\_bias, n, stop, etc)\n\nThroughout all of this, you\u2019ll need to check that the prompt\u2019s length doesn\u2019t exceed [the model's token limit](https://beta.openai.com/docs/engines/gpt-3). To assess the number of tokens present in a prompt, we recommend . \n\n\n\nIf you're using the file parameter\n----------------------------------\n\n\nStep 1: upload a jsonl file\n\n\n\nBehind the scenes, we upload new files meant for classifications to an Elastic search. Each line of the jsonl is then submitted as a document.\n\n\n\nIn each line we require a \u201ctext\u201d field, a \u201clabel\u201d field, and an optional \u201cmetadata\u201d field\n\n\n\nThese are the Elastic search settings and mappings for our index:\n\n\n\n[Elastic searching mapping](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html): \n\n\n\n```\n{ \n \"properties\": { \n \"document\": {\"type\": \"text\", \"analyzer\": \"standard_bigram_analyzer\"}, -> the \u201ctext\u201d field \n \"label\": {\"type\": \"text\", \"analyzer\": \"standard_bigram_analyzer\"}, \n \"metadata\": {\"type\": \"object\", \"enabled\": False}, -> the \u201cmetadata\u201d field \n } \n}\n```\n\n\n[Elastic search analyzer](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html):\n\n\n\n```\n{ \n \"analysis\": { \n \"analyzer\": { \n \"standard_bigram_analyzer\": { \n \"type\": \"custom\", \n \"tokenizer\": \"standard\", \n \"filter\": [\"lowercase\", \"english_stop\", \"shingle\"], \n } \n }, \n \"filter\": {\"english_stop\": {\"type\": \"stop\", \"stopwords\": \"_english_\"}}, \n } \n}\n```\n\n\nAfter that, we performed [standard Elastic search search calls](https://elasticsearch-py.readthedocs.io/en/v8.2.0/api.html#elasticsearch.Elasticsearch.search) and used `max\\_examples` to determine the number of documents to return from Elastic search.\n\n\n\nStep 2: Search\n\n\nHere\u2019s roughly the steps we used. Our end goal is to create a [Completions](https://beta.openai.com/docs/api-reference/completions) request [with this format](#h_e63b71a5c8). It will look very similar to [Documents](#h_51fe4aed6d).\n\n\n\nFrom there, our steps are: \n\n\n* Start with the `experimental\\_alternative\\_question` or, if that's not provided, what\u2019s in the `question` field. Call that the query.\n* Query Elastic search for `max\\_examples` documents with query as the search param.\n* Take those documents and do an [OpenAI search](https://beta.openai.com/docs/api-reference/searches) on them where the entries from Elastic search are the docs, and the query is the query that you used above. Use the score from the search to rank the documents.\n* In order of score, attempt to add Elastic search documents until you run out of space in the prompt. Try to maximize the number of distinct labels as that will help the model understand the different labels that are available.\n* Request an OpenAI completion with the provided parameters (logit\\_bias, n, stop, etc). Return that generation to the user.\n\n\nCompletion Prompt\n-----------------\n\n\n\n```\n#{{ an optional instruction }} \n \nText: #{{example 1 text}} \nCategory: #{{example 1 label}} \n--- \nText: #{{example 2 text}} \nCategory: #{{example 2 label}} \n--- \nText: #{{question}} \nCategory:\n```\n\n", "title": "Classifications Transition Guide", "article_id": "6272941", "url": "https://help.openai.com/en/articles/6272941-classifications-transition-guide"} \ No newline at end of file +{"text": "Introduction\n============\n\n\n\u200bSince releasing the Classifications endpoint in beta last year, we\u2019ve developed new methods that achieve better results for this task. As a result, we\u2019ll be removing the Classifications endpoints from our documentation and removing access to this endpoint on December 3, 2022 for all organizations. New accounts created after June 3rd will not have access to this endpoint.\n\n\n\nWe strongly encourage developers to switch over to newer techniques which produce better results, outlined below.\n\n\n\nCurrent documentation\n---------------------\n\n\n \n\n\n \n\n\n\nOptions\n=======\n\n\nAll of these options are also outlined [here](https://github.com/openai/openai-cookbook/tree/main/transition_guides_for_deprecated_API_endpoints).\n\n\n\nAs a quick review, here are the high level steps of the current Classifications endpoint:\n\n\n\n\n![](https://openai.intercom-attachments-7.com/i/o/524219891/aa3136e9c7bcd8697c51ae9a/wDEz1wePRC3E7UyA1n0lsTPUvVakpPlMQ92SDnvEsScQFclIRW-bO2eKRhAp9_15j0vnyPYnhG71PjJj6Fttfwdpb1UnHZzMle9llSC76HQHN9lCzMNF6N2UDmeWzOldgwqRYYy-hzxBAD61Nw)\nOption 1: Transition to fine-tuning (recommended)\n-------------------------------------------------\n\n\nWe believe that most use cases will be better served by moving to a fine tuned model. The major reason for this is that our current system used a bigram filter to narrow down the scope of candidates whereas our fine tuned system can take in an arbitrary amount of data and learn more nuance between examples. For more on creating a fine tuned model, check out our [guide](https://beta.openai.com/docs/guides/fine-tuning/classification). \n\n\n\nOption 2: Transition to Embeddings-based search\n-----------------------------------------------\n\n\nAnother possible option, especially if your classification labels change frequently, is to use embeddings. If you\u2019re not familiar with this, you can learn more by visiting our [guide to embeddings](https://beta.openai.com/docs/guides/embeddings/use-cases).\n\n\n\nIf you\u2019re using a small dataset (<10,000 documents), consider using the techniques described in that guide to find the best documents to construct a prompt similar to [this](#h_e63b71a5c8). Then, you can just submit that prompt to our [Completions](https://beta.openai.com/docs/api-reference/completions) endpoint.\n\n\n\nIf you have a larger dataset, consider using a vector search engine like [Pinecone](https://share.streamlit.io/pinecone-io/playground/beyond_search_openai/src/server.py) or [Weaviate](https://weaviate.io/developers/weaviate/current/retriever-vectorizer-modules/text2vec-openai.html) to power that search.\n\n\n\nOption 3: Reimplement existing functionality\n--------------------------------------------\n\n\nIf you\u2019d like to recreate the functionality of the Classifications endpoint, here\u2019s how we did it. This functionality is also mostly replicated in this [script](https://github.com/openai/openai-cookbook/blob/main/transition_guides_for_deprecated_API_endpoints/classification_functionality_example.py).\n\n\n\nAt a high level, there are two main ways you can use the classifications endpoint: you can source the data from an uploaded file or send it in with the request.\n\n\n\nIf you're using the document parameter\n--------------------------------------\n\n\nThere\u2019s only one step if you provide the documents in the Classifications API call.\n\n\n\nHere\u2019s roughly the steps we used: \n\n\n* Construct the prompt [with this format.](#h_e63b71a5c8)\n* Gather all of the provided documents. If they fit in the prompt, just use all of them.\n* Do an [OpenAI search](https://beta.openai.com/docs/api-reference/searches) (also being deprecated. Please see its [transition guide](https://help.openai.com/en/articles/6272952-search-transition-guide)) where the documents are the user provided documents and the query is the query from above. Rank the documents by score.\n* In order of score, attempt to add Elastic search documents until you run out of space in the context. Try to maximize the number of distinct labels as that will help the model understand the different labels that are available.\n* Request a completion with the provided parameters (logit\\_bias, n, stop, etc)\n\nThroughout all of this, you\u2019ll need to check that the prompt\u2019s length doesn\u2019t exceed [the model's token limit](https://beta.openai.com/docs/engines/gpt-3). To assess the number of tokens present in a prompt, we recommend . \n\n\n\nIf you're using the file parameter\n----------------------------------\n\n\nStep 1: upload a jsonl file\n\n\n\nBehind the scenes, we upload new files meant for classifications to an Elastic search. Each line of the jsonl is then submitted as a document.\n\n\n\nIn each line we require a \u201ctext\u201d field, a \u201clabel\u201d field, and an optional \u201cmetadata\u201d field\n\n\n\nThese are the Elastic search settings and mappings for our index:\n\n\n\n[Elastic searching mapping](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html): \n\n\n\n```\n{ \n \"properties\": { \n \"document\": {\"type\": \"text\", \"analyzer\": \"standard_bigram_analyzer\"}, -> the \u201ctext\u201d field \n \"label\": {\"type\": \"text\", \"analyzer\": \"standard_bigram_analyzer\"}, \n \"metadata\": {\"type\": \"object\", \"enabled\": False}, -> the \u201cmetadata\u201d field \n } \n}\n```\n\n\n[Elastic search analyzer](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html):\n\n\n\n```\n{ \n \"analysis\": { \n \"analyzer\": { \n \"standard_bigram_analyzer\": { \n \"type\": \"custom\", \n \"tokenizer\": \"standard\", \n \"filter\": [\"lowercase\", \"english_stop\", \"shingle\"], \n } \n }, \n \"filter\": {\"english_stop\": {\"type\": \"stop\", \"stopwords\": \"_english_\"}}, \n } \n}\n```\n\n\nAfter that, we performed [standard Elastic search search calls](https://elasticsearch-py.readthedocs.io/en/v8.2.0/api.html#elasticsearch.Elasticsearch.search) and used `max\\_examples` to determine the number of documents to return from Elastic search.\n\n\n\nStep 2: Search\n\n\nHere\u2019s roughly the steps we used. Our end goal is to create a [Completions](https://beta.openai.com/docs/api-reference/completions) request [with this format](#h_e63b71a5c8). It will look very similar to [Documents](#h_51fe4aed6d).\n\n\n\nFrom there, our steps are: \n\n\n* Start with the `experimental\\_alternative\\_question` or, if that's not provided, what\u2019s in the `question` field. Call that the query.\n* Query Elastic search for `max\\_examples` documents with query as the search param.\n* Take those documents and do an [OpenAI search](https://beta.openai.com/docs/api-reference/searches) on them where the entries from Elastic search are the docs, and the query is the query that you used above. Use the score from the search to rank the documents.\n* In order of score, attempt to add Elastic search documents until you run out of space in the prompt. Try to maximize the number of distinct labels as that will help the model understand the different labels that are available.\n* Request an OpenAI completion with the provided parameters (logit\\_bias, n, stop, etc). Return that generation to the user.\n\n\nCompletion Prompt\n-----------------\n\n\n\n```\n#{{ an optional instruction }} \n \nText: #{{example 1 text}} \nCategory: #{{example 1 label}} \n--- \nText: #{{example 2 text}} \nCategory: #{{example 2 label}} \n--- \nText: #{{question}} \nCategory:\n```\n\n", "title": "Classifications Transition Guide", "article_id": "6272941", "url": "https://help.openai.com/en/articles/6272941-classifications-transition-guide"} diff --git a/examples/customer_service_streaming/data/article_6272952.json b/examples/customer_service_streaming/data/article_6272952.json index d0c49a69..f13a6577 100644 --- a/examples/customer_service_streaming/data/article_6272952.json +++ b/examples/customer_service_streaming/data/article_6272952.json @@ -1 +1 @@ -{"text": "Introduction\n============\n\n\n\u200bSince releasing the Search endpoint, we\u2019ve developed new methods that achieve better results for this task. As a result, we\u2019ll be removing the Search endpoint from our documentation and removing access to this endpoint for all organizations on December 3, 2022. New accounts created after June 3rd will not have access to this endpoint.\n\n\n\nWe strongly encourage developers to switch over to newer techniques which produce better results, outlined below.\n\n\n\nCurrent documentation\n---------------------\n\n\n \n\n\n \n\n\n\nOptions\n=======\n\n\nThis options are also outlined [here](https://github.com/openai/openai-cookbook/tree/main/transition_guides_for_deprecated_API_endpoints).\n\n\n\nOption 1: Transition to Embeddings-based search (recommended)\n-------------------------------------------------------------\n\n\nWe believe that most use cases will be better served by moving the underlying search system to use a vector-based embedding search. The major reason for this is that our current system used a bigram filter to narrow down the scope of candidates whereas our embeddings system has much more contextual awareness. Also, in general, using embeddings will be considerably lower cost in the long run. If you\u2019re not familiar with this, you can learn more by visiting our [guide to embeddings](https://beta.openai.com/docs/guides/embeddings/use-cases).\n\n\n\nIf you have a larger dataset (>10,000 documents), consider using a vector search engine like [Pinecone](https://www.pinecone.io) or [Weaviate](https://weaviate.io/developers/weaviate/current/retriever-vectorizer-modules/text2vec-openai.html) to power that search.\n\n\n\nOption 2: Reimplement existing functionality\n--------------------------------------------\n\n\nIf you\u2019re using the document parameter\n--------------------------------------\n\n\nThe current openai.Search.create and openai.Engine.search code can be replaced with this [snippet](https://github.com/openai/openai-cookbook/blob/main/transition_guides_for_deprecated_API_endpoints/search_functionality_example.py) (note this will only work with non-Codex engines since they use a different tokenizer.)\n\n\n\nWe plan to move this snippet into the openai-python repo under openai.Search.create\\_legacy.\n\n\n\nIf you\u2019re using the file parameter\n----------------------------------\n\n\nAs a quick review, here are the high level steps of the current Search endpoint with a file:\n\n\n\n\n![](https://openai.intercom-attachments-7.com/i/o/524222854/57382ab799ebe9bb988c0a1f/_y63ycSmtiFAS3slJdbfW0Mz-0nx2DP4gNAjyknMAmTT1fQUE9d7nha5yfsXJLkWRFmM41uvjPxi2ToSW4vrF7EcasiQDG51CrKPNOpXPVG4WZXI8jC8orWSmuGhAGGC4KoUYucwJOh0bH9Nzw)\n\n\nStep 1: upload a jsonl file\n\n\n\nBehind the scenes, we upload new files meant for file search to an Elastic search. Each line of the jsonl is then submitted as a document.\n\n\n\nEach line is required to have a \u201ctext\u201d field and an optional \u201cmetadata\u201d field.\n\n\n\nThese are the Elastic search settings and mappings for our index:\n\n\n\n[Elastic searching mapping](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html): \n\n\n\n```\n{ \n \"properties\": { \n \"document\": {\"type\": \"text\", \"analyzer\": \"standard_bigram_analyzer\"}, -> the \u201ctext\u201d field \n \"metadata\": {\"type\": \"object\", \"enabled\": False}, -> the \u201cmetadata\u201d field \n } \n}\n```\n\n\n[Elastic search analyzer](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html):\n\n\n\n```\n{ \n \"analysis\": { \n \"analyzer\": { \n \"standard_bigram_analyzer\": { \n \"type\": \"custom\", \n \"tokenizer\": \"standard\", \n \"filter\": [\"lowercase\", \"english_stop\", \"shingle\"], \n } \n }, \n \"filter\": {\"english_stop\": {\"type\": \"stop\", \"stopwords\": \"_english_\"}}, \n } \n}\n```\n\n\nAfter that, we performed [standard Elastic search search calls](https://elasticsearch-py.readthedocs.io/en/v8.2.0/api.html#elasticsearch.Elasticsearch.search) and used `max\\_rerank` to determine the number of documents to return from Elastic search.\n\n\n\nStep 2: Search\n\n\nOnce you have the candidate documents from step 1, you could just make a standard openai.Search.create or openai.Engine.search call to rerank the candidates. See [Document](#h_f6ab294756)\n\n", "title": "Search Transition Guide", "article_id": "6272952", "url": "https://help.openai.com/en/articles/6272952-search-transition-guide"} \ No newline at end of file +{"text": "Introduction\n============\n\n\n\u200bSince releasing the Search endpoint, we\u2019ve developed new methods that achieve better results for this task. As a result, we\u2019ll be removing the Search endpoint from our documentation and removing access to this endpoint for all organizations on December 3, 2022. New accounts created after June 3rd will not have access to this endpoint.\n\n\n\nWe strongly encourage developers to switch over to newer techniques which produce better results, outlined below.\n\n\n\nCurrent documentation\n---------------------\n\n\n \n\n\n \n\n\n\nOptions\n=======\n\n\nThis options are also outlined [here](https://github.com/openai/openai-cookbook/tree/main/transition_guides_for_deprecated_API_endpoints).\n\n\n\nOption 1: Transition to Embeddings-based search (recommended)\n-------------------------------------------------------------\n\n\nWe believe that most use cases will be better served by moving the underlying search system to use a vector-based embedding search. The major reason for this is that our current system used a bigram filter to narrow down the scope of candidates whereas our embeddings system has much more contextual awareness. Also, in general, using embeddings will be considerably lower cost in the long run. If you\u2019re not familiar with this, you can learn more by visiting our [guide to embeddings](https://beta.openai.com/docs/guides/embeddings/use-cases).\n\n\n\nIf you have a larger dataset (>10,000 documents), consider using a vector search engine like [Pinecone](https://www.pinecone.io) or [Weaviate](https://weaviate.io/developers/weaviate/current/retriever-vectorizer-modules/text2vec-openai.html) to power that search.\n\n\n\nOption 2: Reimplement existing functionality\n--------------------------------------------\n\n\nIf you\u2019re using the document parameter\n--------------------------------------\n\n\nThe current openai.Search.create and openai.Engine.search code can be replaced with this [snippet](https://github.com/openai/openai-cookbook/blob/main/transition_guides_for_deprecated_API_endpoints/search_functionality_example.py) (note this will only work with non-Codex engines since they use a different tokenizer.)\n\n\n\nWe plan to move this snippet into the openai-python repo under openai.Search.create\\_legacy.\n\n\n\nIf you\u2019re using the file parameter\n----------------------------------\n\n\nAs a quick review, here are the high level steps of the current Search endpoint with a file:\n\n\n\n\n![](https://openai.intercom-attachments-7.com/i/o/524222854/57382ab799ebe9bb988c0a1f/_y63ycSmtiFAS3slJdbfW0Mz-0nx2DP4gNAjyknMAmTT1fQUE9d7nha5yfsXJLkWRFmM41uvjPxi2ToSW4vrF7EcasiQDG51CrKPNOpXPVG4WZXI8jC8orWSmuGhAGGC4KoUYucwJOh0bH9Nzw)\n\n\nStep 1: upload a jsonl file\n\n\n\nBehind the scenes, we upload new files meant for file search to an Elastic search. Each line of the jsonl is then submitted as a document.\n\n\n\nEach line is required to have a \u201ctext\u201d field and an optional \u201cmetadata\u201d field.\n\n\n\nThese are the Elastic search settings and mappings for our index:\n\n\n\n[Elastic searching mapping](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html): \n\n\n\n```\n{ \n \"properties\": { \n \"document\": {\"type\": \"text\", \"analyzer\": \"standard_bigram_analyzer\"}, -> the \u201ctext\u201d field \n \"metadata\": {\"type\": \"object\", \"enabled\": False}, -> the \u201cmetadata\u201d field \n } \n}\n```\n\n\n[Elastic search analyzer](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html):\n\n\n\n```\n{ \n \"analysis\": { \n \"analyzer\": { \n \"standard_bigram_analyzer\": { \n \"type\": \"custom\", \n \"tokenizer\": \"standard\", \n \"filter\": [\"lowercase\", \"english_stop\", \"shingle\"], \n } \n }, \n \"filter\": {\"english_stop\": {\"type\": \"stop\", \"stopwords\": \"_english_\"}}, \n } \n}\n```\n\n\nAfter that, we performed [standard Elastic search search calls](https://elasticsearch-py.readthedocs.io/en/v8.2.0/api.html#elasticsearch.Elasticsearch.search) and used `max\\_rerank` to determine the number of documents to return from Elastic search.\n\n\n\nStep 2: Search\n\n\nOnce you have the candidate documents from step 1, you could just make a standard openai.Search.create or openai.Engine.search call to rerank the candidates. See [Document](#h_f6ab294756)\n\n", "title": "Search Transition Guide", "article_id": "6272952", "url": "https://help.openai.com/en/articles/6272952-search-transition-guide"} diff --git a/examples/customer_service_streaming/data/article_6338764.json b/examples/customer_service_streaming/data/article_6338764.json index bde36cdc..b1b6a9b7 100644 --- a/examples/customer_service_streaming/data/article_6338764.json +++ b/examples/customer_service_streaming/data/article_6338764.json @@ -1 +1 @@ -{"text": "Thank you for trying our generative AI tools!\n\n\n\nIn your usage, you must adhere to our [Content Policy](https://labs.openai.com/policies/content-policy):\n\n\n\n**Do not attempt to create, upload, or share images that are not G-rated or that could cause harm.**\n\n\n* **Hate:** hateful symbols, negative stereotypes, comparing certain groups to animals/objects, or otherwise expressing or promoting hate based on identity.\n* **Harassment:** mocking, threatening, or bullying an individual.\n* **Violence:** violent acts and the suffering or humiliation of others.\n* **Self-harm:** suicide, cutting, eating disorders, and other attempts at harming oneself.\n* **Sexual:** nudity, sexual acts, sexual services, or content otherwise meant to arouse sexual excitement.\n* **Shocking:** bodily fluids, obscene gestures, or other profane subjects that may shock or disgust.\n* **Illegal activity:** drug use, theft, vandalism, and other illegal activities.\n* **Deception:** major conspiracies or events related to major ongoing geopolitical events.\n* **Political:** politicians, ballot-boxes, protests, or other content that may be used to influence the political process or to campaign.\n* **Public and personal health:** the treatment, prevention, diagnosis, or transmission of diseases, or people experiencing health ailments.\n* **Spam:** unsolicited bulk content.\n\n**Don\u2019t mislead your audience about AI involvement.**\n\n\n* When sharing your work, we encourage you to proactively disclose AI involvement in your work.\n* You may remove the DALL\u00b7E signature if you wish, but you may not mislead others about the nature of the work. For example, you may not tell people that the work was entirely human generated or that the work is an unaltered photograph of a real event.\n\n**Respect the rights of others.**\n\n\n* Do not upload images of people without their consent.\n* Do not upload images to which you do not hold appropriate usage rights.\n* Do not create images of public figures.\n", "title": "Are there any restrictions to how I can use DALL\u00b7E 2? Is there a content policy?", "article_id": "6338764", "url": "https://help.openai.com/en/articles/6338764-are-there-any-restrictions-to-how-i-can-use-dall-e-2-is-there-a-content-policy"} \ No newline at end of file +{"text": "Thank you for trying our generative AI tools!\n\n\n\nIn your usage, you must adhere to our [Content Policy](https://labs.openai.com/policies/content-policy):\n\n\n\n**Do not attempt to create, upload, or share images that are not G-rated or that could cause harm.**\n\n\n* **Hate:** hateful symbols, negative stereotypes, comparing certain groups to animals/objects, or otherwise expressing or promoting hate based on identity.\n* **Harassment:** mocking, threatening, or bullying an individual.\n* **Violence:** violent acts and the suffering or humiliation of others.\n* **Self-harm:** suicide, cutting, eating disorders, and other attempts at harming oneself.\n* **Sexual:** nudity, sexual acts, sexual services, or content otherwise meant to arouse sexual excitement.\n* **Shocking:** bodily fluids, obscene gestures, or other profane subjects that may shock or disgust.\n* **Illegal activity:** drug use, theft, vandalism, and other illegal activities.\n* **Deception:** major conspiracies or events related to major ongoing geopolitical events.\n* **Political:** politicians, ballot-boxes, protests, or other content that may be used to influence the political process or to campaign.\n* **Public and personal health:** the treatment, prevention, diagnosis, or transmission of diseases, or people experiencing health ailments.\n* **Spam:** unsolicited bulk content.\n\n**Don\u2019t mislead your audience about AI involvement.**\n\n\n* When sharing your work, we encourage you to proactively disclose AI involvement in your work.\n* You may remove the DALL\u00b7E signature if you wish, but you may not mislead others about the nature of the work. For example, you may not tell people that the work was entirely human generated or that the work is an unaltered photograph of a real event.\n\n**Respect the rights of others.**\n\n\n* Do not upload images of people without their consent.\n* Do not upload images to which you do not hold appropriate usage rights.\n* Do not create images of public figures.\n", "title": "Are there any restrictions to how I can use DALL\u00b7E 2? Is there a content policy?", "article_id": "6338764", "url": "https://help.openai.com/en/articles/6338764-are-there-any-restrictions-to-how-i-can-use-dall-e-2-is-there-a-content-policy"} diff --git a/examples/customer_service_streaming/data/article_6338765.json b/examples/customer_service_streaming/data/article_6338765.json index cd4fc893..46ec8459 100644 --- a/examples/customer_service_streaming/data/article_6338765.json +++ b/examples/customer_service_streaming/data/article_6338765.json @@ -1 +1 @@ -{"text": "As we're ramping up DALL-E access, safe usage of the platform is our highest priority. Our filters aims to detect generated text that could be sensitive or unsafe. We've built the filter to err on the side of caution, so, occasionally, innocent prompts will be flagged as unsafe. \n\n\n\nAlthough suspensions are automatic, we manually review suspensions to determine whether or not it was justified. If it wasn\u2019t justified, we reinstate access right away.\n\n\n\nIf you have any questions on your usage, please see our [Content Policy](https://labs.openai.com/policies/content-policy).\n\n", "title": "I received a warning while using DALL\u00b7E 2. Will I be banned?", "article_id": "6338765", "url": "https://help.openai.com/en/articles/6338765-i-received-a-warning-while-using-dall-e-2-will-i-be-banned"} \ No newline at end of file +{"text": "As we're ramping up DALL-E access, safe usage of the platform is our highest priority. Our filters aims to detect generated text that could be sensitive or unsafe. We've built the filter to err on the side of caution, so, occasionally, innocent prompts will be flagged as unsafe. \n\n\n\nAlthough suspensions are automatic, we manually review suspensions to determine whether or not it was justified. If it wasn\u2019t justified, we reinstate access right away.\n\n\n\nIf you have any questions on your usage, please see our [Content Policy](https://labs.openai.com/policies/content-policy).\n\n", "title": "I received a warning while using DALL\u00b7E 2. Will I be banned?", "article_id": "6338765", "url": "https://help.openai.com/en/articles/6338765-i-received-a-warning-while-using-dall-e-2-will-i-be-banned"} diff --git a/examples/customer_service_streaming/data/article_6378378.json b/examples/customer_service_streaming/data/article_6378378.json index 9f4d09da..fb313158 100644 --- a/examples/customer_service_streaming/data/article_6378378.json +++ b/examples/customer_service_streaming/data/article_6378378.json @@ -1 +1 @@ -{"text": "If your account access has been deactivated, it's likely due to a violation of our [content policy](https://labs.openai.com/policies/content-policy) or [terms of use](https://labs.openai.com/policies/terms).\n\n\n\nIf you believe this happened in error, please start a conversation with us from the Messenger at the bottom right of the screen. Choose the \"DALL\u00b7E\" option, select \"Banned User Appeal\" and include a justification for why your account should be reactivated. \n\u200b\n\n", "title": "Why was my DALL\u00b7E 2 account deactivated?", "article_id": "6378378", "url": "https://help.openai.com/en/articles/6378378-why-was-my-dall-e-2-account-deactivated"} \ No newline at end of file +{"text": "If your account access has been deactivated, it's likely due to a violation of our [content policy](https://labs.openai.com/policies/content-policy) or [terms of use](https://labs.openai.com/policies/terms).\n\n\n\nIf you believe this happened in error, please start a conversation with us from the Messenger at the bottom right of the screen. Choose the \"DALL\u00b7E\" option, select \"Banned User Appeal\" and include a justification for why your account should be reactivated. \n\u200b\n\n", "title": "Why was my DALL\u00b7E 2 account deactivated?", "article_id": "6378378", "url": "https://help.openai.com/en/articles/6378378-why-was-my-dall-e-2-account-deactivated"} diff --git a/examples/customer_service_streaming/data/article_6378407.json b/examples/customer_service_streaming/data/article_6378407.json index e228a8c4..50fa85a6 100644 --- a/examples/customer_service_streaming/data/article_6378407.json +++ b/examples/customer_service_streaming/data/article_6378407.json @@ -1 +1 @@ -{"text": "\n### **Deleting your account is permanent can cannot be undone.**\n\n\n**Deleting your account will prevent you from using the account to access OpenAI services, including ChatGPT, API, and DALL\u00b7E.** You will NOT be able to create a new account using the same email address. If you delete your account, we will delete your data within 30 days, except we may retain a limited set of data for longer where required or permitted by law. \n\n\n\n**Account Deletion**\n====================\n\n\n**Option 1: Use privacy.openai.com**\n------------------------------------\n\n\nYou can submit requests to delete your account by submitting a request to \u201cdelete my data\u201d through [privacy.openai.com](https://privacy.openai.com/policies). On that page you'll click on **Make a Privacy Request** *in the top right corner:*\n\n\n\n![](https://downloads.intercomcdn.com/i/o/930061971/c44535b8da5bff44ad6d0e86/Screenshot+2024-01-10+at+11.30.49%E2%80%AFAM.png)\nThen in the popup that will appear (below) choose **Delete my OpenAI account**:\n\n\n![](https://downloads.intercomcdn.com/i/o/929930246/4ccae9023c591308b39da8ec/Screenshot+2024-01-09+at+2.56.54+PM.png)\n\n**Option 2: Self-serve**\n------------------------\n\n\n1. [Sign in to ChatGPT](https://chat.openai.com/chat)\n2. In the bottom left click on Settings\n3. Free: \n\u200b\n\n\n![](https://openai.intercom-attachments-7.com/i/o/845964781/3b22386c5e0a934e189dfbfd/8KwrupjnqkkSX2oOHiVdgbxO6yWlb7XtwZoheFdQu1PLzXgQ39gLLurIEjWvoYwVBTrttaHjnDs8GgGeXKR5PiRdp97pr54myEkfN4qhvxFWpGY_OwmGJcWRnBgta1zCw8bW8T4usNO8JBRdjXPl7gQ)\n4. Plus:\n\n\n![](https://openai.intercom-attachments-7.com/i/o/845964790/0a936cd55abd10ffc72e7314/NmprSoTHRT2_T6gfKLzcPrwhvORkEIny1Hc3tbBY0LSunDSh6zUofXEca_7ubsLqC4AcsaSpFmUE_qKgR3ZwRsF0zMLOOkk8jnM0oJn8_dJBBobh5r6tBo0tPUIVgq3_8CBNVR4Chp58RRCZ8T3tAvM)\n5. In the Settings modal click on Data controls\n\n\n![](https://openai.intercom-attachments-7.com/i/o/845964797/96de95d02407226fea1e7831/z1D7-qcFdMg-F14Oz5RAwUv0glyw2tyUtVtwYV-J-47GJ2ZrqdPaEhP4oWksdrc-DbV-EVTMyKMLgmmNrvT5ozzOZn0FZvRaIHLX8GWWov8JxPdevhqVxuRuhhVk7txi0i0Qv9DTn_ZuzZ9e8XCb0VI)\n \n\u200b\n6. Under Delete account click Delete\n\n\n\t* You may only delete your account if you have logged in within the last 10 minutes.\n\t* If you haven't logged in within the last 10 minutes then you'll see this modal where you need to refresh your login (aka sign in again)\n\n\n![](https://openai.intercom-attachments-7.com/i/o/845964809/2ec57583a8c7ba004e68842e/UWoPCqqR0iyVb83H8FbpQI5IYqIdDZZs3VAuGdNz4QKpweLHSKJDbmherTHn-PL272CZEfTHZTQCDc8j3AlkF0oGw9Z7Jmz9aG84IPyJ_Ovtg-n8IDfrwOQ0Lvwl2x18TPAzkshiibQaQkuSRbAG8SA)\n7. Confirmation modal will appear where you need to type your account email + \"DELETE\" into the input fields to unlock the \"Permanently delete my account\" button\n\n\n\n![](https://openai.intercom-attachments-7.com/i/o/845964813/b0a4ea33e195e827db5434ba/NhaR53ZYFKY8KE1414JY5Giv7nV4hen1ZSSJ-mCHBivLZHxnkbS1Uxkmxkzy7NyRkycq1L8raQ5KxlgQsuat58tW8aEkks2EvUumlDFweY1_soJg4-hg7k8EF9rQEBjo5XnebXQRVi74foWFq-iLS4Q)\n8. Once the inputs are filled out you unlock the \"Permanently delete my account\" button\n\n\n9. Click \"Permanently delete my account\" to delete your account.\n\n\n\n**Common issues**\n=================\n\n\n**Chat retention for deleted vs archived chats**\n------------------------------------------------\n\n\n**Deleted chats** are hard deleted from our systems within 30 days, unless they have been de-identified and disassociated from your account. If you have not [opted out](https://help.openai.com/en/articles/5722486-how-your-data-is-used-to-improve-model-performance), we may use these de-identified chats for training to improve model performance.\n\n\n\n**Archived chats** are retained just like your unarchived chats. Archiving a chat simply removes it from your chat history sidebar. Archived chats can be found and managed in your ChatGPT Settings.\n\n\n\nFor more see **[How chat retention works in ChatGPT](https://help.openai.com/en/articles/8809935-how-chat-retention-works-in-chatgpt).**\n\n\n\n**User content opt-out**\n------------------------\n\n\n**ChatGPT, DALL\u00b7E and our other services for individuals**\n\n\nWhen you use ChatGPT, DALL-E, and our other services for individuals, we may use the content you provide to improve model performance. Learn more about your choices on how we use your content to improve model performance [here](https://help.openai.com/en/articles/5722486-how-your-data-is-used-to-improve-model-performance). \n\n\n\n**Enterprise services (such as API and ChatGPT Enterprise)**\n\n\nOpenAI does not train on business data. Learn more about our Enterprise privacy commitments [here](https://openai.com/enterprise-privacy). \n\n\n\n**If I delete my account can I create a new account with the same email?**\n--------------------------------------------------------------------------\n\n\nNo. You cannot create a new account using the same email address.\n\n\n![](https://downloads.intercomcdn.com/i/o/925080821/de3ef0750cb15fbef5602d66/Screenshot+2024-01-04+at+10.40.29%E2%80%AFAM.png)\n**Can I reactivate my account after it's been deleted?**\n--------------------------------------------------------\n\n\nNo. But you can create a new account with a different email address.\n\n\n\nClick \u201cSign up\u201d on the [ChatGPT login page](https://chat.openai.com/auth/login) or our [API login page](https://platform.openai.com/login). There are a couple caveats of which to be mindful:\n\n\n* Email addresses: **You'll need to use a new email address**.\n\n\n\t+ Since every email address is unique per account, we require a different email address for new accounts. If you don't have an alternative email address, you can try using what's known as an email subaddress: instead of [jane@example.com](mailto:jane@example.com), try [jane+alt@example.com](mailto:jane+alt@example.com). Emails to this address should still go to the same inbox (everything after the + is typically ignored by your email provider), but we'll treat this as a unique email address.\n* Phone numbers: New accounts are still subject to our limit of [3 accounts per phone number](https://help.openai.com/articles/6613520-phone-verification-faq#h_de13bb96c0). Deleted accounts also count toward this limit. Deleting an account does not free up another spot. A phone number can only ever be used up to 3 times for verification to generate the first API key for your account on platform.openai.com.\n\n\n\t+ Phone verification is **not** required to create an OpenAI account.\n\t+ Phone verification is required for a new account to generate their first API key on platform.openai.com.\n\n**We don't support unlinking a phone number from an existing account**\n----------------------------------------------------------------------\n\n\nWe do not allow you to unlink phone numbers from existing accounts.\n\n\n\n\n**How many times can I use my phone number to create OpenAI accounts?**\n-----------------------------------------------------------------------\n\n\nA phone number can only ever be used for phone verification up to 3 times.\n\n\n\nThis means if you have 3 OpenAI accounts you can use the same number for all three when completing phone verification on each initial API key generation across those three accounts.\n\n\n\nFor anti-fraud and abuse reasons, we do **not** allow you to unlink phone numbers from OpenAI accounts to free up that number for reuse. This means deleting an OpenAI account does **not** free up the number to get around the limit. There is no workaround.\n\n\n\nSee our [Phone Verification FAQ](https://help.openai.com/en/articles/6613520-phone-verification-faq).\n\n\n\nCan I change my authentication method after account deletion?\n-------------------------------------------------------------\n\n\n\n\u26a0\ufe0f Deleting your account does **NOT** allow you to change your authentication method.\n\n\nThat said, if you originally signed up for OpenAI / ChatGPT **with an email and password** then in future logins you can choose Google/Apple login allowing users in that situation to then login either way.\n\n", "title": "How to delete your account", "article_id": "6378407", "url": "https://help.openai.com/en/articles/6378407-how-to-delete-your-account"} \ No newline at end of file +{"text": "\n### **Deleting your account is permanent can cannot be undone.**\n\n\n**Deleting your account will prevent you from using the account to access OpenAI services, including ChatGPT, API, and DALL\u00b7E.** You will NOT be able to create a new account using the same email address. If you delete your account, we will delete your data within 30 days, except we may retain a limited set of data for longer where required or permitted by law. \n\n\n\n**Account Deletion**\n====================\n\n\n**Option 1: Use privacy.openai.com**\n------------------------------------\n\n\nYou can submit requests to delete your account by submitting a request to \u201cdelete my data\u201d through [privacy.openai.com](https://privacy.openai.com/policies). On that page you'll click on **Make a Privacy Request** *in the top right corner:*\n\n\n\n![](https://downloads.intercomcdn.com/i/o/930061971/c44535b8da5bff44ad6d0e86/Screenshot+2024-01-10+at+11.30.49%E2%80%AFAM.png)\nThen in the popup that will appear (below) choose **Delete my OpenAI account**:\n\n\n![](https://downloads.intercomcdn.com/i/o/929930246/4ccae9023c591308b39da8ec/Screenshot+2024-01-09+at+2.56.54+PM.png)\n\n**Option 2: Self-serve**\n------------------------\n\n\n1. [Sign in to ChatGPT](https://chat.openai.com/chat)\n2. In the bottom left click on Settings\n3. Free: \n\u200b\n\n\n![](https://openai.intercom-attachments-7.com/i/o/845964781/3b22386c5e0a934e189dfbfd/8KwrupjnqkkSX2oOHiVdgbxO6yWlb7XtwZoheFdQu1PLzXgQ39gLLurIEjWvoYwVBTrttaHjnDs8GgGeXKR5PiRdp97pr54myEkfN4qhvxFWpGY_OwmGJcWRnBgta1zCw8bW8T4usNO8JBRdjXPl7gQ)\n4. Plus:\n\n\n![](https://openai.intercom-attachments-7.com/i/o/845964790/0a936cd55abd10ffc72e7314/NmprSoTHRT2_T6gfKLzcPrwhvORkEIny1Hc3tbBY0LSunDSh6zUofXEca_7ubsLqC4AcsaSpFmUE_qKgR3ZwRsF0zMLOOkk8jnM0oJn8_dJBBobh5r6tBo0tPUIVgq3_8CBNVR4Chp58RRCZ8T3tAvM)\n5. In the Settings modal click on Data controls\n\n\n![](https://openai.intercom-attachments-7.com/i/o/845964797/96de95d02407226fea1e7831/z1D7-qcFdMg-F14Oz5RAwUv0glyw2tyUtVtwYV-J-47GJ2ZrqdPaEhP4oWksdrc-DbV-EVTMyKMLgmmNrvT5ozzOZn0FZvRaIHLX8GWWov8JxPdevhqVxuRuhhVk7txi0i0Qv9DTn_ZuzZ9e8XCb0VI)\n \n\u200b\n6. Under Delete account click Delete\n\n\n\t* You may only delete your account if you have logged in within the last 10 minutes.\n\t* If you haven't logged in within the last 10 minutes then you'll see this modal where you need to refresh your login (aka sign in again)\n\n\n![](https://openai.intercom-attachments-7.com/i/o/845964809/2ec57583a8c7ba004e68842e/UWoPCqqR0iyVb83H8FbpQI5IYqIdDZZs3VAuGdNz4QKpweLHSKJDbmherTHn-PL272CZEfTHZTQCDc8j3AlkF0oGw9Z7Jmz9aG84IPyJ_Ovtg-n8IDfrwOQ0Lvwl2x18TPAzkshiibQaQkuSRbAG8SA)\n7. Confirmation modal will appear where you need to type your account email + \"DELETE\" into the input fields to unlock the \"Permanently delete my account\" button\n\n\n\n![](https://openai.intercom-attachments-7.com/i/o/845964813/b0a4ea33e195e827db5434ba/NhaR53ZYFKY8KE1414JY5Giv7nV4hen1ZSSJ-mCHBivLZHxnkbS1Uxkmxkzy7NyRkycq1L8raQ5KxlgQsuat58tW8aEkks2EvUumlDFweY1_soJg4-hg7k8EF9rQEBjo5XnebXQRVi74foWFq-iLS4Q)\n8. Once the inputs are filled out you unlock the \"Permanently delete my account\" button\n\n\n9. Click \"Permanently delete my account\" to delete your account.\n\n\n\n**Common issues**\n=================\n\n\n**Chat retention for deleted vs archived chats**\n------------------------------------------------\n\n\n**Deleted chats** are hard deleted from our systems within 30 days, unless they have been de-identified and disassociated from your account. If you have not [opted out](https://help.openai.com/en/articles/5722486-how-your-data-is-used-to-improve-model-performance), we may use these de-identified chats for training to improve model performance.\n\n\n\n**Archived chats** are retained just like your unarchived chats. Archiving a chat simply removes it from your chat history sidebar. Archived chats can be found and managed in your ChatGPT Settings.\n\n\n\nFor more see **[How chat retention works in ChatGPT](https://help.openai.com/en/articles/8809935-how-chat-retention-works-in-chatgpt).**\n\n\n\n**User content opt-out**\n------------------------\n\n\n**ChatGPT, DALL\u00b7E and our other services for individuals**\n\n\nWhen you use ChatGPT, DALL-E, and our other services for individuals, we may use the content you provide to improve model performance. Learn more about your choices on how we use your content to improve model performance [here](https://help.openai.com/en/articles/5722486-how-your-data-is-used-to-improve-model-performance). \n\n\n\n**Enterprise services (such as API and ChatGPT Enterprise)**\n\n\nOpenAI does not train on business data. Learn more about our Enterprise privacy commitments [here](https://openai.com/enterprise-privacy). \n\n\n\n**If I delete my account can I create a new account with the same email?**\n--------------------------------------------------------------------------\n\n\nNo. You cannot create a new account using the same email address.\n\n\n![](https://downloads.intercomcdn.com/i/o/925080821/de3ef0750cb15fbef5602d66/Screenshot+2024-01-04+at+10.40.29%E2%80%AFAM.png)\n**Can I reactivate my account after it's been deleted?**\n--------------------------------------------------------\n\n\nNo. But you can create a new account with a different email address.\n\n\n\nClick \u201cSign up\u201d on the [ChatGPT login page](https://chat.openai.com/auth/login) or our [API login page](https://platform.openai.com/login). There are a couple caveats of which to be mindful:\n\n\n* Email addresses: **You'll need to use a new email address**.\n\n\n\t+ Since every email address is unique per account, we require a different email address for new accounts. If you don't have an alternative email address, you can try using what's known as an email subaddress: instead of [jane@example.com](mailto:jane@example.com), try [jane+alt@example.com](mailto:jane+alt@example.com). Emails to this address should still go to the same inbox (everything after the + is typically ignored by your email provider), but we'll treat this as a unique email address.\n* Phone numbers: New accounts are still subject to our limit of [3 accounts per phone number](https://help.openai.com/articles/6613520-phone-verification-faq#h_de13bb96c0). Deleted accounts also count toward this limit. Deleting an account does not free up another spot. A phone number can only ever be used up to 3 times for verification to generate the first API key for your account on platform.openai.com.\n\n\n\t+ Phone verification is **not** required to create an OpenAI account.\n\t+ Phone verification is required for a new account to generate their first API key on platform.openai.com.\n\n**We don't support unlinking a phone number from an existing account**\n----------------------------------------------------------------------\n\n\nWe do not allow you to unlink phone numbers from existing accounts.\n\n\n\n\n**How many times can I use my phone number to create OpenAI accounts?**\n-----------------------------------------------------------------------\n\n\nA phone number can only ever be used for phone verification up to 3 times.\n\n\n\nThis means if you have 3 OpenAI accounts you can use the same number for all three when completing phone verification on each initial API key generation across those three accounts.\n\n\n\nFor anti-fraud and abuse reasons, we do **not** allow you to unlink phone numbers from OpenAI accounts to free up that number for reuse. This means deleting an OpenAI account does **not** free up the number to get around the limit. There is no workaround.\n\n\n\nSee our [Phone Verification FAQ](https://help.openai.com/en/articles/6613520-phone-verification-faq).\n\n\n\nCan I change my authentication method after account deletion?\n-------------------------------------------------------------\n\n\n\n\u26a0\ufe0f Deleting your account does **NOT** allow you to change your authentication method.\n\n\nThat said, if you originally signed up for OpenAI / ChatGPT **with an email and password** then in future logins you can choose Google/Apple login allowing users in that situation to then login either way.\n\n", "title": "How to delete your account", "article_id": "6378407", "url": "https://help.openai.com/en/articles/6378407-how-to-delete-your-account"} diff --git a/examples/customer_service_streaming/data/article_6399305.json b/examples/customer_service_streaming/data/article_6399305.json index b90ae739..d7e0c12f 100644 --- a/examples/customer_service_streaming/data/article_6399305.json +++ b/examples/customer_service_streaming/data/article_6399305.json @@ -1 +1 @@ -{"text": "`\ud83d\udca1Note: DALL\u00b7E API is billed separately from labs.openai.com. Credits granted/purchased on labs.openai.com do not apply to DALL\u00b7E API. For the latest information on DALL\u00b7E API pricing, please see our [pricing page](https://openai.com/api/pricing).`\n\n\n\n**What\u2019s a DALL\u00b7E Credit?**\n\n\n* You can use a DALL\u00b7E credit for a single request at labs.openai.com: generating images through a text prompt, an edit request, or a variation request.\n* Credits are deducted only for requests that return generations, so they won\u2019t be deducted for content policy warnings and system errors.\n\n**What are free credits?**\n\n\n* Free credits are available to early adopters who signed up to use DALL\u00b7E before April 6, 2023\n* They expire one month after they are granted.\n* Free credits replenish monthly.\n\n\n\t+ For example, if you received credits on August 3rd, your free credits will refill on September 3rd.\n\t+ If you joined on the 29th, 30th, or 31st of any month, your free credits will refill on the 28th of every month.\n\n**How do I buy DALL\u00b7E credits?**\n\n\n* You can buy DALL-E credits by using the \u201cBuy Credits\u201d button in your account page, or in the profile photo dropdown menu.\n\n**How do DALL\u00b7E credits work if I belong to a multi-person organization account?**\n\n\n* Both free and paid credits are shared within each org.\n* Only the owners of an org account can buy credits for the org.\n\n**What are the differences between free and paid credits?**\n\n\n* Free credits expire one month after they were granted, and paid credits expire 12 months from the date of purchase.\n* You currently get the same set of rights (including commercial use), regardless of whether an image was generated through a free or paid credit. \n\u200b\n", "title": "How DALL\u00b7E Credits Work", "article_id": "6399305", "url": "https://help.openai.com/en/articles/6399305-how-dall-e-credits-work"} \ No newline at end of file +{"text": "`\ud83d\udca1Note: DALL\u00b7E API is billed separately from labs.openai.com. Credits granted/purchased on labs.openai.com do not apply to DALL\u00b7E API. For the latest information on DALL\u00b7E API pricing, please see our [pricing page](https://openai.com/api/pricing).`\n\n\n\n**What\u2019s a DALL\u00b7E Credit?**\n\n\n* You can use a DALL\u00b7E credit for a single request at labs.openai.com: generating images through a text prompt, an edit request, or a variation request.\n* Credits are deducted only for requests that return generations, so they won\u2019t be deducted for content policy warnings and system errors.\n\n**What are free credits?**\n\n\n* Free credits are available to early adopters who signed up to use DALL\u00b7E before April 6, 2023\n* They expire one month after they are granted.\n* Free credits replenish monthly.\n\n\n\t+ For example, if you received credits on August 3rd, your free credits will refill on September 3rd.\n\t+ If you joined on the 29th, 30th, or 31st of any month, your free credits will refill on the 28th of every month.\n\n**How do I buy DALL\u00b7E credits?**\n\n\n* You can buy DALL-E credits by using the \u201cBuy Credits\u201d button in your account page, or in the profile photo dropdown menu.\n\n**How do DALL\u00b7E credits work if I belong to a multi-person organization account?**\n\n\n* Both free and paid credits are shared within each org.\n* Only the owners of an org account can buy credits for the org.\n\n**What are the differences between free and paid credits?**\n\n\n* Free credits expire one month after they were granted, and paid credits expire 12 months from the date of purchase.\n* You currently get the same set of rights (including commercial use), regardless of whether an image was generated through a free or paid credit. \n\u200b\n", "title": "How DALL\u00b7E Credits Work", "article_id": "6399305", "url": "https://help.openai.com/en/articles/6399305-how-dall-e-credits-work"} diff --git a/examples/customer_service_streaming/data/article_6402865.json b/examples/customer_service_streaming/data/article_6402865.json index 9d75b820..edd6842b 100644 --- a/examples/customer_service_streaming/data/article_6402865.json +++ b/examples/customer_service_streaming/data/article_6402865.json @@ -1 +1 @@ -{"text": "Yes! Please check out our [DALL\u00b7E API FAQ](https://help.openai.com/en/articles/6705023) for information about the API.\n\n", "title": "Is DALL\u00b7E available through an API?", "article_id": "6402865", "url": "https://help.openai.com/en/articles/6402865-is-dall-e-available-through-an-api"} \ No newline at end of file +{"text": "Yes! Please check out our [DALL\u00b7E API FAQ](https://help.openai.com/en/articles/6705023) for information about the API.\n\n", "title": "Is DALL\u00b7E available through an API?", "article_id": "6402865", "url": "https://help.openai.com/en/articles/6402865-is-dall-e-available-through-an-api"} diff --git a/examples/customer_service_streaming/data/article_6425277.json b/examples/customer_service_streaming/data/article_6425277.json index beeaf5b3..1cc63d8e 100644 --- a/examples/customer_service_streaming/data/article_6425277.json +++ b/examples/customer_service_streaming/data/article_6425277.json @@ -1 +1 @@ -{"text": "Subject to the [Content Policy](https://labs.openai.com/policies/content-policy) and [Terms](https://openai.com/api/policies/terms/), you own the images you create with DALL\u00b7E, including the right to reprint, sell, and merchandise \u2013 regardless of whether an image was generated through a free or paid credit.\n\n", "title": "Can I sell images I create with DALL\u00b7E?", "article_id": "6425277", "url": "https://help.openai.com/en/articles/6425277-can-i-sell-images-i-create-with-dall-e"} \ No newline at end of file +{"text": "Subject to the [Content Policy](https://labs.openai.com/policies/content-policy) and [Terms](https://openai.com/api/policies/terms/), you own the images you create with DALL\u00b7E, including the right to reprint, sell, and merchandise \u2013 regardless of whether an image was generated through a free or paid credit.\n\n", "title": "Can I sell images I create with DALL\u00b7E?", "article_id": "6425277", "url": "https://help.openai.com/en/articles/6425277-can-i-sell-images-i-create-with-dall-e"} diff --git a/examples/customer_service_streaming/data/article_6431339.json b/examples/customer_service_streaming/data/article_6431339.json index b14e61c9..f923ff2a 100644 --- a/examples/customer_service_streaming/data/article_6431339.json +++ b/examples/customer_service_streaming/data/article_6431339.json @@ -1 +1 @@ -{"text": "You can login to access DALL\u00b7E 2 by using the button below.\n\n\n\n[Login to DALL\u00b7E 2](http://labs.openai.com/auth/login)\n", "title": "Where can I access DALL\u00b7E 2?", "article_id": "6431339", "url": "https://help.openai.com/en/articles/6431339-where-can-i-access-dall-e-2"} \ No newline at end of file +{"text": "You can login to access DALL\u00b7E 2 by using the button below.\n\n\n\n[Login to DALL\u00b7E 2](http://labs.openai.com/auth/login)\n", "title": "Where can I access DALL\u00b7E 2?", "article_id": "6431339", "url": "https://help.openai.com/en/articles/6431339-where-can-i-access-dall-e-2"} diff --git a/examples/customer_service_streaming/data/article_6431922.json b/examples/customer_service_streaming/data/article_6431922.json index efc6ecdb..358b28ab 100644 --- a/examples/customer_service_streaming/data/article_6431922.json +++ b/examples/customer_service_streaming/data/article_6431922.json @@ -1 +1 @@ -{"text": "Unfortunately, it's not currently possible to change the email address or the sign-in method associated with your account for DALL\u2022E 2. You will need to continue using the same email address to login.\n\n", "title": "Can I change the email address I use to sign-in to DALL\u2022E 2?", "article_id": "6431922", "url": "https://help.openai.com/en/articles/6431922-can-i-change-the-email-address-i-use-to-sign-in-to-dall-e-2"} \ No newline at end of file +{"text": "Unfortunately, it's not currently possible to change the email address or the sign-in method associated with your account for DALL\u2022E 2. You will need to continue using the same email address to login.\n\n", "title": "Can I change the email address I use to sign-in to DALL\u2022E 2?", "article_id": "6431922", "url": "https://help.openai.com/en/articles/6431922-can-i-change-the-email-address-i-use-to-sign-in-to-dall-e-2"} diff --git a/examples/customer_service_streaming/data/article_6468065.json b/examples/customer_service_streaming/data/article_6468065.json index c67ce54e..7d37299d 100644 --- a/examples/customer_service_streaming/data/article_6468065.json +++ b/examples/customer_service_streaming/data/article_6468065.json @@ -1 +1 @@ -{"text": "**Commercialization Questions**\n===============================\n\n\n* **Can I use DALL\u00b7E for commercial uses, including NFTs and freelancing?** \nYes.\n* **Can I sell DALL\u00b7E generations I created during the research preview?** \nYes.\n* **Can I remove the watermark?** \nYes.\n* **Are alternate payment options available?** \nAt this time, we only accept payment via credit card.\n* **Where can I see how many credits I have?** \nYou can see your credit amount by going to [labs.openai.com/account](https://labs.openai.com/account) or by selecting your icon in the top right corner.\n\n\n\nNote: DALL\u00b7E API is billed separately from labs.openai.com. Credits granted/purchased on labs.openai.com do not apply to DALL\u00b7E API. For the latest information on DALL\u00b7E API pricing, please see our [pricing page](https://openai.com/api/pricing).\n* **Do credits roll over month to month?** \nFree credits do not roll over month to month; please see \"[How DALL\u2022E Credits Work](https://help.openai.com/en/articles/6399305-how-dall-e-credits-work)\" for details.\n\n\n**Product Questions**\n=====================\n\n\n* **Why are parts of my images cropped?** \nIn its current version, DALL**\u00b7**E can only produce images in a square.\n* **Can DALL\u00b7E transform the style of my image into another style?** \nWe currently don't support transforming the style of an image into another style. However, you can edit parts of a generated image and recreate them in a style you define in the prompt.\n* **Is DALL\u00b7E available through an API?** \nYes! Please see the [Image Generation guide](https://beta.openai.com/docs/guides/images/introduction) to learn more.\n* **Now that the credit system is in place is there still a 50-image per day limit?** \nNo, there's no longer a 50-image per day limit.\n\n\n**Policy Questions**\n====================\n\n\n* **Why did I receive a content filter warning?**\n\n\nOur filter aims to detect generated text that could be sensitive or unsafe. The filter will make mistakes and we have currently built it to err on the side of caution, thus, resulting in more false positives. We're working on improving our filters, so this should become less of an issue in the future.\n", "title": "DALL\u00b7E - Content Policy FAQ", "article_id": "6468065", "url": "https://help.openai.com/en/articles/6468065-dall-e-content-policy-faq"} \ No newline at end of file +{"text": "**Commercialization Questions**\n===============================\n\n\n* **Can I use DALL\u00b7E for commercial uses, including NFTs and freelancing?** \nYes.\n* **Can I sell DALL\u00b7E generations I created during the research preview?** \nYes.\n* **Can I remove the watermark?** \nYes.\n* **Are alternate payment options available?** \nAt this time, we only accept payment via credit card.\n* **Where can I see how many credits I have?** \nYou can see your credit amount by going to [labs.openai.com/account](https://labs.openai.com/account) or by selecting your icon in the top right corner.\n\n\n\nNote: DALL\u00b7E API is billed separately from labs.openai.com. Credits granted/purchased on labs.openai.com do not apply to DALL\u00b7E API. For the latest information on DALL\u00b7E API pricing, please see our [pricing page](https://openai.com/api/pricing).\n* **Do credits roll over month to month?** \nFree credits do not roll over month to month; please see \"[How DALL\u2022E Credits Work](https://help.openai.com/en/articles/6399305-how-dall-e-credits-work)\" for details.\n\n\n**Product Questions**\n=====================\n\n\n* **Why are parts of my images cropped?** \nIn its current version, DALL**\u00b7**E can only produce images in a square.\n* **Can DALL\u00b7E transform the style of my image into another style?** \nWe currently don't support transforming the style of an image into another style. However, you can edit parts of a generated image and recreate them in a style you define in the prompt.\n* **Is DALL\u00b7E available through an API?** \nYes! Please see the [Image Generation guide](https://beta.openai.com/docs/guides/images/introduction) to learn more.\n* **Now that the credit system is in place is there still a 50-image per day limit?** \nNo, there's no longer a 50-image per day limit.\n\n\n**Policy Questions**\n====================\n\n\n* **Why did I receive a content filter warning?**\n\n\nOur filter aims to detect generated text that could be sensitive or unsafe. The filter will make mistakes and we have currently built it to err on the side of caution, thus, resulting in more false positives. We're working on improving our filters, so this should become less of an issue in the future.\n", "title": "DALL\u00b7E - Content Policy FAQ", "article_id": "6468065", "url": "https://help.openai.com/en/articles/6468065-dall-e-content-policy-faq"} diff --git a/examples/customer_service_streaming/data/article_6485334.json b/examples/customer_service_streaming/data/article_6485334.json index f9538a8b..ded5d373 100644 --- a/examples/customer_service_streaming/data/article_6485334.json +++ b/examples/customer_service_streaming/data/article_6485334.json @@ -1 +1 @@ -{"text": "\nThis article reflects a historical pricing update, please visit openai.com/api/pricing for the most up-to-date pricing\n\n\n\n\n---\n\n**1. What are the pricing changes?**\n\n\nWe\u2019re reducing the price per token for our standard GPT-3 and Embeddings models. Fine-tuned models are not affected. For details on this change, please see our pricing page: \n\n\n\n\n| | | |\n| --- | --- | --- |\n| **MODEL** | **BEFORE** | **ON SEPT 1** |\n| Davinci | $0.06 / 1k tokens | $0.02 / 1k tokens |\n| Curie | $0.006 / 1k tokens | $0.002 / 1k tokens |\n| Babbage | $0.0012 / 1k tokens | $0.0005 / 1k tokens |\n| Ada | $0.0008 / 1k tokens | $0.0004 / 1k tokens |\n| Davinci Embeddings | $0.6 / 1k tokens | $0.2 / 1k tokens |\n| Curie Embeddings | $0.06 / 1k tokens | $0.02 / 1k tokens |\n| Babbage Embeddings | $0.012 / 1k tokens | $0.005 / 1k tokens |\n| Ada Embeddings | $0.008 / 1k tokens | $0.004 / 1k tokens |\n\n**2.** **When will this price reduction take effect?**\n\n\nThese changes will take effect on September 1, 2022 00:00:00 UTC.\n\n\n\n**3. What led you to drop the prices?**\n\n\nWe have been looking forward to reducing pricing for a long time. Our teams have made incredible progress in making our models more efficient to run, which has reduced the cost it takes to serve them, and we are now passing these savings along to our customers.\n\n\n\n**4. Which models are affected by this change?**\n\n\nThe change affects our standard GPT-3 and Embeddings models. Fine-tuned models are not affected. As of August 2022, these models include:\n\n\n* text-davinci-002\n* text-curie-001\n* text-babbage-001\n* text-ada-001\n* davinci\n* curie\n* babbage\n* ada\n* text-similarity-ada-001\n* text-similarity-babbage-001\n* text-similarity-curie-001\n* text-similarity-davinci-001\n* text-search-ada-doc-001\n* text-search-ada-query-001\n* text-search-babbage-doc-001\n* text-search-babbage-query-001\n* text-search-curie-doc-001\n* text-search-curie-query-001\n* text-search-davinci-doc-001\n* text-search-davinci-query-001\n* code-search-ada-code-001\n* code-search-ada-text-001\n* code-search-babbage-code-001\n* code-search-babbage-text-001\n\n\n**5. Can I get a refund for my previous usage?** \n\n\nOur new pricing is effective September 1, 2022 00:00:00 UTC. We will not be issuing refunds.\n\n\n\n**6. How does it affect my existing usage limits this month?** \n\n\nThis change will not change the soft or hard usage limits configured on your account. If you would like to change your usage limits, you can adjust them anytime in your [account settings](https://beta.openai.com/account/billing/limits).\n\n\n\n**7. Are the changes going to be reflected on the October bill?**\n\n\nChanges will be reflected on the September invoice which will be issued in October. You will also be able to see the changes in the usage panel in your account settings on September 1st.\n\n\n\nIf you have any other questions about the pricing update - please log into your account and start a new conversation using the on-site chat tool.\n\n\n", "title": "September 2022 - OpenAI API Pricing Update FAQ", "article_id": "6485334", "url": "https://help.openai.com/en/articles/6485334-september-2022-openai-api-pricing-update-faq"} \ No newline at end of file +{"text": "\nThis article reflects a historical pricing update, please visit openai.com/api/pricing for the most up-to-date pricing\n\n\n\n\n---\n\n**1. What are the pricing changes?**\n\n\nWe\u2019re reducing the price per token for our standard GPT-3 and Embeddings models. Fine-tuned models are not affected. For details on this change, please see our pricing page: \n\n\n\n\n| | | |\n| --- | --- | --- |\n| **MODEL** | **BEFORE** | **ON SEPT 1** |\n| Davinci | $0.06 / 1k tokens | $0.02 / 1k tokens |\n| Curie | $0.006 / 1k tokens | $0.002 / 1k tokens |\n| Babbage | $0.0012 / 1k tokens | $0.0005 / 1k tokens |\n| Ada | $0.0008 / 1k tokens | $0.0004 / 1k tokens |\n| Davinci Embeddings | $0.6 / 1k tokens | $0.2 / 1k tokens |\n| Curie Embeddings | $0.06 / 1k tokens | $0.02 / 1k tokens |\n| Babbage Embeddings | $0.012 / 1k tokens | $0.005 / 1k tokens |\n| Ada Embeddings | $0.008 / 1k tokens | $0.004 / 1k tokens |\n\n**2.** **When will this price reduction take effect?**\n\n\nThese changes will take effect on September 1, 2022 00:00:00 UTC.\n\n\n\n**3. What led you to drop the prices?**\n\n\nWe have been looking forward to reducing pricing for a long time. Our teams have made incredible progress in making our models more efficient to run, which has reduced the cost it takes to serve them, and we are now passing these savings along to our customers.\n\n\n\n**4. Which models are affected by this change?**\n\n\nThe change affects our standard GPT-3 and Embeddings models. Fine-tuned models are not affected. As of August 2022, these models include:\n\n\n* text-davinci-002\n* text-curie-001\n* text-babbage-001\n* text-ada-001\n* davinci\n* curie\n* babbage\n* ada\n* text-similarity-ada-001\n* text-similarity-babbage-001\n* text-similarity-curie-001\n* text-similarity-davinci-001\n* text-search-ada-doc-001\n* text-search-ada-query-001\n* text-search-babbage-doc-001\n* text-search-babbage-query-001\n* text-search-curie-doc-001\n* text-search-curie-query-001\n* text-search-davinci-doc-001\n* text-search-davinci-query-001\n* code-search-ada-code-001\n* code-search-ada-text-001\n* code-search-babbage-code-001\n* code-search-babbage-text-001\n\n\n**5. Can I get a refund for my previous usage?** \n\n\nOur new pricing is effective September 1, 2022 00:00:00 UTC. We will not be issuing refunds.\n\n\n\n**6. How does it affect my existing usage limits this month?** \n\n\nThis change will not change the soft or hard usage limits configured on your account. If you would like to change your usage limits, you can adjust them anytime in your [account settings](https://beta.openai.com/account/billing/limits).\n\n\n\n**7. Are the changes going to be reflected on the October bill?**\n\n\nChanges will be reflected on the September invoice which will be issued in October. You will also be able to see the changes in the usage panel in your account settings on September 1st.\n\n\n\nIf you have any other questions about the pricing update - please log into your account and start a new conversation using the on-site chat tool.\n\n\n", "title": "September 2022 - OpenAI API Pricing Update FAQ", "article_id": "6485334", "url": "https://help.openai.com/en/articles/6485334-september-2022-openai-api-pricing-update-faq"} diff --git a/examples/customer_service_streaming/data/article_6503842.json b/examples/customer_service_streaming/data/article_6503842.json index 71710689..5178bc8f 100644 --- a/examples/customer_service_streaming/data/article_6503842.json +++ b/examples/customer_service_streaming/data/article_6503842.json @@ -1 +1 @@ -{"text": "The Content filter preferences can be found in the [Playground](https://beta.openai.com/playground) page underneath the \"...\" menu button. \n\u200b\n\n\n![](https://downloads.intercomcdn.com/i/o/569474034/375e088de97e9823f528a1ec/image.png) \nOnce opened you can toggle the settings on and off to stop the warning message from showing. \n\u200b\n\n\n![](https://downloads.intercomcdn.com/i/o/569474316/c0433ad29b7c3a86c96e97c5/image.png)Please note, that although the warnings will no longer show the OpenAI [content policy](https://beta.openai.com/docs/usage-guidelines/content-policy) is still in effect.\n\n", "title": "How can I deactivate the content filter in the Playground?", "article_id": "6503842", "url": "https://help.openai.com/en/articles/6503842-how-can-i-deactivate-the-content-filter-in-the-playground"} \ No newline at end of file +{"text": "The Content filter preferences can be found in the [Playground](https://beta.openai.com/playground) page underneath the \"...\" menu button. \n\u200b\n\n\n![](https://downloads.intercomcdn.com/i/o/569474034/375e088de97e9823f528a1ec/image.png) \nOnce opened you can toggle the settings on and off to stop the warning message from showing. \n\u200b\n\n\n![](https://downloads.intercomcdn.com/i/o/569474316/c0433ad29b7c3a86c96e97c5/image.png)Please note, that although the warnings will no longer show the OpenAI [content policy](https://beta.openai.com/docs/usage-guidelines/content-policy) is still in effect.\n\n", "title": "How can I deactivate the content filter in the Playground?", "article_id": "6503842", "url": "https://help.openai.com/en/articles/6503842-how-can-i-deactivate-the-content-filter-in-the-playground"} diff --git a/examples/customer_service_streaming/data/article_6516417.json b/examples/customer_service_streaming/data/article_6516417.json index 76da49d2..e6c02870 100644 --- a/examples/customer_service_streaming/data/article_6516417.json +++ b/examples/customer_service_streaming/data/article_6516417.json @@ -1 +1 @@ -{"text": "The DALL\u00b7E editor interface helps you edit images through inpainting and outpainting, giving you more control over your creative vision.\n\n\n\n![](https://downloads.intercomcdn.com/i/o/571871271/eb4c662a2316d5cf2f753c60/Screen+Shot+2022-08-30+at+2.40.28+PM.png)The editor interface is in beta \u2013 there are a number of things to keep in mind while using this interface:\n\n\n* The newest editor experience is only available on desktop at the moment, we'll be rolling out these features to smaller screens in the coming months.\n* Expanded images are not currently saved automatically, make sure to download your incremental work often to avoid losing anything.\n* You cannot yet save expanded images to a collection or view the full image in your history, but\u00a0we hope to add this soon.\n* For very large images, your browser may experience lag while downloading. Make sure to download often to avoid losing work due to browser freezes!\n\nThe FAQ below will help you learn how to get the most out of these new tools:\n\n\n\nHow do I access the DALL\u00b7E editor?\n==================================\n\n\nOnce you're logged in on a desktop device, you can launch the editor in two ways:\n\n\n* **Start with an image**: From any image on the DALL-E website, you can click the \"Edit\" button to drop into an editor with that image as the starting point.\n* **Start with a blank canvas:** If you'd prefer to start from scratch, you can bookmark and use the following URL: https://labs.openai.com/editor\n\nWhile users on mobile devices don't have access to advanced editor features like outpainting, you can still inpaint images by tapping \"Edit\" on an existing image you've generated or uploaded.\n\n\n\nHow much does usage of the DALL\u00b7E editor cost?\n==============================================\n\n\nLike DALL\u00b7E's other functionality, each prompt you submit by clicking the \"Generate\" button will deduct one credit from your credit balance (regardless of how many pixels you are filling in).\n\n\n\nYou can always purchase additional credits from the user dropdown at the top right of the application.\n\n\n\nHow do I use the editor most effectively?\n=========================================\n\n\nThe **Generation frame** contains the image context that the model will see when you submit a text prompt, so make sure that it contains enough useful context for the area you are expanding into, otherwise the style may drift from the rest of your image.\n\n\n\n![](https://downloads.intercomcdn.com/i/o/571876595/9e431c455e24421079bee9d3/Screen+Shot+2022-08-30+at+2.55.38+PM.png)You can simultaneously **Erase** parts of your image to touch up or replace certain areas, and perfect the finer details.\n\n\n\nYou can also **Upload** existing images, optionally resize them, and then place them within the canvas to bring additional imagery into the scene. This is a powerful feature that enables you to fuse images together, connect opposite ends of an image for loops, and \"uncrop\" images that you can combine with other tooling to create recursively expanding animations.\n\n\n\nThe **Download** tool will export the latest state of the artwork as .png file. We recommend downloading often to keep snapshots of your work. You can always re-upload previous snapshots to continue where you left off.\n\n\n\nWhat keyboard shortcuts are supported?\n======================================\n\n\nThe editor supports keyboard shortcuts for zooming, switching tools, undo/redo, and more. Press **?** while using the editor to show the full list of keyboard shortcuts.\n\n\n\nAre there any other tips & tricks to be aware of?\n=================================================\n\n\n* Start with the character before the landscape, if there are characters involved, so you can get the body morphology right before filling the rest.\n* Make sure you're keeping enough of the existing image in the generation frame to avoid the style drifting too much.\n* Ask DALL\u00b7E for a muted color palette, especially as you stray further from the center, to avoid oversaturation and color-blasting.\n* Consider what story you\u2019re trying to tell when picking the direction you want to expand the image into.\n\n\n\n", "title": "DALL\u00b7E Editor Guide", "article_id": "6516417", "url": "https://help.openai.com/en/articles/6516417-dall-e-editor-guide"} \ No newline at end of file +{"text": "The DALL\u00b7E editor interface helps you edit images through inpainting and outpainting, giving you more control over your creative vision.\n\n\n\n![](https://downloads.intercomcdn.com/i/o/571871271/eb4c662a2316d5cf2f753c60/Screen+Shot+2022-08-30+at+2.40.28+PM.png)The editor interface is in beta \u2013 there are a number of things to keep in mind while using this interface:\n\n\n* The newest editor experience is only available on desktop at the moment, we'll be rolling out these features to smaller screens in the coming months.\n* Expanded images are not currently saved automatically, make sure to download your incremental work often to avoid losing anything.\n* You cannot yet save expanded images to a collection or view the full image in your history, but\u00a0we hope to add this soon.\n* For very large images, your browser may experience lag while downloading. Make sure to download often to avoid losing work due to browser freezes!\n\nThe FAQ below will help you learn how to get the most out of these new tools:\n\n\n\nHow do I access the DALL\u00b7E editor?\n==================================\n\n\nOnce you're logged in on a desktop device, you can launch the editor in two ways:\n\n\n* **Start with an image**: From any image on the DALL-E website, you can click the \"Edit\" button to drop into an editor with that image as the starting point.\n* **Start with a blank canvas:** If you'd prefer to start from scratch, you can bookmark and use the following URL: https://labs.openai.com/editor\n\nWhile users on mobile devices don't have access to advanced editor features like outpainting, you can still inpaint images by tapping \"Edit\" on an existing image you've generated or uploaded.\n\n\n\nHow much does usage of the DALL\u00b7E editor cost?\n==============================================\n\n\nLike DALL\u00b7E's other functionality, each prompt you submit by clicking the \"Generate\" button will deduct one credit from your credit balance (regardless of how many pixels you are filling in).\n\n\n\nYou can always purchase additional credits from the user dropdown at the top right of the application.\n\n\n\nHow do I use the editor most effectively?\n=========================================\n\n\nThe **Generation frame** contains the image context that the model will see when you submit a text prompt, so make sure that it contains enough useful context for the area you are expanding into, otherwise the style may drift from the rest of your image.\n\n\n\n![](https://downloads.intercomcdn.com/i/o/571876595/9e431c455e24421079bee9d3/Screen+Shot+2022-08-30+at+2.55.38+PM.png)You can simultaneously **Erase** parts of your image to touch up or replace certain areas, and perfect the finer details.\n\n\n\nYou can also **Upload** existing images, optionally resize them, and then place them within the canvas to bring additional imagery into the scene. This is a powerful feature that enables you to fuse images together, connect opposite ends of an image for loops, and \"uncrop\" images that you can combine with other tooling to create recursively expanding animations.\n\n\n\nThe **Download** tool will export the latest state of the artwork as .png file. We recommend downloading often to keep snapshots of your work. You can always re-upload previous snapshots to continue where you left off.\n\n\n\nWhat keyboard shortcuts are supported?\n======================================\n\n\nThe editor supports keyboard shortcuts for zooming, switching tools, undo/redo, and more. Press **?** while using the editor to show the full list of keyboard shortcuts.\n\n\n\nAre there any other tips & tricks to be aware of?\n=================================================\n\n\n* Start with the character before the landscape, if there are characters involved, so you can get the body morphology right before filling the rest.\n* Make sure you're keeping enough of the existing image in the generation frame to avoid the style drifting too much.\n* Ask DALL\u00b7E for a muted color palette, especially as you stray further from the center, to avoid oversaturation and color-blasting.\n* Consider what story you\u2019re trying to tell when picking the direction you want to expand the image into.\n\n\n\n", "title": "DALL\u00b7E Editor Guide", "article_id": "6516417", "url": "https://help.openai.com/en/articles/6516417-dall-e-editor-guide"} diff --git a/examples/customer_service_streaming/data/article_6582257.json b/examples/customer_service_streaming/data/article_6582257.json index 7c198dc2..3e5dfb33 100644 --- a/examples/customer_service_streaming/data/article_6582257.json +++ b/examples/customer_service_streaming/data/article_6582257.json @@ -1 +1 @@ -{"text": "We want to assure you that you won't be penalized for a failed generation. You won't be charged a credit if DALL\u00b7E 2 is unable to successfully generate an image based on your request. \n\n\n\nWe understand that not every request will be successful, and we don't want to punish our users for that. So rest assured, you can keep trying different requests without worrying about wasting your credits on failed generations.\n\n\n\nYou're only charged for successful requests. If you're looking for your generation history, you can find them on your [\"My Collection\"](https://labs.openai.com/collection) page.\n\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n\n", "title": "Am I charged for a credit when my generation fails?", "article_id": "6582257", "url": "https://help.openai.com/en/articles/6582257-am-i-charged-for-a-credit-when-my-generation-fails"} \ No newline at end of file +{"text": "We want to assure you that you won't be penalized for a failed generation. You won't be charged a credit if DALL\u00b7E 2 is unable to successfully generate an image based on your request. \n\n\n\nWe understand that not every request will be successful, and we don't want to punish our users for that. So rest assured, you can keep trying different requests without worrying about wasting your credits on failed generations.\n\n\n\nYou're only charged for successful requests. If you're looking for your generation history, you can find them on your [\"My Collection\"](https://labs.openai.com/collection) page.\n\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n\n", "title": "Am I charged for a credit when my generation fails?", "article_id": "6582257", "url": "https://help.openai.com/en/articles/6582257-am-i-charged-for-a-credit-when-my-generation-fails"} diff --git a/examples/customer_service_streaming/data/article_6582391.json b/examples/customer_service_streaming/data/article_6582391.json index c987ba50..a6126507 100644 --- a/examples/customer_service_streaming/data/article_6582391.json +++ b/examples/customer_service_streaming/data/article_6582391.json @@ -1 +1 @@ -{"text": "While DALL\u00b7E is continually evolving and improving, there are a few things you can do to improve your images right now.\n\n\n\nFor discovering how you can design the best prompts for DALL\u00b7E, or find out best practices for processing images, we currently recommend:\n\n\n* [Guy Parsons' DALL\u00b7E 2 Prompt Book](https://dallery.gallery/the-dalle-2-prompt-book/) for guidance on designing the best prompts.\n* [Joining our Discord server](https://discord.com/invite/openai) and engaging with the community in channels such as #tips-and-tricks, #prompt-help, and #questions can be a great way to get advice and feedback from other users\n\nIf you'd like to learn more about the new Outpainting feature, check out our DALL\u00b7E Editor Guide!\n\n\n[DALL\u00b7E Editor Guide](https://help.openai.com/en/articles/6516417-dall-e-editor-guide)\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n\n", "title": "How can I improve my prompts with DALL\u00b7E?", "article_id": "6582391", "url": "https://help.openai.com/en/articles/6582391-how-can-i-improve-my-prompts-with-dall-e"} \ No newline at end of file +{"text": "While DALL\u00b7E is continually evolving and improving, there are a few things you can do to improve your images right now.\n\n\n\nFor discovering how you can design the best prompts for DALL\u00b7E, or find out best practices for processing images, we currently recommend:\n\n\n* [Guy Parsons' DALL\u00b7E 2 Prompt Book](https://dallery.gallery/the-dalle-2-prompt-book/) for guidance on designing the best prompts.\n* [Joining our Discord server](https://discord.com/invite/openai) and engaging with the community in channels such as #tips-and-tricks, #prompt-help, and #questions can be a great way to get advice and feedback from other users\n\nIf you'd like to learn more about the new Outpainting feature, check out our DALL\u00b7E Editor Guide!\n\n\n[DALL\u00b7E Editor Guide](https://help.openai.com/en/articles/6516417-dall-e-editor-guide)\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n\n", "title": "How can I improve my prompts with DALL\u00b7E?", "article_id": "6582391", "url": "https://help.openai.com/en/articles/6582391-how-can-i-improve-my-prompts-with-dall-e"} diff --git a/examples/customer_service_streaming/data/article_6584194.json b/examples/customer_service_streaming/data/article_6584194.json index 3a7cd6b8..efa17429 100644 --- a/examples/customer_service_streaming/data/article_6584194.json +++ b/examples/customer_service_streaming/data/article_6584194.json @@ -1 +1 @@ -{"text": "When you have both free and paid credits in your account, our system will automatically use the credits that are going to expire first. In most cases, this will be your free credits.\n\n\n\nHowever, if you have paid credits that are expiring sooner than your free credits, those will be used first. Keep in mind that paid credits typically expire in one year, while free credits typically expire within a month.\n\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n\n\n", "title": "How do my free and paid credits get used?", "article_id": "6584194", "url": "https://help.openai.com/en/articles/6584194-how-do-my-free-and-paid-credits-get-used"} \ No newline at end of file +{"text": "When you have both free and paid credits in your account, our system will automatically use the credits that are going to expire first. In most cases, this will be your free credits.\n\n\n\nHowever, if you have paid credits that are expiring sooner than your free credits, those will be used first. Keep in mind that paid credits typically expire in one year, while free credits typically expire within a month.\n\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n\n\n", "title": "How do my free and paid credits get used?", "article_id": "6584194", "url": "https://help.openai.com/en/articles/6584194-how-do-my-free-and-paid-credits-get-used"} diff --git a/examples/customer_service_streaming/data/article_6584249.json b/examples/customer_service_streaming/data/article_6584249.json index a097ee24..784617e5 100644 --- a/examples/customer_service_streaming/data/article_6584249.json +++ b/examples/customer_service_streaming/data/article_6584249.json @@ -1 +1 @@ -{"text": "Every generation you create is automatically saved in the 'All generations' tab in '[My Collection](https://labs.openai.com/collection).' You can find past generations there, as well as your saved generations in the 'Favorites' tab.\n\n\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n", "title": "Where can I find my old and/or saved generations?", "article_id": "6584249", "url": "https://help.openai.com/en/articles/6584249-where-can-i-find-my-old-and-or-saved-generations"} \ No newline at end of file +{"text": "Every generation you create is automatically saved in the 'All generations' tab in '[My Collection](https://labs.openai.com/collection).' You can find past generations there, as well as your saved generations in the 'Favorites' tab.\n\n\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n", "title": "Where can I find my old and/or saved generations?", "article_id": "6584249", "url": "https://help.openai.com/en/articles/6584249-where-can-i-find-my-old-and-or-saved-generations"} diff --git a/examples/customer_service_streaming/data/article_6613520.json b/examples/customer_service_streaming/data/article_6613520.json index 39d24447..9f3c1fed 100644 --- a/examples/customer_service_streaming/data/article_6613520.json +++ b/examples/customer_service_streaming/data/article_6613520.json @@ -1 +1 @@ -{"text": "\n**ChatGPT**\n\n\nPhone verification is no longer required for new OpenAI account creation or ChatGPT usage.\n\n\n\n**API**\n\n\nPhone verification is now mandated on platform.openai.com for generating your initial API key, though not for any subsequent API key generation after that.\n\n\n\n\nWhy do I need to provide my phone number to generate my **first** API key on **platform**.openai.com?\n-----------------------------------------------------------------------------------------------------\n\n\nWhen you generate your first API key on platform.openai.com, we do require a phone number for security reasons. This allows us to verify your account and ensure our platform remains secure. \n\n\n\nYou only need to complete phone verification generating the 1st API key not any subsequent API keys after that.\n\n\n\nWe don't use your phone number for any other purposes, and take your privacy very seriously.\n\n\n\nCan I use a premium number, landline, Google Voice, or other VoIP phone number?\n-------------------------------------------------------------------------------\n\n\nWe do **`not`** support use of `landlines`, `VoIP`, `Google Voice`, or `premium numbers` at this time. All of those types of phone numbers are often associated with higher instances of fraud or abuse.\n\n\n\nFor this reason we only support completing phone verification via mobile phone numbers over an SMS text message, no exceptions.\n\n\n\nHave you always blocked VoIP numbers?\n-------------------------------------\n\n\nYes, we have always blocked VoIP services in the United States to ensure the safety and security of our users. Recently, we have expanded our blocking policy to include VoIP services internationally. This means that VoIP services are now blocked in countries outside the United States as well.\n\n\n\nI don't want to receive the SMS can I phone verify over email/call instead?\n---------------------------------------------------------------------------\n\n\nNo. The phone verification can only be completed with a text message via SMS (or WhatsApp, if available in your country). The code cannot be sent via email or done over phone call.\n\n\n\nWhy am I not receiving my phone verification code SMS?\n------------------------------------------------------\n\n\nIf you're not receiving your phone verification code, it's possible that our system has temporarily blocked you due to too many verification attempts or an issue occurred during your first request.\n\n\n\nPlease try again in a few hours and make sure you're within cellphone coverage, and you're not using any text-blocker applications.\n\n\n\nWhat does this error mean? \"Detected suspicious behavior from phone numbers similar to yours\"\n---------------------------------------------------------------------------------------------\n\n\nThis means our system has detected unusual activity or patterns from phone numbers that are similar to the one you're using for verification. This error is triggered as a security measure to prevent potential fraud or abuse of the platform.\n\n\n\nRemember that security measures like this are in place to protect your account and maintain the integrity of the platform. Ensure that your personal information is accurate and up-to-date.\n\n\n\nHow many times can I use the same phone number to complete the phone verification associated with an OpenAI account's first API key generation?\n-----------------------------------------------------------------------------------------------------------------------------------------------\n\n\nA phone number can only ever be used for phone verification up to 3 times.\n\n\n\nThis means if you have 3 OpenAI accounts you can use the same number for all three when completing phone verification on each initial API key generation across those three accounts.\n\n\n\nFor anti-fraud and abuse reasons, we do **not** allow you to unlink phone numbers from OpenAI accounts to free up that number for reuse. This means deleting an OpenAI account does **not** free up the number to get around the limit. There is no workaround.\n\n\n\nHow do free trial tokens work?\n------------------------------\n\n\nFree trial tokens to API users on platform.openai.com are only given for the first time you sign up then complete phone verification during the first API key generation. No accounts created after that get free trial tokens, no exceptions.\n\n\n\nHow do I resolve I get an error that I can't sign up due to \"unsupported country\"?\n----------------------------------------------------------------------------------\n\n\nThis may be that you're trying to complete phone verification on the initial API key generation on platform.openai.com using a phone number from a country or territory we do not support.\n\n\n\nSee [Supported countries and territories](https://platform.openai.com/docs/supported-countries).\n\n\n\nWhich countries do you support for WhatsApp phone verification?\n---------------------------------------------------------------\n\n\nIn certain countries you can complete phone verification with WhatsApp instead of via an SMS.\n\n\n\nAs of Wednesday, September 27th, 2023 the countries we support for that include:\n\n\n* \u201cIN\u201d, # India\n* \u201cID\u201d, # Indonesia\n* \u201cPK\u201d, # Pakistan\n* \u201cNG\u201d, # Nigeria\n* \u201cIL\u201d, # Israel\n* \u201cSA\u201d, # Saudi Arabia\n* \u201cAE\u201d, # United Arab Emirates\n* \u201cUA\u201d, # Ukraine\n* \u201cMY\u201d, # Malaysia\n* \u201cTR\u201d, # Turkey\n\n### What will phone verification look like?\n\n\nOur default drop-down is set to the United States which looks like this:\n\n\n![](https://downloads.intercomcdn.com/i/o/658048438/d0ae000cb03c874071cc470a/phone+verification+step+1.png)Then if you select one of the countries in our list above which include the WhatsApp alternative phone verification option - using India as an example - you'll see this UI:\n\n\n![](https://downloads.intercomcdn.com/i/o/658049199/9d36ef51ff688434496e9a60/phone+verification+step+2.png)Then to get your code sent to WhatsApp you can select \"YES\" and that option appears:\n\n\n![](https://downloads.intercomcdn.com/i/o/658049679/e35901be2b3899487a0d7c46/phone+verification+step+3.png)", "title": "Phone verification FAQ", "article_id": "6613520", "url": "https://help.openai.com/en/articles/6613520-phone-verification-faq"} \ No newline at end of file +{"text": "\n**ChatGPT**\n\n\nPhone verification is no longer required for new OpenAI account creation or ChatGPT usage.\n\n\n\n**API**\n\n\nPhone verification is now mandated on platform.openai.com for generating your initial API key, though not for any subsequent API key generation after that.\n\n\n\n\nWhy do I need to provide my phone number to generate my **first** API key on **platform**.openai.com?\n-----------------------------------------------------------------------------------------------------\n\n\nWhen you generate your first API key on platform.openai.com, we do require a phone number for security reasons. This allows us to verify your account and ensure our platform remains secure. \n\n\n\nYou only need to complete phone verification generating the 1st API key not any subsequent API keys after that.\n\n\n\nWe don't use your phone number for any other purposes, and take your privacy very seriously.\n\n\n\nCan I use a premium number, landline, Google Voice, or other VoIP phone number?\n-------------------------------------------------------------------------------\n\n\nWe do **`not`** support use of `landlines`, `VoIP`, `Google Voice`, or `premium numbers` at this time. All of those types of phone numbers are often associated with higher instances of fraud or abuse.\n\n\n\nFor this reason we only support completing phone verification via mobile phone numbers over an SMS text message, no exceptions.\n\n\n\nHave you always blocked VoIP numbers?\n-------------------------------------\n\n\nYes, we have always blocked VoIP services in the United States to ensure the safety and security of our users. Recently, we have expanded our blocking policy to include VoIP services internationally. This means that VoIP services are now blocked in countries outside the United States as well.\n\n\n\nI don't want to receive the SMS can I phone verify over email/call instead?\n---------------------------------------------------------------------------\n\n\nNo. The phone verification can only be completed with a text message via SMS (or WhatsApp, if available in your country). The code cannot be sent via email or done over phone call.\n\n\n\nWhy am I not receiving my phone verification code SMS?\n------------------------------------------------------\n\n\nIf you're not receiving your phone verification code, it's possible that our system has temporarily blocked you due to too many verification attempts or an issue occurred during your first request.\n\n\n\nPlease try again in a few hours and make sure you're within cellphone coverage, and you're not using any text-blocker applications.\n\n\n\nWhat does this error mean? \"Detected suspicious behavior from phone numbers similar to yours\"\n---------------------------------------------------------------------------------------------\n\n\nThis means our system has detected unusual activity or patterns from phone numbers that are similar to the one you're using for verification. This error is triggered as a security measure to prevent potential fraud or abuse of the platform.\n\n\n\nRemember that security measures like this are in place to protect your account and maintain the integrity of the platform. Ensure that your personal information is accurate and up-to-date.\n\n\n\nHow many times can I use the same phone number to complete the phone verification associated with an OpenAI account's first API key generation?\n-----------------------------------------------------------------------------------------------------------------------------------------------\n\n\nA phone number can only ever be used for phone verification up to 3 times.\n\n\n\nThis means if you have 3 OpenAI accounts you can use the same number for all three when completing phone verification on each initial API key generation across those three accounts.\n\n\n\nFor anti-fraud and abuse reasons, we do **not** allow you to unlink phone numbers from OpenAI accounts to free up that number for reuse. This means deleting an OpenAI account does **not** free up the number to get around the limit. There is no workaround.\n\n\n\nHow do free trial tokens work?\n------------------------------\n\n\nFree trial tokens to API users on platform.openai.com are only given for the first time you sign up then complete phone verification during the first API key generation. No accounts created after that get free trial tokens, no exceptions.\n\n\n\nHow do I resolve I get an error that I can't sign up due to \"unsupported country\"?\n----------------------------------------------------------------------------------\n\n\nThis may be that you're trying to complete phone verification on the initial API key generation on platform.openai.com using a phone number from a country or territory we do not support.\n\n\n\nSee [Supported countries and territories](https://platform.openai.com/docs/supported-countries).\n\n\n\nWhich countries do you support for WhatsApp phone verification?\n---------------------------------------------------------------\n\n\nIn certain countries you can complete phone verification with WhatsApp instead of via an SMS.\n\n\n\nAs of Wednesday, September 27th, 2023 the countries we support for that include:\n\n\n* \u201cIN\u201d, # India\n* \u201cID\u201d, # Indonesia\n* \u201cPK\u201d, # Pakistan\n* \u201cNG\u201d, # Nigeria\n* \u201cIL\u201d, # Israel\n* \u201cSA\u201d, # Saudi Arabia\n* \u201cAE\u201d, # United Arab Emirates\n* \u201cUA\u201d, # Ukraine\n* \u201cMY\u201d, # Malaysia\n* \u201cTR\u201d, # Turkey\n\n### What will phone verification look like?\n\n\nOur default drop-down is set to the United States which looks like this:\n\n\n![](https://downloads.intercomcdn.com/i/o/658048438/d0ae000cb03c874071cc470a/phone+verification+step+1.png)Then if you select one of the countries in our list above which include the WhatsApp alternative phone verification option - using India as an example - you'll see this UI:\n\n\n![](https://downloads.intercomcdn.com/i/o/658049199/9d36ef51ff688434496e9a60/phone+verification+step+2.png)Then to get your code sent to WhatsApp you can select \"YES\" and that option appears:\n\n\n![](https://downloads.intercomcdn.com/i/o/658049679/e35901be2b3899487a0d7c46/phone+verification+step+3.png)", "title": "Phone verification FAQ", "article_id": "6613520", "url": "https://help.openai.com/en/articles/6613520-phone-verification-faq"} diff --git a/examples/customer_service_streaming/data/article_6613605.json b/examples/customer_service_streaming/data/article_6613605.json index cb6e6ab5..9af3e1a7 100644 --- a/examples/customer_service_streaming/data/article_6613605.json +++ b/examples/customer_service_streaming/data/article_6613605.json @@ -1 +1 @@ -{"text": "If you're not receiving your phone verification code, it's possible that our system has temporarily blocked you due to too many verification attempts or an issue occurred during your first request. \n\n\n\nPlease try again in a few hours and make sure you're within cellphone coverage, and you're not using any text-blocker applications.\n\n\n\nPlease note we do not allow land lines or VoIP (including Google Voice) numbers at this time.\n\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n", "title": "Why am I not receiving my phone verification code?", "article_id": "6613605", "url": "https://help.openai.com/en/articles/6613605-why-am-i-not-receiving-my-phone-verification-code"} \ No newline at end of file +{"text": "If you're not receiving your phone verification code, it's possible that our system has temporarily blocked you due to too many verification attempts or an issue occurred during your first request. \n\n\n\nPlease try again in a few hours and make sure you're within cellphone coverage, and you're not using any text-blocker applications.\n\n\n\nPlease note we do not allow land lines or VoIP (including Google Voice) numbers at this time.\n\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n", "title": "Why am I not receiving my phone verification code?", "article_id": "6613605", "url": "https://help.openai.com/en/articles/6613605-why-am-i-not-receiving-my-phone-verification-code"} diff --git a/examples/customer_service_streaming/data/article_6613629.json b/examples/customer_service_streaming/data/article_6613629.json index 7eeac7bb..51deba1d 100644 --- a/examples/customer_service_streaming/data/article_6613629.json +++ b/examples/customer_service_streaming/data/article_6613629.json @@ -1 +1 @@ -{"text": "**If you can\u2019t log in, after having successfully logged in before\u2026**\n--------------------------------------------------------------------\n\n\n* Refresh your browser\u2019s cache and cookies. We recommend using a desktop device to [log in](https://beta.openai.com/login).\n* Ensure that you are using the correct authentication method. For example, if you signed up using \u2018Continue with Google\u2019, try using that method to [log in](https://chat.openai.com/auth/login) too.\n\n\n**If you see 'There is already a user with email ...' or 'Wrong authentication method'...**\n\n\n* You will see this error if you attempt to login in using a different authentication method from what you originally used to register your account. Your account can only be authenticated if you log in with the auth method that was used during initial registration. For example, if you registered using Google sign-in, please continue using the same method.\n* If you're unsure which method you originally used for signing up please try [signing in](https://beta.openai.com/login) with each of the following methods from a non-Firefox incognito window:\n\n\n\t+ Username + Password\n\t+ \"Continue with Google\" button\n\t+ \"Continue with Microsoft\" button\n\n\n**If you are trying to sign up, and you see \u2018This user already exists\u2019...**\n\n\n* This likely means you already began the sign up process, but did not complete it. Try to [login](https://beta.openai.com/login) instead.\n\n\n**If you received a Welcome email, but no verification email\u2026**\n\n\n* Register at .\n\n\n**\ufeffIn the event you still receive \"Something went wrong\" or \"Oops...\"** **errors please try the following:**\n\n\n1. Refresh your cache and cookies, then attempt the login with your chosen authentication method.\n2. Try an incognito browser window to complete sign in\n3. Try logging in from a different browser/computer to see if the issue still persists, as a security add-in or extension can occasionally cause this type of error.\n4. Try another network (wired connection, home WiFi, work WiFi, library/cafe WiFi and/or cellular network). \n\ufeff\n", "title": "Why can't I log in to OpenAI platform?", "article_id": "6613629", "url": "https://help.openai.com/en/articles/6613629-why-can-t-i-log-in-to-openai-platform"} \ No newline at end of file +{"text": "**If you can\u2019t log in, after having successfully logged in before\u2026**\n--------------------------------------------------------------------\n\n\n* Refresh your browser\u2019s cache and cookies. We recommend using a desktop device to [log in](https://beta.openai.com/login).\n* Ensure that you are using the correct authentication method. For example, if you signed up using \u2018Continue with Google\u2019, try using that method to [log in](https://chat.openai.com/auth/login) too.\n\n\n**If you see 'There is already a user with email ...' or 'Wrong authentication method'...**\n\n\n* You will see this error if you attempt to login in using a different authentication method from what you originally used to register your account. Your account can only be authenticated if you log in with the auth method that was used during initial registration. For example, if you registered using Google sign-in, please continue using the same method.\n* If you're unsure which method you originally used for signing up please try [signing in](https://beta.openai.com/login) with each of the following methods from a non-Firefox incognito window:\n\n\n\t+ Username + Password\n\t+ \"Continue with Google\" button\n\t+ \"Continue with Microsoft\" button\n\n\n**If you are trying to sign up, and you see \u2018This user already exists\u2019...**\n\n\n* This likely means you already began the sign up process, but did not complete it. Try to [login](https://beta.openai.com/login) instead.\n\n\n**If you received a Welcome email, but no verification email\u2026**\n\n\n* Register at .\n\n\n**\ufeffIn the event you still receive \"Something went wrong\" or \"Oops...\"** **errors please try the following:**\n\n\n1. Refresh your cache and cookies, then attempt the login with your chosen authentication method.\n2. Try an incognito browser window to complete sign in\n3. Try logging in from a different browser/computer to see if the issue still persists, as a security add-in or extension can occasionally cause this type of error.\n4. Try another network (wired connection, home WiFi, work WiFi, library/cafe WiFi and/or cellular network). \n\ufeff\n", "title": "Why can't I log in to OpenAI platform?", "article_id": "6613629", "url": "https://help.openai.com/en/articles/6613629-why-can-t-i-log-in-to-openai-platform"} diff --git a/examples/customer_service_streaming/data/article_6613657.json b/examples/customer_service_streaming/data/article_6613657.json index 1a8320da..36b9c876 100644 --- a/examples/customer_service_streaming/data/article_6613657.json +++ b/examples/customer_service_streaming/data/article_6613657.json @@ -1 +1 @@ -{"text": "You should be able to reset your password by clicking 'Forgot Password' [here](https://beta.openai.com/login) while logged out. If you can't log out, try from an incognito window. \n\n\n\nIf you haven't received the reset email, make sure to check your spam folder. \n\n\n\nIf it's not there, consider whether you originally signed in using a different authentication method such as 'Continue with Google.' If that's the case, there's no password to reset; simply log in using that authentication method. \n\n\n\nIf you need to reset your Google or Microsoft password, you'll need to do so on their respective sites.\n\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n\n\n", "title": "Why can't I reset my password?", "article_id": "6613657", "url": "https://help.openai.com/en/articles/6613657-why-can-t-i-reset-my-password"} \ No newline at end of file +{"text": "You should be able to reset your password by clicking 'Forgot Password' [here](https://beta.openai.com/login) while logged out. If you can't log out, try from an incognito window. \n\n\n\nIf you haven't received the reset email, make sure to check your spam folder. \n\n\n\nIf it's not there, consider whether you originally signed in using a different authentication method such as 'Continue with Google.' If that's the case, there's no password to reset; simply log in using that authentication method. \n\n\n\nIf you need to reset your Google or Microsoft password, you'll need to do so on their respective sites.\n\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n\n\n", "title": "Why can't I reset my password?", "article_id": "6613657", "url": "https://help.openai.com/en/articles/6613657-why-can-t-i-reset-my-password"} diff --git a/examples/customer_service_streaming/data/article_6614161.json b/examples/customer_service_streaming/data/article_6614161.json index ba559525..a8961f2a 100644 --- a/examples/customer_service_streaming/data/article_6614161.json +++ b/examples/customer_service_streaming/data/article_6614161.json @@ -1 +1 @@ -{"text": "There are two ways to contact our support team, depending on whether you have an account with us. \n\n\n\nIf you already have an account, simply login and use the \"Help\" button to start a conversation. \n\n\n\nIf you don't have an account or can't login, you can still reach us by selecting the chat bubble icon in the bottom right of help.openai.com.\n\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n", "title": "How can I contact support?", "article_id": "6614161", "url": "https://help.openai.com/en/articles/6614161-how-can-i-contact-support"} \ No newline at end of file +{"text": "There are two ways to contact our support team, depending on whether you have an account with us. \n\n\n\nIf you already have an account, simply login and use the \"Help\" button to start a conversation. \n\n\n\nIf you don't have an account or can't login, you can still reach us by selecting the chat bubble icon in the bottom right of help.openai.com.\n\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n", "title": "How can I contact support?", "article_id": "6614161", "url": "https://help.openai.com/en/articles/6614161-how-can-i-contact-support"} diff --git a/examples/customer_service_streaming/data/article_6614209.json b/examples/customer_service_streaming/data/article_6614209.json index 6374d83e..c985418c 100644 --- a/examples/customer_service_streaming/data/article_6614209.json +++ b/examples/customer_service_streaming/data/article_6614209.json @@ -1 +1 @@ -{"text": "There are two main options for checking your token usage:\n\n\n\n**1. [Usage dashboard](https://beta.openai.com/account/usage)**\n---------------------------------------------------------------\n\n\nThe [usage dashboard](https://beta.openai.com/account/usage) displays your API usage during the current and past monthly billing cycles. To display the usage of a particular user of your organizational account, you can use the dropdown next to \"Daily usage breakdown\".\n\n\n\n\n**2. Usage data from the API response**\n---------------------------------------\n\n\nYou can also access token usage data through the API. Token usage information is now included in responses from completions, edits, and embeddings endpoints. Information on prompt and completion tokens is contained in the \"usage\" key:\n\n\n\n```\n{ \"id\": \"cmpl-uqkvlQyYK7bGYrRHQ0eXlWia\", \n\"object\": \"text_completion\", \n\"created\": 1589478378, \n\"model\": \"text-davinci-003\", \n\"choices\": [ { \"text\": \"\\n\\nThis is a test\", \"index\": 0, \"logprobs\": null, \"finish_reason\": \"length\" } ], \n\"usage\": { \"prompt_tokens\": 5, \"completion_tokens\": 5, \"total_tokens\": 10 } } \n\n```\n", "title": "How do I check my token usage?", "article_id": "6614209", "url": "https://help.openai.com/en/articles/6614209-how-do-i-check-my-token-usage"} \ No newline at end of file +{"text": "There are two main options for checking your token usage:\n\n\n\n**1. [Usage dashboard](https://beta.openai.com/account/usage)**\n---------------------------------------------------------------\n\n\nThe [usage dashboard](https://beta.openai.com/account/usage) displays your API usage during the current and past monthly billing cycles. To display the usage of a particular user of your organizational account, you can use the dropdown next to \"Daily usage breakdown\".\n\n\n\n\n**2. Usage data from the API response**\n---------------------------------------\n\n\nYou can also access token usage data through the API. Token usage information is now included in responses from completions, edits, and embeddings endpoints. Information on prompt and completion tokens is contained in the \"usage\" key:\n\n\n\n```\n{ \"id\": \"cmpl-uqkvlQyYK7bGYrRHQ0eXlWia\", \n\"object\": \"text_completion\", \n\"created\": 1589478378, \n\"model\": \"text-davinci-003\", \n\"choices\": [ { \"text\": \"\\n\\nThis is a test\", \"index\": 0, \"logprobs\": null, \"finish_reason\": \"length\" } ], \n\"usage\": { \"prompt_tokens\": 5, \"completion_tokens\": 5, \"total_tokens\": 10 } } \n\n```\n", "title": "How do I check my token usage?", "article_id": "6614209", "url": "https://help.openai.com/en/articles/6614209-how-do-i-check-my-token-usage"} diff --git a/examples/customer_service_streaming/data/article_6614457.json b/examples/customer_service_streaming/data/article_6614457.json index 6992dcba..73627cbf 100644 --- a/examples/customer_service_streaming/data/article_6614457.json +++ b/examples/customer_service_streaming/data/article_6614457.json @@ -1 +1 @@ -{"text": "There are three reasons you might receive the \"You've reached your usage limit\" error:\n\n\n\n**If you're using a free trial account:** To set up a pay-as-you-go account using the API, you'll need to enter [billing information](https://platform.openai.com/account/billing) and upgrade to a paid plan.\n\n\n\n**If you're already on a paid plan,** you may need to either increase your [monthly budget](https://platform.openai.com/account/limits). To set your limit over the approved usage limit (normally, $120.00/month) please review your **[Usage Limits page](https://platform.openai.com/account/limits)** for information on advancing to the next tier. If your needs exceed what's available in the 'Increasing your limits' tier or you have an unique use case, click on 'Need help?' to submit a request for a higher limit. Our team will look into your request and respond as soon as we can.\n\n\n\n**Why did I get charged if I'm supposed to have free credits?**\n\n\nFree trial tokens to API users on platform.openai.com are only given the first time you sign up then complete phone verification during the first API key generation. No accounts created after that will receive free trial tokens.\n\n", "title": "Why am I getting an error message stating that I've reached my usage limit?", "article_id": "6614457", "url": "https://help.openai.com/en/articles/6614457-why-am-i-getting-an-error-message-stating-that-i-ve-reached-my-usage-limit"} \ No newline at end of file +{"text": "There are three reasons you might receive the \"You've reached your usage limit\" error:\n\n\n\n**If you're using a free trial account:** To set up a pay-as-you-go account using the API, you'll need to enter [billing information](https://platform.openai.com/account/billing) and upgrade to a paid plan.\n\n\n\n**If you're already on a paid plan,** you may need to either increase your [monthly budget](https://platform.openai.com/account/limits). To set your limit over the approved usage limit (normally, $120.00/month) please review your **[Usage Limits page](https://platform.openai.com/account/limits)** for information on advancing to the next tier. If your needs exceed what's available in the 'Increasing your limits' tier or you have an unique use case, click on 'Need help?' to submit a request for a higher limit. Our team will look into your request and respond as soon as we can.\n\n\n\n**Why did I get charged if I'm supposed to have free credits?**\n\n\nFree trial tokens to API users on platform.openai.com are only given the first time you sign up then complete phone verification during the first API key generation. No accounts created after that will receive free trial tokens.\n\n", "title": "Why am I getting an error message stating that I've reached my usage limit?", "article_id": "6614457", "url": "https://help.openai.com/en/articles/6614457-why-am-i-getting-an-error-message-stating-that-i-ve-reached-my-usage-limit"} diff --git a/examples/customer_service_streaming/data/article_6639781.json b/examples/customer_service_streaming/data/article_6639781.json index 09638090..452130a4 100644 --- a/examples/customer_service_streaming/data/article_6639781.json +++ b/examples/customer_service_streaming/data/article_6639781.json @@ -1 +1 @@ -{"text": "If you're wondering whether OpenAI models have knowledge of current events, the answer is that it depends on the specific model. The table below breaks down the different models and their respective training data ranges.\n\n\n\n\n| | |\n| --- | --- |\n| **Model name** | **TRAINING DATA** |\n| text-davinci-003 | Up to Jun 2021 |\n| text-davinci-002 | Up to Jun 2021 |\n| text-curie-001 | Up to Oct 2019 |\n| text-babbage-001 | Up to Oct 2019 |\n| text-ada-001 | Up to Oct 2019 |\n| code-davinci-002 | Up to Jun 2021 |\n| [Embeddings](https://beta.openai.com/docs/guides/embeddings/what-are-embeddings) models (e.g. \ntext-similarity-ada-001) | up to August 2020\u200b |\n\n", "title": "Do the OpenAI API models have knowledge of current events?", "article_id": "6639781", "url": "https://help.openai.com/en/articles/6639781-do-the-openai-api-models-have-knowledge-of-current-events"} \ No newline at end of file +{"text": "If you're wondering whether OpenAI models have knowledge of current events, the answer is that it depends on the specific model. The table below breaks down the different models and their respective training data ranges.\n\n\n\n\n| | |\n| --- | --- |\n| **Model name** | **TRAINING DATA** |\n| text-davinci-003 | Up to Jun 2021 |\n| text-davinci-002 | Up to Jun 2021 |\n| text-curie-001 | Up to Oct 2019 |\n| text-babbage-001 | Up to Oct 2019 |\n| text-ada-001 | Up to Oct 2019 |\n| code-davinci-002 | Up to Jun 2021 |\n| [Embeddings](https://beta.openai.com/docs/guides/embeddings/what-are-embeddings) models (e.g. \ntext-similarity-ada-001) | up to August 2020\u200b |\n\n", "title": "Do the OpenAI API models have knowledge of current events?", "article_id": "6639781", "url": "https://help.openai.com/en/articles/6639781-do-the-openai-api-models-have-knowledge-of-current-events"} diff --git a/examples/customer_service_streaming/data/article_6640792.json b/examples/customer_service_streaming/data/article_6640792.json index ba004309..96d75c64 100644 --- a/examples/customer_service_streaming/data/article_6640792.json +++ b/examples/customer_service_streaming/data/article_6640792.json @@ -1 +1 @@ -{"text": "You'll be billed at the end of each calendar month for usage during that month unless the parties have agreed to a different billing arrangement in writing. Invoices are typically issued within two weeks of the end of the billing cycle.\n\n\n\nFor the latest information on pay-as-you-go pricing, please our [pricing page](https://openai.com/pricing). \n\n", "title": "When can I expect to receive my OpenAI API invoice?", "article_id": "6640792", "url": "https://help.openai.com/en/articles/6640792-when-can-i-expect-to-receive-my-openai-api-invoice"} \ No newline at end of file +{"text": "You'll be billed at the end of each calendar month for usage during that month unless the parties have agreed to a different billing arrangement in writing. Invoices are typically issued within two weeks of the end of the billing cycle.\n\n\n\nFor the latest information on pay-as-you-go pricing, please our [pricing page](https://openai.com/pricing). \n\n", "title": "When can I expect to receive my OpenAI API invoice?", "article_id": "6640792", "url": "https://help.openai.com/en/articles/6640792-when-can-i-expect-to-receive-my-openai-api-invoice"} diff --git a/examples/customer_service_streaming/data/article_6640864.json b/examples/customer_service_streaming/data/article_6640864.json index db26ed9b..d89f3491 100644 --- a/examples/customer_service_streaming/data/article_6640864.json +++ b/examples/customer_service_streaming/data/article_6640864.json @@ -1 +1 @@ -{"text": "\n**Note**: The time for the name change you make on platform.openai.com to be reflected in ChatGPT may take up to 15 minutes.\n\n\n\nYou can change your name in your user settings in **platform**.openai.com under User -> Settings -> User profile -> Name.\n\n\n\n\n\n\n\nHere is what the settings looks like:\n\n\n\n![](https://downloads.intercomcdn.com/i/o/844048451/a904206d40d58034493cb2f6/Screenshot+2023-10-02+at+2.18.43+PM.png)ChatGPT\n-------\n\n\nChange your name on [platform.openai.com](http://platform.openai.com/) and refresh ChatGPT to see the update.\n\n\n\nRequirements\n------------\n\n\n1. Must have some name value\n2. Must be 96 characters or shorter.\n3. Must be only letters, certain punctuation, and spaces. No numbers.\n", "title": "How do I change my name for my OpenAI account?", "article_id": "6640864", "url": "https://help.openai.com/en/articles/6640864-how-do-i-change-my-name-for-my-openai-account"} \ No newline at end of file +{"text": "\n**Note**: The time for the name change you make on platform.openai.com to be reflected in ChatGPT may take up to 15 minutes.\n\n\n\nYou can change your name in your user settings in **platform**.openai.com under User -> Settings -> User profile -> Name.\n\n\n\n\n\n\n\nHere is what the settings looks like:\n\n\n\n![](https://downloads.intercomcdn.com/i/o/844048451/a904206d40d58034493cb2f6/Screenshot+2023-10-02+at+2.18.43+PM.png)ChatGPT\n-------\n\n\nChange your name on [platform.openai.com](http://platform.openai.com/) and refresh ChatGPT to see the update.\n\n\n\nRequirements\n------------\n\n\n1. Must have some name value\n2. Must be 96 characters or shorter.\n3. Must be only letters, certain punctuation, and spaces. No numbers.\n", "title": "How do I change my name for my OpenAI account?", "article_id": "6640864", "url": "https://help.openai.com/en/articles/6640864-how-do-i-change-my-name-for-my-openai-account"} diff --git a/examples/customer_service_streaming/data/article_6640875.json b/examples/customer_service_streaming/data/article_6640875.json index ff3e08ec..46537524 100644 --- a/examples/customer_service_streaming/data/article_6640875.json +++ b/examples/customer_service_streaming/data/article_6640875.json @@ -1 +1 @@ -{"text": "When using DALL\u00b7E in your work, it is important to be transparent about AI involvement and adhere to our [Content Policy](https://labs.openai.com/policies/content-policy) and [Terms of Use](https://labs.openai.com/policies/terms). \n\n\n\nPrimarily, **don't mislead your audience about AI involvement.**\n\n\n* When sharing your work, we encourage you to proactively disclose AI involvement in your work.\n* You may remove the DALL\u00b7E signature/watermark in the bottom right corner if you wish, but you may not mislead others about the nature of the work. For example, you may not tell people that the work was entirely human generated or that the work is an unaltered photograph of a real event.\n\nIf you'd like to cite DALL\u00b7E, we'd recommend including wording such as \"This image was created with the assistance of DALL\u00b7E 2\" or \"This image was generated with the assistance of AI.\"\n\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n", "title": "How should I credit DALL\u00b7E in my work?", "article_id": "6640875", "url": "https://help.openai.com/en/articles/6640875-how-should-i-credit-dall-e-in-my-work"} \ No newline at end of file +{"text": "When using DALL\u00b7E in your work, it is important to be transparent about AI involvement and adhere to our [Content Policy](https://labs.openai.com/policies/content-policy) and [Terms of Use](https://labs.openai.com/policies/terms). \n\n\n\nPrimarily, **don't mislead your audience about AI involvement.**\n\n\n* When sharing your work, we encourage you to proactively disclose AI involvement in your work.\n* You may remove the DALL\u00b7E signature/watermark in the bottom right corner if you wish, but you may not mislead others about the nature of the work. For example, you may not tell people that the work was entirely human generated or that the work is an unaltered photograph of a real event.\n\nIf you'd like to cite DALL\u00b7E, we'd recommend including wording such as \"This image was created with the assistance of DALL\u00b7E 2\" or \"This image was generated with the assistance of AI.\"\n\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n", "title": "How should I credit DALL\u00b7E in my work?", "article_id": "6640875", "url": "https://help.openai.com/en/articles/6640875-how-should-i-credit-dall-e-in-my-work"} diff --git a/examples/customer_service_streaming/data/article_6641048.json b/examples/customer_service_streaming/data/article_6641048.json index f48ea21d..e65debed 100644 --- a/examples/customer_service_streaming/data/article_6641048.json +++ b/examples/customer_service_streaming/data/article_6641048.json @@ -1 +1 @@ -{"text": "**Receipts for credit purchases made at labs.openai.com** are sent to the email address you used when making the purchase. You can also access invoices by clicking \"View payment history\" in your [Labs account settings](https://labs.openai.com/account).\n\n\n\n**Please note that [DALL\u00b7E API](https://help.openai.com/en/articles/6705023)** usage is offered on a pay-as-you-go basis and is billed separately from labs.openai.com. You'll be billed at the end of each calendar month for usage during that month. Invoices are typically issued within two weeks of the end of the billing cycle. For the latest information on pay-as-you-go pricing, please see: .\n\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n", "title": "Where can I find my invoice for DALL\u00b7E credit purchases?", "article_id": "6641048", "url": "https://help.openai.com/en/articles/6641048-where-can-i-find-my-invoice-for-dall-e-credit-purchases"} \ No newline at end of file +{"text": "**Receipts for credit purchases made at labs.openai.com** are sent to the email address you used when making the purchase. You can also access invoices by clicking \"View payment history\" in your [Labs account settings](https://labs.openai.com/account).\n\n\n\n**Please note that [DALL\u00b7E API](https://help.openai.com/en/articles/6705023)** usage is offered on a pay-as-you-go basis and is billed separately from labs.openai.com. You'll be billed at the end of each calendar month for usage during that month. Invoices are typically issued within two weeks of the end of the billing cycle. For the latest information on pay-as-you-go pricing, please see: .\n\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n", "title": "Where can I find my invoice for DALL\u00b7E credit purchases?", "article_id": "6641048", "url": "https://help.openai.com/en/articles/6641048-where-can-i-find-my-invoice-for-dall-e-credit-purchases"} diff --git a/examples/customer_service_streaming/data/article_6643004.json b/examples/customer_service_streaming/data/article_6643004.json index a1ba59f0..f7d24a75 100644 --- a/examples/customer_service_streaming/data/article_6643004.json +++ b/examples/customer_service_streaming/data/article_6643004.json @@ -1 +1 @@ -{"text": "When you use your [fine-tuned model](https://platform.openai.com/docs/guides/fine-tuning) for the first time in a while, it might take a little while for it to load. This sometimes causes the first few requests to fail with a 429 code and an error message that reads \"the model is still being loaded\".\n\n\n\nThe amount of time it takes to load a model will depend on the shared traffic and the size of the model. A larger model like `gpt-4`, for example, might take up to a few minutes to load, while smaller models might load much faster.\n\n\n\nOnce the model is loaded, ChatCompletion requests should be much faster and you're less likely to experience timeouts. \n\n\n\nWe recommend handling these errors programmatically and implementing retry logic. The first few calls may fail while the model loads. Retry the first call with exponential backoff until it succeeds, then continue as normal (see the \"Retrying with exponential backoff\" section of this [notebook](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_handle_rate_limits.ipynb) for examples).\n\n", "title": "What is the \"model is still being loaded\" error?", "article_id": "6643004", "url": "https://help.openai.com/en/articles/6643004-what-is-the-model-is-still-being-loaded-error"} \ No newline at end of file +{"text": "When you use your [fine-tuned model](https://platform.openai.com/docs/guides/fine-tuning) for the first time in a while, it might take a little while for it to load. This sometimes causes the first few requests to fail with a 429 code and an error message that reads \"the model is still being loaded\".\n\n\n\nThe amount of time it takes to load a model will depend on the shared traffic and the size of the model. A larger model like `gpt-4`, for example, might take up to a few minutes to load, while smaller models might load much faster.\n\n\n\nOnce the model is loaded, ChatCompletion requests should be much faster and you're less likely to experience timeouts. \n\n\n\nWe recommend handling these errors programmatically and implementing retry logic. The first few calls may fail while the model loads. Retry the first call with exponential backoff until it succeeds, then continue as normal (see the \"Retrying with exponential backoff\" section of this [notebook](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_handle_rate_limits.ipynb) for examples).\n\n", "title": "What is the \"model is still being loaded\" error?", "article_id": "6643004", "url": "https://help.openai.com/en/articles/6643004-what-is-the-model-is-still-being-loaded-error"} diff --git a/examples/customer_service_streaming/data/article_6643036.json b/examples/customer_service_streaming/data/article_6643036.json index 755cdd51..33f955e4 100644 --- a/examples/customer_service_streaming/data/article_6643036.json +++ b/examples/customer_service_streaming/data/article_6643036.json @@ -1 +1 @@ -{"text": "**OpenAI API** - the [Sharing & Publication policy](https://openai.com/api/policies/sharing-publication/) outlines how users may share and publish content generated through their use of the API. \n \n**DALL\u00b7E** - see the [Content policy](https://labs.openai.com/policies/content-policy) for details on what images can be created and shared.\n\n", "title": "What are OpenAI's policies regarding sharing and publication of generated content?", "article_id": "6643036", "url": "https://help.openai.com/en/articles/6643036-what-are-openai-s-policies-regarding-sharing-and-publication-of-generated-content"} \ No newline at end of file +{"text": "**OpenAI API** - the [Sharing & Publication policy](https://openai.com/api/policies/sharing-publication/) outlines how users may share and publish content generated through their use of the API. \n \n**DALL\u00b7E** - see the [Content policy](https://labs.openai.com/policies/content-policy) for details on what images can be created and shared.\n\n", "title": "What are OpenAI's policies regarding sharing and publication of generated content?", "article_id": "6643036", "url": "https://help.openai.com/en/articles/6643036-what-are-openai-s-policies-regarding-sharing-and-publication-of-generated-content"} diff --git a/examples/customer_service_streaming/data/article_6643167.json b/examples/customer_service_streaming/data/article_6643167.json index 9bc87153..f4b49ae0 100644 --- a/examples/customer_service_streaming/data/article_6643167.json +++ b/examples/customer_service_streaming/data/article_6643167.json @@ -1 +1 @@ -{"text": "The [Embeddings](https://platform.openai.com/docs/guides/embeddings) and [Chat](https://platform.openai.com/docs/guides/chat) endpoints are a great combination to use when building a question-answering or chatbot application.\n\n\n\nHere's how you can get started: \n\n\n1. Gather all of the information you need for your knowledge base. Use our Embeddings endpoint to make document embeddings for each section.\n2. When a user asks a question, turn it into a query embedding and use it to find the most relevant sections from your knowledge base.\n3. Use the relevant context from your knowledge base to create a prompt for the Completions endpoint, which can generate an answer for your user.\n\nWe encourage you to take a look at our **[detailed notebook](https://github.com/openai/openai-cookbook/blob/main/examples/Question_answering_using_embeddings.ipynb)** that provides step-by-step instructions.\n\n\n\nIf you run into any issues or have questions, don't hesitate to join our \n\n\n[Community Forum](https://community.openai.com/) for help. \n\n\n\nWe're excited to see what you build!\n\n", "title": "How to Use OpenAI API for Q&A and Chatbot Apps", "article_id": "6643167", "url": "https://help.openai.com/en/articles/6643167-how-to-use-openai-api-for-q-a-and-chatbot-apps"} \ No newline at end of file +{"text": "The [Embeddings](https://platform.openai.com/docs/guides/embeddings) and [Chat](https://platform.openai.com/docs/guides/chat) endpoints are a great combination to use when building a question-answering or chatbot application.\n\n\n\nHere's how you can get started: \n\n\n1. Gather all of the information you need for your knowledge base. Use our Embeddings endpoint to make document embeddings for each section.\n2. When a user asks a question, turn it into a query embedding and use it to find the most relevant sections from your knowledge base.\n3. Use the relevant context from your knowledge base to create a prompt for the Completions endpoint, which can generate an answer for your user.\n\nWe encourage you to take a look at our **[detailed notebook](https://github.com/openai/openai-cookbook/blob/main/examples/Question_answering_using_embeddings.ipynb)** that provides step-by-step instructions.\n\n\n\nIf you run into any issues or have questions, don't hesitate to join our \n\n\n[Community Forum](https://community.openai.com/) for help. \n\n\n\nWe're excited to see what you build!\n\n", "title": "How to Use OpenAI API for Q&A and Chatbot Apps", "article_id": "6643167", "url": "https://help.openai.com/en/articles/6643167-how-to-use-openai-api-for-q-a-and-chatbot-apps"} diff --git a/examples/customer_service_streaming/data/article_6643200.json b/examples/customer_service_streaming/data/article_6643200.json index 96009f75..51a0b922 100644 --- a/examples/customer_service_streaming/data/article_6643200.json +++ b/examples/customer_service_streaming/data/article_6643200.json @@ -1 +1 @@ -{"text": "If the [`temperature`](https://platform.openai.com/docs/api-reference/chat/create#chat-create-temperature) parameter is set above 0, the model will likely produce different results each time - this is expected behavior. If you're seeing unexpected differences in the quality completions you receive from [Playground](https://platform.openai.com/playground) vs. the API with `temperature` set to 0, there are a few potential causes to consider. \n\n\n\nFirst, check that your prompt is exactly the same. Even slight differences, such as an extra space or newline character, can lead to different outputs. \n\n\n\nNext, ensure you're using the same parameters in both cases. For example, the `model` parameter set to `gpt-3.5-turbo` and `gpt-4` will produce different completions even with the same prompt, because `gpt-4` is a newer and more capable instruction-following [model](https://platform.openai.com/docs/models).\n\n\n\nIf you've double-checked all of these things and are still seeing discrepancies, ask for help on the [Community Forum](https://community.openai.com/), where users may have experienced similar issues or may be able to assist in troubleshooting your specific case.\n\n", "title": "Why am I getting different completions on Playground vs. the API?", "article_id": "6643200", "url": "https://help.openai.com/en/articles/6643200-why-am-i-getting-different-completions-on-playground-vs-the-api"} \ No newline at end of file +{"text": "If the [`temperature`](https://platform.openai.com/docs/api-reference/chat/create#chat-create-temperature) parameter is set above 0, the model will likely produce different results each time - this is expected behavior. If you're seeing unexpected differences in the quality completions you receive from [Playground](https://platform.openai.com/playground) vs. the API with `temperature` set to 0, there are a few potential causes to consider. \n\n\n\nFirst, check that your prompt is exactly the same. Even slight differences, such as an extra space or newline character, can lead to different outputs. \n\n\n\nNext, ensure you're using the same parameters in both cases. For example, the `model` parameter set to `gpt-3.5-turbo` and `gpt-4` will produce different completions even with the same prompt, because `gpt-4` is a newer and more capable instruction-following [model](https://platform.openai.com/docs/models).\n\n\n\nIf you've double-checked all of these things and are still seeing discrepancies, ask for help on the [Community Forum](https://community.openai.com/), where users may have experienced similar issues or may be able to assist in troubleshooting your specific case.\n\n", "title": "Why am I getting different completions on Playground vs. the API?", "article_id": "6643200", "url": "https://help.openai.com/en/articles/6643200-why-am-i-getting-different-completions-on-playground-vs-the-api"} diff --git a/examples/customer_service_streaming/data/article_6643435.json b/examples/customer_service_streaming/data/article_6643435.json index b9ad1f4f..10acf0e1 100644 --- a/examples/customer_service_streaming/data/article_6643435.json +++ b/examples/customer_service_streaming/data/article_6643435.json @@ -1 +1 @@ -{"text": "**As an \"Explore\" free trial API user,** you receive an initial credit of $5 that expires after three months if this is your first OpenAI account. [Upgrading to the pay-as-you-go plan](https://beta.openai.com/account/billing) will increase your usage limit to $120/month.\n\n\n\n**If you're a current API customer looking to increase your usage limit beyond your existing tier**, please review your **[Usage Limits page](https://platform.openai.com/account/limits)** for information on advancing to the next tier. Should your needs exceed what's available in the 'Increasing your limits' tier or you have an unique use case, click on 'Need help?' to submit a request for a higher limit. Our team will assess your request and respond as soon as we can.\n\n", "title": "How do I get more tokens or increase my monthly usage limits?", "article_id": "6643435", "url": "https://help.openai.com/en/articles/6643435-how-do-i-get-more-tokens-or-increase-my-monthly-usage-limits"} \ No newline at end of file +{"text": "**As an \"Explore\" free trial API user,** you receive an initial credit of $5 that expires after three months if this is your first OpenAI account. [Upgrading to the pay-as-you-go plan](https://beta.openai.com/account/billing) will increase your usage limit to $120/month.\n\n\n\n**If you're a current API customer looking to increase your usage limit beyond your existing tier**, please review your **[Usage Limits page](https://platform.openai.com/account/limits)** for information on advancing to the next tier. Should your needs exceed what's available in the 'Increasing your limits' tier or you have an unique use case, click on 'Need help?' to submit a request for a higher limit. Our team will assess your request and respond as soon as we can.\n\n", "title": "How do I get more tokens or increase my monthly usage limits?", "article_id": "6643435", "url": "https://help.openai.com/en/articles/6643435-how-do-i-get-more-tokens-or-increase-my-monthly-usage-limits"} diff --git a/examples/customer_service_streaming/data/article_6653653.json b/examples/customer_service_streaming/data/article_6653653.json index b4a7439e..0f5228ba 100644 --- a/examples/customer_service_streaming/data/article_6653653.json +++ b/examples/customer_service_streaming/data/article_6653653.json @@ -1 +1 @@ -{"text": "If you are interested in finding and reporting security vulnerabilities in OpenAI's services, please read and follow our [Coordinated Vulnerability Disclosure Policy](https://openai.com/security/disclosure/).\n\n\n\nThis policy explains how to:\n\n\n* Request authorization for testing\n* Identify what types of testing are in-scope and out-of-scope\n* Communicate with us securely\n\nWe appreciate your efforts to help us improve our security and protect our users and technology.\n\n", "title": "How to Report Security Vulnerabilities to OpenAI", "article_id": "6653653", "url": "https://help.openai.com/en/articles/6653653-how-to-report-security-vulnerabilities-to-openai"} \ No newline at end of file +{"text": "If you are interested in finding and reporting security vulnerabilities in OpenAI's services, please read and follow our [Coordinated Vulnerability Disclosure Policy](https://openai.com/security/disclosure/).\n\n\n\nThis policy explains how to:\n\n\n* Request authorization for testing\n* Identify what types of testing are in-scope and out-of-scope\n* Communicate with us securely\n\nWe appreciate your efforts to help us improve our security and protect our users and technology.\n\n", "title": "How to Report Security Vulnerabilities to OpenAI", "article_id": "6653653", "url": "https://help.openai.com/en/articles/6653653-how-to-report-security-vulnerabilities-to-openai"} diff --git a/examples/customer_service_streaming/data/article_6654000.json b/examples/customer_service_streaming/data/article_6654000.json index 7784b22a..765e4ef7 100644 --- a/examples/customer_service_streaming/data/article_6654000.json +++ b/examples/customer_service_streaming/data/article_6654000.json @@ -1 +1 @@ -{"text": "\n\n\ud83d\udca1 `If you're just getting started with OpenAI API, we recommend reading the [Introduction](https://beta.openai.com/docs/introduction/introduction) and [Quickstart](https://beta.openai.com/docs/quickstart) tutorials first.`\n\n\n\n**How prompt engineering works**\n================================\n\n\nDue to the way the instruction-following [models](https://beta.openai.com/docs/models) are trained or the data they are trained on, there are specific prompt formats that work particularly well and align better with the tasks at hand. Below we present a number of prompt formats we find work reliably well, but feel free to explore different formats, which may fit your task best.\n\n\n\n\n**Rules of Thumb and Examples**\n===============================\n\n\n**Note**: the \"*{text input here}*\" is a placeholder for actual text/context \n\n\n\n\n**1.** Use the latest model\n----------------------------\n\n\nFor best results, we generally recommend using the latest, most capable models. As of November 2022, the best options are the **\u201ctext-davinci-003\u201d** [model](https://beta.openai.com/docs/models) for text generation, and the **\u201ccode-davinci-002\u201d** model for code generation.\n\n\n\n\n**2. Put instructions at the beginning of the prompt and use ### or \"\"\" to separate the instruction and context**\n-----------------------------------------------------------------------------------------------------------------\n\n\nLess effective \u274c:\n\n\n\n```\nSummarize the text below as a bullet point list of the most important points. \n \n{text input here}\n```\n\n\nBetter \u2705:\n\n\n\n```\nSummarize the text below as a bullet point list of the most important points. \n \nText: \"\"\" \n{text input here} \n\"\"\"\n```\n\n\n\n\n**3. Be specific, descriptive and as detailed as possible about the desired context, outcome, length, format, style, etc**\n---------------------------------------------------------------------------------------------------------------------------\n\n\nBe specific about the context, outcome, length, format, style, etc \n\n\n\nLess effective \u274c:\n\n\n\n```\nWrite a poem about OpenAI. \n```\n\n\nBetter \u2705:\n\n\n\n```\nWrite a short inspiring poem about OpenAI, focusing on the recent DALL-E product launch (DALL-E is a text to image ML model) in the style of a {famous poet}\n```\n\n\n\n**4. Articulate the desired output format through examples ([example 1](https://beta.openai.com/playground/p/DoMbgEMmkXJ5xOyunwFZDHdg), [example 2](https://beta.openai.com/playground/p/3U5Wx7RTIdNNC9Fg8fc44omi)).**\n----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n\n\nLess effective \u274c:\n\n\n\n```\nExtract the entities mentioned in the text below. Extract the following 4 entity types: company names, people names, specific topics and themes. \n \nText: {text}\n```\n\nShow, and tell - the models respond better when shown specific format requirements. This also makes it easier to programmatically parse out multiple outputs reliably.\n\n\n\nBetter \u2705:\n\n\n\n```\nExtract the important entities mentioned in the text below. First extract all company names, then extract all people names, then extract specific topics which fit the content and finally extract general overarching themes \n \nDesired format: \nCompany names: \nPeople names: -||- \nSpecific topics: -||- \nGeneral themes: -||- \n \nText: {text}\n```\n\n\n\n**5. Start with zero-shot, then few-shot ([example](https://beta.openai.com/playground/p/Ts5kvNWlp7wtdgWEkIAbP1hJ)), neither of them worked, then fine-tune**\n-------------------------------------------------------------------------------------------------------------------------------------------------------------\n\n\n\u2705 Zero-shot \n\n\n\n```\nExtract keywords from the below text. \n \nText: {text} \n \nKeywords:\n```\n\n\n\u2705 Few-shot - provide a couple of examples\n\n\n\n```\nExtract keywords from the corresponding texts below. \n \nText 1: Stripe provides APIs that web developers can use to integrate payment processing into their websites and mobile applications. \nKeywords 1: Stripe, payment processing, APIs, web developers, websites, mobile applications \n## \nText 2: OpenAI has trained cutting-edge language models that are very good at understanding and generating text. Our API provides access to these models and can be used to solve virtually any task that involves processing language. \nKeywords 2: OpenAI, language models, text processing, API. \n## \nText 3: {text} \nKeywords 3:\n```\n\n\n\u2705Fine-tune: see fine-tune best practices [here](https://docs.google.com/document/d/1h-GTjNDDKPKU_Rsd0t1lXCAnHltaXTAzQ8K2HRhQf9U/edit#).\n\n\n\n\n**6. Reduce \u201cfluffy\u201d and imprecise descriptions**\n-------------------------------------------------\n\n\nLess effective \u274c:\n\n\n\n```\nThe description for this product should be fairly short, a few sentences only, and not too much more.\n```\n\n\nBetter \u2705:\n\n\n\n```\nUse a 3 to 5 sentence paragraph to describe this product.\n```\n\n\n\n**7. Instead of just saying what not to do, say what to do instead**\n--------------------------------------------------------------------\n\n\nLess effective \u274c:\n\n\n\n```\nThe following is a conversation between an Agent and a Customer. DO NOT ASK USERNAME OR PASSWORD. DO NOT REPEAT. \n \nCustomer: I can\u2019t log in to my account. \nAgent:\n```\n\n\nBetter \u2705:\n\n\n\n```\nThe following is a conversation between an Agent and a Customer. The agent will attempt to diagnose the problem and suggest a solution, whilst refraining from asking any questions related to PII. Instead of asking for PII, such as username or password, refer the user to the help article www.samplewebsite.com/help/faq \n \nCustomer: I can\u2019t log in to my account. \nAgent:\n```\n\n\n\n**8. Code Generation Specific - Use \u201cleading words\u201d to nudge the model toward a particular pattern**\n----------------------------------------------------------------------------------------------------\n\n\nLess effective \u274c:\n\n\n\n```\n# Write a simple python function that \n# 1. Ask me for a number in mile \n# 2. It converts miles to kilometers\n```\n\n\nIn this code example below, adding \u201c*import*\u201d hints to the model that it should start writing in Python. (Similarly \u201cSELECT\u201d is a good hint for the start of a SQL statement.) \n\n\n\nBetter \u2705:\n\n\n\n```\n# Write a simple python function that \n# 1. Ask me for a number in mile \n# 2. It converts miles to kilometers \n \nimport\n```\n\n\n\n\n**Parameters**\n===============\n\n\nGenerally, we find that **`model`** and **`temperature`** are the most commonly used parameters to alter the model output.\n\n\n1. **`model` -** Higher performance [models](https://beta.openai.com/docs/models) are more expensive and have higher latency.\n2. **`temperature` -** A measure of how often the model outputs a less likely token. The higher the `temperature`, the more random (and usually creative) the output. This, however, is not the same as \u201ctruthfulness\u201d. For most factual use cases such as data extraction, and truthful Q&A, the `temperature` of 0 is best.\n3. **`max_tokens`** (**maximum length)** - Does not control the length of the output, but a hard cutoff limit for token generation. Ideally you won\u2019t hit this limit often, as your model will stop either when it thinks it\u2019s finished, or when it hits a stop sequence you defined.\n4. **`stop` (stop sequences)** - A set of characters (tokens) that, when generated, will cause the text generation to stop.\n\nFor other parameter descriptions see the [API reference](https://beta.openai.com/docs/api-reference/completions/create).\n\n\n\n\n**Additional Resources**\n========================\n\n\nIf you're interested in additional resources, we recommend:\n\n\n* Guides\n\n\n\t+ [Text completion](https://beta.openai.com/docs/guides/completion/text-completion) - learn how to generate or edit text using our models\n\t+ [Code completion](https://beta.openai.com/docs/guides/code/code-completion-private-beta) - explore prompt engineering for Codex\n\t+ [Fine-tuning](https://beta.openai.com/docs/guides/fine-tuning/fine-tuning) - Learn how to train a custom model for your use case\n\t+ [Embeddings](https://beta.openai.com/docs/guides/embeddings/embeddings) - learn how to search, classify, and compare text\n\t+ [Moderation](https://beta.openai.com/docs/guides/moderation/moderation)\n* [OpenAI cookbook repo](https://github.com/openai/openai-cookbook/tree/main/examples) - contains example code and prompts for accomplishing common tasks with the API, including Question-answering with Embeddings\n* [Community Forum](https://community.openai.com/)\n\n\n\n\n", "title": "Best practices for prompt engineering with OpenAI API", "article_id": "6654000", "url": "https://help.openai.com/en/articles/6654000-best-practices-for-prompt-engineering-with-openai-api"} \ No newline at end of file +{"text": "\n\n\ud83d\udca1 `If you're just getting started with OpenAI API, we recommend reading the [Introduction](https://beta.openai.com/docs/introduction/introduction) and [Quickstart](https://beta.openai.com/docs/quickstart) tutorials first.`\n\n\n\n**How prompt engineering works**\n================================\n\n\nDue to the way the instruction-following [models](https://beta.openai.com/docs/models) are trained or the data they are trained on, there are specific prompt formats that work particularly well and align better with the tasks at hand. Below we present a number of prompt formats we find work reliably well, but feel free to explore different formats, which may fit your task best.\n\n\n\n\n**Rules of Thumb and Examples**\n===============================\n\n\n**Note**: the \"*{text input here}*\" is a placeholder for actual text/context \n\n\n\n\n**1.** Use the latest model\n----------------------------\n\n\nFor best results, we generally recommend using the latest, most capable models. As of November 2022, the best options are the **\u201ctext-davinci-003\u201d** [model](https://beta.openai.com/docs/models) for text generation, and the **\u201ccode-davinci-002\u201d** model for code generation.\n\n\n\n\n**2. Put instructions at the beginning of the prompt and use ### or \"\"\" to separate the instruction and context**\n-----------------------------------------------------------------------------------------------------------------\n\n\nLess effective \u274c:\n\n\n\n```\nSummarize the text below as a bullet point list of the most important points. \n \n{text input here}\n```\n\n\nBetter \u2705:\n\n\n\n```\nSummarize the text below as a bullet point list of the most important points. \n \nText: \"\"\" \n{text input here} \n\"\"\"\n```\n\n\n\n\n**3. Be specific, descriptive and as detailed as possible about the desired context, outcome, length, format, style, etc**\n---------------------------------------------------------------------------------------------------------------------------\n\n\nBe specific about the context, outcome, length, format, style, etc \n\n\n\nLess effective \u274c:\n\n\n\n```\nWrite a poem about OpenAI. \n```\n\n\nBetter \u2705:\n\n\n\n```\nWrite a short inspiring poem about OpenAI, focusing on the recent DALL-E product launch (DALL-E is a text to image ML model) in the style of a {famous poet}\n```\n\n\n\n**4. Articulate the desired output format through examples ([example 1](https://beta.openai.com/playground/p/DoMbgEMmkXJ5xOyunwFZDHdg), [example 2](https://beta.openai.com/playground/p/3U5Wx7RTIdNNC9Fg8fc44omi)).**\n----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n\n\nLess effective \u274c:\n\n\n\n```\nExtract the entities mentioned in the text below. Extract the following 4 entity types: company names, people names, specific topics and themes. \n \nText: {text}\n```\n\nShow, and tell - the models respond better when shown specific format requirements. This also makes it easier to programmatically parse out multiple outputs reliably.\n\n\n\nBetter \u2705:\n\n\n\n```\nExtract the important entities mentioned in the text below. First extract all company names, then extract all people names, then extract specific topics which fit the content and finally extract general overarching themes \n \nDesired format: \nCompany names: \nPeople names: -||- \nSpecific topics: -||- \nGeneral themes: -||- \n \nText: {text}\n```\n\n\n\n**5. Start with zero-shot, then few-shot ([example](https://beta.openai.com/playground/p/Ts5kvNWlp7wtdgWEkIAbP1hJ)), neither of them worked, then fine-tune**\n-------------------------------------------------------------------------------------------------------------------------------------------------------------\n\n\n\u2705 Zero-shot \n\n\n\n```\nExtract keywords from the below text. \n \nText: {text} \n \nKeywords:\n```\n\n\n\u2705 Few-shot - provide a couple of examples\n\n\n\n```\nExtract keywords from the corresponding texts below. \n \nText 1: Stripe provides APIs that web developers can use to integrate payment processing into their websites and mobile applications. \nKeywords 1: Stripe, payment processing, APIs, web developers, websites, mobile applications \n## \nText 2: OpenAI has trained cutting-edge language models that are very good at understanding and generating text. Our API provides access to these models and can be used to solve virtually any task that involves processing language. \nKeywords 2: OpenAI, language models, text processing, API. \n## \nText 3: {text} \nKeywords 3:\n```\n\n\n\u2705Fine-tune: see fine-tune best practices [here](https://docs.google.com/document/d/1h-GTjNDDKPKU_Rsd0t1lXCAnHltaXTAzQ8K2HRhQf9U/edit#).\n\n\n\n\n**6. Reduce \u201cfluffy\u201d and imprecise descriptions**\n-------------------------------------------------\n\n\nLess effective \u274c:\n\n\n\n```\nThe description for this product should be fairly short, a few sentences only, and not too much more.\n```\n\n\nBetter \u2705:\n\n\n\n```\nUse a 3 to 5 sentence paragraph to describe this product.\n```\n\n\n\n**7. Instead of just saying what not to do, say what to do instead**\n--------------------------------------------------------------------\n\n\nLess effective \u274c:\n\n\n\n```\nThe following is a conversation between an Agent and a Customer. DO NOT ASK USERNAME OR PASSWORD. DO NOT REPEAT. \n \nCustomer: I can\u2019t log in to my account. \nAgent:\n```\n\n\nBetter \u2705:\n\n\n\n```\nThe following is a conversation between an Agent and a Customer. The agent will attempt to diagnose the problem and suggest a solution, whilst refraining from asking any questions related to PII. Instead of asking for PII, such as username or password, refer the user to the help article www.samplewebsite.com/help/faq \n \nCustomer: I can\u2019t log in to my account. \nAgent:\n```\n\n\n\n**8. Code Generation Specific - Use \u201cleading words\u201d to nudge the model toward a particular pattern**\n----------------------------------------------------------------------------------------------------\n\n\nLess effective \u274c:\n\n\n\n```\n# Write a simple python function that \n# 1. Ask me for a number in mile \n# 2. It converts miles to kilometers\n```\n\n\nIn this code example below, adding \u201c*import*\u201d hints to the model that it should start writing in Python. (Similarly \u201cSELECT\u201d is a good hint for the start of a SQL statement.) \n\n\n\nBetter \u2705:\n\n\n\n```\n# Write a simple python function that \n# 1. Ask me for a number in mile \n# 2. It converts miles to kilometers \n \nimport\n```\n\n\n\n\n**Parameters**\n===============\n\n\nGenerally, we find that **`model`** and **`temperature`** are the most commonly used parameters to alter the model output.\n\n\n1. **`model` -** Higher performance [models](https://beta.openai.com/docs/models) are more expensive and have higher latency.\n2. **`temperature` -** A measure of how often the model outputs a less likely token. The higher the `temperature`, the more random (and usually creative) the output. This, however, is not the same as \u201ctruthfulness\u201d. For most factual use cases such as data extraction, and truthful Q&A, the `temperature` of 0 is best.\n3. **`max_tokens`** (**maximum length)** - Does not control the length of the output, but a hard cutoff limit for token generation. Ideally you won\u2019t hit this limit often, as your model will stop either when it thinks it\u2019s finished, or when it hits a stop sequence you defined.\n4. **`stop` (stop sequences)** - A set of characters (tokens) that, when generated, will cause the text generation to stop.\n\nFor other parameter descriptions see the [API reference](https://beta.openai.com/docs/api-reference/completions/create).\n\n\n\n\n**Additional Resources**\n========================\n\n\nIf you're interested in additional resources, we recommend:\n\n\n* Guides\n\n\n\t+ [Text completion](https://beta.openai.com/docs/guides/completion/text-completion) - learn how to generate or edit text using our models\n\t+ [Code completion](https://beta.openai.com/docs/guides/code/code-completion-private-beta) - explore prompt engineering for Codex\n\t+ [Fine-tuning](https://beta.openai.com/docs/guides/fine-tuning/fine-tuning) - Learn how to train a custom model for your use case\n\t+ [Embeddings](https://beta.openai.com/docs/guides/embeddings/embeddings) - learn how to search, classify, and compare text\n\t+ [Moderation](https://beta.openai.com/docs/guides/moderation/moderation)\n* [OpenAI cookbook repo](https://github.com/openai/openai-cookbook/tree/main/examples) - contains example code and prompts for accomplishing common tasks with the API, including Question-answering with Embeddings\n* [Community Forum](https://community.openai.com/)\n\n\n\n\n", "title": "Best practices for prompt engineering with OpenAI API", "article_id": "6654000", "url": "https://help.openai.com/en/articles/6654000-best-practices-for-prompt-engineering-with-openai-api"} diff --git a/examples/customer_service_streaming/data/article_6654303.json b/examples/customer_service_streaming/data/article_6654303.json index dcdae034..4395a331 100644 --- a/examples/customer_service_streaming/data/article_6654303.json +++ b/examples/customer_service_streaming/data/article_6654303.json @@ -1 +1 @@ -{"text": "\n**If you can\u2019t log in, after having successfully logged in before\u2026**\n--------------------------------------------------------------------\n\n\n* Refresh your browser\u2019s cache and cookies. We recommend using a desktop device to [log in](https://labs.openai.com/auth/login).\n* Ensure that you are using the correct authentication method. For example, if you signed up using \u2018Continue with Google\u2019, try using that method to [log in](https://chat.openai.com/auth/login) too.\n\n\n**If you see 'There is already a user with email ...' or 'Wrong authentication method'...**\n\n\n* You will see this error if you attempt to login in using a different authentication method from what you originally used to register your account. Your account can only be authenticated if you log in with the auth method that was used during initial registration. For example, if you registered using Google sign-in, please continue using the same method.\n* If you're unsure which method you originally used for signing up please try [signing in](https://labs.openai.com/auth/login) with each of the following methods from a non-Firefox incognito window:\n\n\n\t+ Username + Password\n\t+ \"Continue with Google\" button\n\t+ \"Continue with Microsoft\" button\n\n\n**If you are trying to sign up, and you see \u2018This user already exists\u2019...**\n\n\n* This likely means you already began the [sign up](https://labs.openai.com/auth/login) process, but did not complete it. Try to [login](https://labs.openai.com/auth/login) instead.\n\n\n**If you received a Welcome email, but no verification email\u2026**\n\n\n* Register at \n\n**\ufeffIn the event you still receive \"Something went wrong\" or \"Oops...\"** **errors please try the following:**\n\n\n1. Refresh your cache and cookies, then attempt the login with your chosen authentication method.\n2. Try an incognito browser window to complete sign in\n3. Try logging in from a different browser/computer to see if the issue still persists, as a security add-in or extension can occasionally cause this type of error.\n4. Try another network (wired connection, home WiFi, work WiFi, library/cafe WiFi and/or cellular network).\n", "title": "Why can't I log in to Labs / DALL\u2022E?", "article_id": "6654303", "url": "https://help.openai.com/en/articles/6654303-why-can-t-i-log-in-to-labs-dall-e"} \ No newline at end of file +{"text": "\n**If you can\u2019t log in, after having successfully logged in before\u2026**\n--------------------------------------------------------------------\n\n\n* Refresh your browser\u2019s cache and cookies. We recommend using a desktop device to [log in](https://labs.openai.com/auth/login).\n* Ensure that you are using the correct authentication method. For example, if you signed up using \u2018Continue with Google\u2019, try using that method to [log in](https://chat.openai.com/auth/login) too.\n\n\n**If you see 'There is already a user with email ...' or 'Wrong authentication method'...**\n\n\n* You will see this error if you attempt to login in using a different authentication method from what you originally used to register your account. Your account can only be authenticated if you log in with the auth method that was used during initial registration. For example, if you registered using Google sign-in, please continue using the same method.\n* If you're unsure which method you originally used for signing up please try [signing in](https://labs.openai.com/auth/login) with each of the following methods from a non-Firefox incognito window:\n\n\n\t+ Username + Password\n\t+ \"Continue with Google\" button\n\t+ \"Continue with Microsoft\" button\n\n\n**If you are trying to sign up, and you see \u2018This user already exists\u2019...**\n\n\n* This likely means you already began the [sign up](https://labs.openai.com/auth/login) process, but did not complete it. Try to [login](https://labs.openai.com/auth/login) instead.\n\n\n**If you received a Welcome email, but no verification email\u2026**\n\n\n* Register at \n\n**\ufeffIn the event you still receive \"Something went wrong\" or \"Oops...\"** **errors please try the following:**\n\n\n1. Refresh your cache and cookies, then attempt the login with your chosen authentication method.\n2. Try an incognito browser window to complete sign in\n3. Try logging in from a different browser/computer to see if the issue still persists, as a security add-in or extension can occasionally cause this type of error.\n4. Try another network (wired connection, home WiFi, work WiFi, library/cafe WiFi and/or cellular network).\n", "title": "Why can't I log in to Labs / DALL\u2022E?", "article_id": "6654303", "url": "https://help.openai.com/en/articles/6654303-why-can-t-i-log-in-to-labs-dall-e"} diff --git a/examples/customer_service_streaming/data/article_6681258.json b/examples/customer_service_streaming/data/article_6681258.json index 2c8faa41..5deb06ae 100644 --- a/examples/customer_service_streaming/data/article_6681258.json +++ b/examples/customer_service_streaming/data/article_6681258.json @@ -1 +1 @@ -{"text": "**Have you ever tried to solve for x using the OpenAI playground?**\n-------------------------------------------------------------------\n\n\nFor example, solve for x:\n\n\n3 x + 4 = 66\n\n\nFirst you'd isolate terms with *x* to the left hand side like so:\n\n\n3 x + (4 - 4) = 66 - 4\n\n\nthen:\n\n\n3 x = 62\n\n\nto get the result:\n\n\nx = 62 / 3\n\n\n\n... simple, right? Unfortunately, you won\u2019t always get the same result from the [Playground](https://beta.openai.com/playground).\n\n\n\n**Our language models currently struggle with math**\n----------------------------------------------------\n\n\nThe models are not yet capable at performing consistently when asked to solve math problems. In other words if you were to try this example in our Playground using text-davinci-002 you will likely get inconsistent answers when performing math. With some generations you will get the correct answer, however we do not recommend you depend on the GPT models for math tasks.\n\n\n\n**What you can do to improve output consistency in our Playground**\n-------------------------------------------------------------------\n\n\n**Disclaimer**: Even implementing everything below there is only so far we can push the current model.\n\n\n1. The GPT models are great at recognizing patterns, but without enough data they\u2019ll try their best to interpret and recreate a pattern that seems most probable. With minimal data it\u2019s likely to produce a wide variety of potential outputs.\n2. A prompt designed like a homework assignment, will generally have clear instructions on the task and expected output, and may include an example task to further establish the expectations around the task and output format. The text-davinci-002 model does best with an instruction, so the request should be presented in a format that starts with an instruction. Without this the model may not understand your expectations and it will be a bit confused.\n\n**Using the \"solve for x where 3x + 4 = 66\" example:**\n------------------------------------------------------\n\n\nTo improve this [prompt](https://beta.openai.com/playground/p/undsPkd4LAdmFC4SILzvnJ6e) we can add the following:\n\n\n1. Start with an instruction like, \u201cGiven the algebraic equation below, solve for the provided variable\u201d, then test to see the results.\n2. Append to the instruction a description of the expected output, \u201cProvide the answer in the format of \u2018x=\u2019\u201c, then test once more\n3. If results are still inconsistent, append an example problem to the instructions. This example will help establish the pattern that you want the model to recognize and follow, \u201cProblem: 3x+4=66, solve for x. Answer: x=\u201d\n4. The final result will be a [prompt](https://beta.openai.com/playground/p/I4yzqABsUqjQASw6CwM1OftR) that looks like this:\n\n\n```\nGiven the algebraic equation below, solve for the provided variable. Provide the answer in the format of \u2018x=. \nProblem1: y-1=0, solve for y \nAnswer1: y=1 \n--- \nProblem2: 3x+4=66, solve for x. \nAnswer2: x=\n```\n\n\n**Overall recommendation for math problems**\n\n\nWe are aware our currently available models are not yet capable at performing consistently when asked to solve math problems. Consider relying on tools like for now when doing math such as algebraic equations.\n\n", "title": "Doing Math in the Playground", "article_id": "6681258", "url": "https://help.openai.com/en/articles/6681258-doing-math-in-the-playground"} \ No newline at end of file +{"text": "**Have you ever tried to solve for x using the OpenAI playground?**\n-------------------------------------------------------------------\n\n\nFor example, solve for x:\n\n\n3 x + 4 = 66\n\n\nFirst you'd isolate terms with *x* to the left hand side like so:\n\n\n3 x + (4 - 4) = 66 - 4\n\n\nthen:\n\n\n3 x = 62\n\n\nto get the result:\n\n\nx = 62 / 3\n\n\n\n... simple, right? Unfortunately, you won\u2019t always get the same result from the [Playground](https://beta.openai.com/playground).\n\n\n\n**Our language models currently struggle with math**\n----------------------------------------------------\n\n\nThe models are not yet capable at performing consistently when asked to solve math problems. In other words if you were to try this example in our Playground using text-davinci-002 you will likely get inconsistent answers when performing math. With some generations you will get the correct answer, however we do not recommend you depend on the GPT models for math tasks.\n\n\n\n**What you can do to improve output consistency in our Playground**\n-------------------------------------------------------------------\n\n\n**Disclaimer**: Even implementing everything below there is only so far we can push the current model.\n\n\n1. The GPT models are great at recognizing patterns, but without enough data they\u2019ll try their best to interpret and recreate a pattern that seems most probable. With minimal data it\u2019s likely to produce a wide variety of potential outputs.\n2. A prompt designed like a homework assignment, will generally have clear instructions on the task and expected output, and may include an example task to further establish the expectations around the task and output format. The text-davinci-002 model does best with an instruction, so the request should be presented in a format that starts with an instruction. Without this the model may not understand your expectations and it will be a bit confused.\n\n**Using the \"solve for x where 3x + 4 = 66\" example:**\n------------------------------------------------------\n\n\nTo improve this [prompt](https://beta.openai.com/playground/p/undsPkd4LAdmFC4SILzvnJ6e) we can add the following:\n\n\n1. Start with an instruction like, \u201cGiven the algebraic equation below, solve for the provided variable\u201d, then test to see the results.\n2. Append to the instruction a description of the expected output, \u201cProvide the answer in the format of \u2018x=\u2019\u201c, then test once more\n3. If results are still inconsistent, append an example problem to the instructions. This example will help establish the pattern that you want the model to recognize and follow, \u201cProblem: 3x+4=66, solve for x. Answer: x=\u201d\n4. The final result will be a [prompt](https://beta.openai.com/playground/p/I4yzqABsUqjQASw6CwM1OftR) that looks like this:\n\n\n```\nGiven the algebraic equation below, solve for the provided variable. Provide the answer in the format of \u2018x=. \nProblem1: y-1=0, solve for y \nAnswer1: y=1 \n--- \nProblem2: 3x+4=66, solve for x. \nAnswer2: x=\n```\n\n\n**Overall recommendation for math problems**\n\n\nWe are aware our currently available models are not yet capable at performing consistently when asked to solve math problems. Consider relying on tools like for now when doing math such as algebraic equations.\n\n", "title": "Doing Math in the Playground", "article_id": "6681258", "url": "https://help.openai.com/en/articles/6681258-doing-math-in-the-playground"} diff --git a/examples/customer_service_streaming/data/article_6684216.json b/examples/customer_service_streaming/data/article_6684216.json index 76764e7a..48ef412e 100644 --- a/examples/customer_service_streaming/data/article_6684216.json +++ b/examples/customer_service_streaming/data/article_6684216.json @@ -1 +1 @@ -{"text": "OpenAI maintains a [Community Libraries](https://beta.openai.com/docs/libraries/community-libraries) page where we list API clients that developers can use to access the OpenAI API.\n\n\n\nIf you've built an open source library that you'd like added to this page \u2013 thank you! We love to see developers build additional API tooling for other developers. We also want to make sure we are steering developers to good solutions that will make them successful long term, so we have a few criteria that we require before listing libraries on our website.\n\n\n\nPlease make sure you meet the criteria listed below, and then fill our our [Community Libraries request form](https://share.hsforms.com/1y0Ixew-rQOOZisFfnhszVA4sk30).\n\n\n1. **Standard open source license** \nTo be listed, we require that community libraries use a [permissive open-source license](https://choosealicense.com/) such as MIT. This allows our customers to more easily fork libraries if necessary in the event that the owners stop maintaining it or adding features.\n2. **Load API keys through environment variables** \nCode samples in the README must encourage the use of environment variables to load the OpenAI API key, instead of hardcoding it in the source code.\n3. **Correct, high quality code that accurately reflects the API** \nCode should be easy to read/follow, and should generally adhere to our [OpenAPI spec](https://github.com/openai/openai-openapi/blob/master/openapi.yaml) \u2013 new libraries should **not** include endpoints marked as `deprecated: true` in this spec.\n4. **State that it\u2019s an unofficial library** \nPlease state somewhere near the top of your README that it\u2019s an \u201cunofficial\" or \"community-maintained\u201d library.\n5. **Commit to maintaining the library** \nThis primarily means addressing issues and reviewing+merging pull requests. It can also be a good idea to set up Github Issue & PR templates like we have in our [official node library](https://github.com/openai/openai-node/tree/master/.github/ISSUE_TEMPLATE). \n\u200b\n", "title": "Adding your API client to the Community Libraries page", "article_id": "6684216", "url": "https://help.openai.com/en/articles/6684216-adding-your-api-client-to-the-community-libraries-page"} \ No newline at end of file +{"text": "OpenAI maintains a [Community Libraries](https://beta.openai.com/docs/libraries/community-libraries) page where we list API clients that developers can use to access the OpenAI API.\n\n\n\nIf you've built an open source library that you'd like added to this page \u2013 thank you! We love to see developers build additional API tooling for other developers. We also want to make sure we are steering developers to good solutions that will make them successful long term, so we have a few criteria that we require before listing libraries on our website.\n\n\n\nPlease make sure you meet the criteria listed below, and then fill our our [Community Libraries request form](https://share.hsforms.com/1y0Ixew-rQOOZisFfnhszVA4sk30).\n\n\n1. **Standard open source license** \nTo be listed, we require that community libraries use a [permissive open-source license](https://choosealicense.com/) such as MIT. This allows our customers to more easily fork libraries if necessary in the event that the owners stop maintaining it or adding features.\n2. **Load API keys through environment variables** \nCode samples in the README must encourage the use of environment variables to load the OpenAI API key, instead of hardcoding it in the source code.\n3. **Correct, high quality code that accurately reflects the API** \nCode should be easy to read/follow, and should generally adhere to our [OpenAPI spec](https://github.com/openai/openai-openapi/blob/master/openapi.yaml) \u2013 new libraries should **not** include endpoints marked as `deprecated: true` in this spec.\n4. **State that it\u2019s an unofficial library** \nPlease state somewhere near the top of your README that it\u2019s an \u201cunofficial\" or \"community-maintained\u201d library.\n5. **Commit to maintaining the library** \nThis primarily means addressing issues and reviewing+merging pull requests. It can also be a good idea to set up Github Issue & PR templates like we have in our [official node library](https://github.com/openai/openai-node/tree/master/.github/ISSUE_TEMPLATE). \n\u200b\n", "title": "Adding your API client to the Community Libraries page", "article_id": "6684216", "url": "https://help.openai.com/en/articles/6684216-adding-your-api-client-to-the-community-libraries-page"} diff --git a/examples/customer_service_streaming/data/article_6696591.json b/examples/customer_service_streaming/data/article_6696591.json index 13321beb..eade8dfe 100644 --- a/examples/customer_service_streaming/data/article_6696591.json +++ b/examples/customer_service_streaming/data/article_6696591.json @@ -1 +1 @@ -{"text": "The default rate limit for the DALL\u00b7E API depends which model you are using (DALL\u00b7E 2 vs DALL\u00b7E 3) along with your usage tier. For example, with DALL\u00b7E 3 and usage tier 3, you can generate 7 images per minute. \n\n\n\nLearn more in our [rate limits guide](https://platform.openai.com/docs/guides/rate-limits/usage-tiers). You can also check the specific limits for your account in your [limits page](https://platform.openai.com/account/limits).\n\n\n\n\n", "title": "What's the rate limit for the DALL\u00b7E API?", "article_id": "6696591", "url": "https://help.openai.com/en/articles/6696591-what-s-the-rate-limit-for-the-dall-e-api"} \ No newline at end of file +{"text": "The default rate limit for the DALL\u00b7E API depends which model you are using (DALL\u00b7E 2 vs DALL\u00b7E 3) along with your usage tier. For example, with DALL\u00b7E 3 and usage tier 3, you can generate 7 images per minute. \n\n\n\nLearn more in our [rate limits guide](https://platform.openai.com/docs/guides/rate-limits/usage-tiers). You can also check the specific limits for your account in your [limits page](https://platform.openai.com/account/limits).\n\n\n\n\n", "title": "What's the rate limit for the DALL\u00b7E API?", "article_id": "6696591", "url": "https://help.openai.com/en/articles/6696591-what-s-the-rate-limit-for-the-dall-e-api"} diff --git a/examples/customer_service_streaming/data/article_6705023.json b/examples/customer_service_streaming/data/article_6705023.json index c0d6c5b1..3e19ee54 100644 --- a/examples/customer_service_streaming/data/article_6705023.json +++ b/examples/customer_service_streaming/data/article_6705023.json @@ -1 +1 @@ -{"text": "**1. What is the DALL\u00b7E API and how can I access it?**\n\n\nThe DALL\u00b7E API allows you to integrate state of the art image generation capabilities directly into your product. To get started, visit our [developer guide](https://beta.openai.com/docs/guides/images).\n\n\n\n**2. How do I pay for the DALL\u00b7E API?**\n\n\nThe API usage is offered on a pay-as-you-go basis and is billed separately from labs.openai.com. You can find pricing information on our [pricing page](https://openai.com/api/pricing).\n\n\n\nFor large volume discounts (>$5k/month), please [contact sales](https://openai.com/contact-sales/).\n\n\n\n**3. Can I use my OpenAI API trial credits ($5) or labs.openai.com credits on the DALL\u00b7E API?**\n\n\nYou can use the OpenAI API free trial credits ($5) to make DALL\u00b7E API requests.\n\n\n\nDALL\u00b7E API is billed separately from labs.openai.com. Credits granted/purchased on\n\n\nlabs.openai.com do not apply to DALL\u00b7E API.\n\n\n\nFor the latest information on pricing, please see our [pricing page](https://openai.com/api/pricing).\n\n\n\n**4. Are there any API usage limits that I should be aware of?**\n\n\nThe DALL**\u00b7**E API shares the usage limits with other OpenAI API services, which you can find in your [Limits settings](https://platform.openai.com/account/limits). \n\n\n\nAdditionally, org-level rate limits enforce a cap on the number of images you can generate per minute. To learn more, we encourage you to read our help article, \"What's [the rate limit for the DALL\u00b7E API?](https://help.openai.com/en/articles/6696591)\", which provides additional detail.\n\n\n\n**5. Are there any restrictions on the type of content I can generate?**\n\n\nYes - please read our [content policy](https://labs.openai.com/policies/content-policy) to learn what's not allowed on the DALL\u00b7E API.\n\n\n\n**6. Can I sell the images I generate with the API? Can I use it in my application?**\n\n\nSubject to the [Content Policy](https://labs.openai.com/policies/content-policy) and [Terms](https://openai.com/api/policies/terms/), you own the images you create with DALL\u00b7E, including the right to reprint, sell, and merchandise - regardless of whether an image was generated through a free or paid credit.\n\n\n\n**7. What do I need to do before I start serving API outputs to my users?**\n\n\nBefore you launch your product, please make sure you're in compliance with our [use case policy](https://beta.openai.com/docs/usage-policies/use-case-policy) and include [end-user IDs](https://beta.openai.com/docs/usage-policies/end-user-ids) with requests.\n\n\n\n**8. How are images returned by the endpoint?**\n\n\nThe API can output images as URLs (response\\_format =url) or b64\\_json. Our [developer guide](https://beta.openai.com/docs/guides/images) includes more details.\n\n\n\n**9, Which version of DALL\u00b7E is available via the API?**\n\n\nThe API uses the latest version of DALL\u00b7E 2.\n\n\n\n**10. Are the Edit function and Variations features available in the API?**\n\n\nYes - for more detailed instructions, please see our [developer guide](https://beta.openai.com/docs/guides/images).\n\n\n\n**11. Does it support outpainting?**\n\n\nYes! There are many ways to use the /edits endpoint, including inpainting and outpainting. You can try it out firsthand in the [DALL\u00b7E Editor](https://labs.openai.com/editor).\n\n\n\n**12. How can I save output images as files?**\n\n\nThe API can output images as URLs. You'll need to convert these to the format you need. Our [developer guide](https://beta.openai.com/docs/guides/images) includes more details.\n\n\n\n**13. How long do the generated URLs persist?**\n\n\nThe URLs from the API will remain valid for one hour.\n\n\n\n**14. I'm stuck. How do I get help?**\n\n\nFor general help, you can consult our [developer guide](https://beta.openai.com/docs/guides/images) and [help center](https://help.openai.com/en/), or ask questions on our [Community forum](https://community.openai.com/).\n\n", "title": "DALL\u00b7E API FAQ", "article_id": "6705023", "url": "https://help.openai.com/en/articles/6705023-dall-e-api-faq"} \ No newline at end of file +{"text": "**1. What is the DALL\u00b7E API and how can I access it?**\n\n\nThe DALL\u00b7E API allows you to integrate state of the art image generation capabilities directly into your product. To get started, visit our [developer guide](https://beta.openai.com/docs/guides/images).\n\n\n\n**2. How do I pay for the DALL\u00b7E API?**\n\n\nThe API usage is offered on a pay-as-you-go basis and is billed separately from labs.openai.com. You can find pricing information on our [pricing page](https://openai.com/api/pricing).\n\n\n\nFor large volume discounts (>$5k/month), please [contact sales](https://openai.com/contact-sales/).\n\n\n\n**3. Can I use my OpenAI API trial credits ($5) or labs.openai.com credits on the DALL\u00b7E API?**\n\n\nYou can use the OpenAI API free trial credits ($5) to make DALL\u00b7E API requests.\n\n\n\nDALL\u00b7E API is billed separately from labs.openai.com. Credits granted/purchased on\n\n\nlabs.openai.com do not apply to DALL\u00b7E API.\n\n\n\nFor the latest information on pricing, please see our [pricing page](https://openai.com/api/pricing).\n\n\n\n**4. Are there any API usage limits that I should be aware of?**\n\n\nThe DALL**\u00b7**E API shares the usage limits with other OpenAI API services, which you can find in your [Limits settings](https://platform.openai.com/account/limits). \n\n\n\nAdditionally, org-level rate limits enforce a cap on the number of images you can generate per minute. To learn more, we encourage you to read our help article, \"What's [the rate limit for the DALL\u00b7E API?](https://help.openai.com/en/articles/6696591)\", which provides additional detail.\n\n\n\n**5. Are there any restrictions on the type of content I can generate?**\n\n\nYes - please read our [content policy](https://labs.openai.com/policies/content-policy) to learn what's not allowed on the DALL\u00b7E API.\n\n\n\n**6. Can I sell the images I generate with the API? Can I use it in my application?**\n\n\nSubject to the [Content Policy](https://labs.openai.com/policies/content-policy) and [Terms](https://openai.com/api/policies/terms/), you own the images you create with DALL\u00b7E, including the right to reprint, sell, and merchandise - regardless of whether an image was generated through a free or paid credit.\n\n\n\n**7. What do I need to do before I start serving API outputs to my users?**\n\n\nBefore you launch your product, please make sure you're in compliance with our [use case policy](https://beta.openai.com/docs/usage-policies/use-case-policy) and include [end-user IDs](https://beta.openai.com/docs/usage-policies/end-user-ids) with requests.\n\n\n\n**8. How are images returned by the endpoint?**\n\n\nThe API can output images as URLs (response\\_format =url) or b64\\_json. Our [developer guide](https://beta.openai.com/docs/guides/images) includes more details.\n\n\n\n**9, Which version of DALL\u00b7E is available via the API?**\n\n\nThe API uses the latest version of DALL\u00b7E 2.\n\n\n\n**10. Are the Edit function and Variations features available in the API?**\n\n\nYes - for more detailed instructions, please see our [developer guide](https://beta.openai.com/docs/guides/images).\n\n\n\n**11. Does it support outpainting?**\n\n\nYes! There are many ways to use the /edits endpoint, including inpainting and outpainting. You can try it out firsthand in the [DALL\u00b7E Editor](https://labs.openai.com/editor).\n\n\n\n**12. How can I save output images as files?**\n\n\nThe API can output images as URLs. You'll need to convert these to the format you need. Our [developer guide](https://beta.openai.com/docs/guides/images) includes more details.\n\n\n\n**13. How long do the generated URLs persist?**\n\n\nThe URLs from the API will remain valid for one hour.\n\n\n\n**14. I'm stuck. How do I get help?**\n\n\nFor general help, you can consult our [developer guide](https://beta.openai.com/docs/guides/images) and [help center](https://help.openai.com/en/), or ask questions on our [Community forum](https://community.openai.com/).\n\n", "title": "DALL\u00b7E API FAQ", "article_id": "6705023", "url": "https://help.openai.com/en/articles/6705023-dall-e-api-faq"} diff --git a/examples/customer_service_streaming/data/article_6742369.json b/examples/customer_service_streaming/data/article_6742369.json index 1dc1048b..ed0ba76d 100644 --- a/examples/customer_service_streaming/data/article_6742369.json +++ b/examples/customer_service_streaming/data/article_6742369.json @@ -1 +1 @@ -{"text": "While the OpenAI website is only available in English, you can use our models in other languages as well. The models are optimized for use in English, but many of them are robust enough to generate good results for a variety of languages.\n\n\n\nWhen thinking about how to adapt our models to different languages, we recommend starting with one of our pre-made prompts, such as this [English to French](https://beta.openai.com/examples/default-translate) prompt example. By replacing the English input and French output with the language you'd like to use, you can create a new prompt customized to your language.\n\n\n\nIf you write your prompt to in Spanish, you're more likely to receive a response in Spanish. We'd recommend experimenting to see what you can achieve with the models!\n\n", "title": "How do I use the OpenAI API in different languages?", "article_id": "6742369", "url": "https://help.openai.com/en/articles/6742369-how-do-i-use-the-openai-api-in-different-languages"} \ No newline at end of file +{"text": "While the OpenAI website is only available in English, you can use our models in other languages as well. The models are optimized for use in English, but many of them are robust enough to generate good results for a variety of languages.\n\n\n\nWhen thinking about how to adapt our models to different languages, we recommend starting with one of our pre-made prompts, such as this [English to French](https://beta.openai.com/examples/default-translate) prompt example. By replacing the English input and French output with the language you'd like to use, you can create a new prompt customized to your language.\n\n\n\nIf you write your prompt to in Spanish, you're more likely to receive a response in Spanish. We'd recommend experimenting to see what you can achieve with the models!\n\n", "title": "How do I use the OpenAI API in different languages?", "article_id": "6742369", "url": "https://help.openai.com/en/articles/6742369-how-do-i-use-the-openai-api-in-different-languages"} diff --git a/examples/customer_service_streaming/data/article_6781152.json b/examples/customer_service_streaming/data/article_6781152.json index 356ddf6c..6f68483a 100644 --- a/examples/customer_service_streaming/data/article_6781152.json +++ b/examples/customer_service_streaming/data/article_6781152.json @@ -1 +1 @@ -{"text": "If you want to download the images you generated with DALL\u00b7E, you might be wondering how to do it in bulk. Unfortunately, there is no option to download multiple images at once from the website. However, you can still download your images individually by following these steps: \n\n\n1. Click on the image you want to save. This will open the image in a larger view, with some options to edit it, share it, or create variations.\n2. To download the image, simply click on the download icon in the top right corner of the image. This looks like a downward arrow with a horizontal line under it.\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n\n \n\u200b\n\n", "title": "How can I bulk download my generations?", "article_id": "6781152", "url": "https://help.openai.com/en/articles/6781152-how-can-i-bulk-download-my-generations"} \ No newline at end of file +{"text": "If you want to download the images you generated with DALL\u00b7E, you might be wondering how to do it in bulk. Unfortunately, there is no option to download multiple images at once from the website. However, you can still download your images individually by following these steps: \n\n\n1. Click on the image you want to save. This will open the image in a larger view, with some options to edit it, share it, or create variations.\n2. To download the image, simply click on the download icon in the top right corner of the image. This looks like a downward arrow with a horizontal line under it.\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n\n \n\u200b\n\n", "title": "How can I bulk download my generations?", "article_id": "6781152", "url": "https://help.openai.com/en/articles/6781152-how-can-i-bulk-download-my-generations"} diff --git a/examples/customer_service_streaming/data/article_6781222.json b/examples/customer_service_streaming/data/article_6781222.json index fe78a6d7..6f0fcc50 100644 --- a/examples/customer_service_streaming/data/article_6781222.json +++ b/examples/customer_service_streaming/data/article_6781222.json @@ -1 +1 @@ -{"text": "If you want to save your outpainting as a single image, you need to download it at the time of creation. Once you exit outpainting mode, you will not be able to access the full image again (unless you stitch the generation frames together manually). This is because generation frames are stored individually, without the rest of the larger composition.\n\n\n\nIf you want download your outpainting as a single image whilst creating, just click the download icon in the top-right hand corner. This looks like a downward arrow with a horizontal line under it.\n\n\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n\n", "title": "How can I download my outpainting?", "article_id": "6781222", "url": "https://help.openai.com/en/articles/6781222-how-can-i-download-my-outpainting"} \ No newline at end of file +{"text": "If you want to save your outpainting as a single image, you need to download it at the time of creation. Once you exit outpainting mode, you will not be able to access the full image again (unless you stitch the generation frames together manually). This is because generation frames are stored individually, without the rest of the larger composition.\n\n\n\nIf you want download your outpainting as a single image whilst creating, just click the download icon in the top-right hand corner. This looks like a downward arrow with a horizontal line under it.\n\n\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n\n", "title": "How can I download my outpainting?", "article_id": "6781222", "url": "https://help.openai.com/en/articles/6781222-how-can-i-download-my-outpainting"} diff --git a/examples/customer_service_streaming/data/article_6781228.json b/examples/customer_service_streaming/data/article_6781228.json index eb301480..fe7d57cb 100644 --- a/examples/customer_service_streaming/data/article_6781228.json +++ b/examples/customer_service_streaming/data/article_6781228.json @@ -1 +1 @@ -{"text": "You might be tempted to instruct DALL\u00b7E to generate text in your image, by giving it instructions like \"a blue sky with white clouds and the word hello in skywriting\". \n\n\n\nHowever, this is not a reliable or effective way to create text. DALL\u00b7E is not currently designed to produce text, but to generate realistic and artistic images based on your keywords or phrases. Right now, it does not have a specific understanding of writing, labels or any other common text and often produces distorted or unintelligible results.\n\n\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n\n\n", "title": "How can I generate text in my image?", "article_id": "6781228", "url": "https://help.openai.com/en/articles/6781228-how-can-i-generate-text-in-my-image"} \ No newline at end of file +{"text": "You might be tempted to instruct DALL\u00b7E to generate text in your image, by giving it instructions like \"a blue sky with white clouds and the word hello in skywriting\". \n\n\n\nHowever, this is not a reliable or effective way to create text. DALL\u00b7E is not currently designed to produce text, but to generate realistic and artistic images based on your keywords or phrases. Right now, it does not have a specific understanding of writing, labels or any other common text and often produces distorted or unintelligible results.\n\n\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n\n\n", "title": "How can I generate text in my image?", "article_id": "6781228", "url": "https://help.openai.com/en/articles/6781228-how-can-i-generate-text-in-my-image"} diff --git a/examples/customer_service_streaming/data/article_6783457.json b/examples/customer_service_streaming/data/article_6783457.json index d61d2011..e7bc2143 100644 --- a/examples/customer_service_streaming/data/article_6783457.json +++ b/examples/customer_service_streaming/data/article_6783457.json @@ -1 +1 @@ -{"text": "1. **How much does it cost to use ChatGPT?**\n\n\n\t* The research preview of ChatGPT is free to use.\n2. **How does ChatGPT work?**\n\n\n\t* ChatGPT is fine-tuned from GPT-3.5, a language model trained to produce text. ChatGPT was optimized for dialogue by using Reinforcement Learning with Human Feedback (RLHF) \u2013 a method that uses human demonstrations and preference comparisons to guide the model toward desired behavior.\n3. **Why does the AI seem so real and lifelike?** \n\n\n\t* These models were trained on vast amounts of data from the internet written by humans, including conversations, so the responses it provides may sound human-like. It is important to keep in mind that this is a direct result of the system's design (i.e. maximizing the similarity between outputs and the dataset the models were trained on) and that such outputs may be inaccurate, untruthful, and otherwise misleading at times.\n4. **Can I trust that the AI is telling me the truth?**\n\n\n\t* ChatGPT is not connected to the internet, and it can occasionally produce incorrect answers. It has limited knowledge of world and events after 2021 and may also occasionally produce harmful instructions or biased content.\n\t\n\t\n\t\n\tWe'd recommend checking whether responses from the model are accurate or not. If you find an answer is incorrect, please provide that feedback by using the \"Thumbs Down\" button.\n5. **Who can view my conversations?**\n\n\n\t* As part of our commitment to safe and responsible AI, we review conversations to improve our systems and to ensure the content complies with our policies and safety requirements.\n6. **Will you use my conversations for training?**\n\n\n\t* Yes. Your conversations may be reviewed by our AI trainers to improve our systems.\n7. **Can you delete my data?**\n\n\n\t* Yes, please follow the [data deletion process](https://help.openai.com/en/articles/6378407-how-can-i-delete-my-account).\n8. **Can you delete specific prompts?**\n\n\n\t* No, we are not able to delete specific prompts from your history. Please don't share any sensitive information in your conversations.\n9. **Can I see my history of threads? How can I save a conversation I\u2019ve had?**\n\n\n\t* Yes, you can now view and continue your past conversations.\n10. **Where do you save my personal and conversation data?**\n\n\n\t* For more information on how we handle data, please see our [Privacy Policy](https://openai.com/privacy/) and [Terms of Use](https://openai.com/api/policies/terms/).\n11. **How can I implement this? Is there any implementation guide for this?**\n\n\n\t* Developers can [now](https://openai.com/blog/introducing-chatgpt-and-whisper-apis) integrate ChatGPT into their applications and products through our API. Users can expect continuous model improvements and the option to choose dedicated capacity for deeper control over the models. To learn more, please check out the documentation [here](https://platform.openai.com/docs/api-reference/chat).\n12. **Do I need a new account if I already have a Labs or Playground account?**\n\n\n\t* If you have an existing account at [labs.openai.com](https://www.google.com/url?q=http://labs.openai.com&sa=D&source=docs&ust=1669833084818742&usg=AOvVaw3xrSlGIVLLVKjnchqinjLs) or [beta.openai.com](https://www.google.com/url?q=http://beta.openai.com&sa=D&source=docs&ust=1669833084818875&usg=AOvVaw11EJaho-h4CU4I-OMT7x3j), then you can login directly at [chat.openai.com](https://www.google.com/url?q=http://chat.openai.com&sa=D&source=docs&ust=1669833084818926&usg=AOvVaw13rLwSrAYiV5hOL5oPsYDq) using the same login information. If you don't have an account, you'll need to sign-up for a new account at [chat.openai.com](https://www.google.com/url?q=http://chat.openai.com&sa=D&source=docs&ust=1669833084818980&usg=AOvVaw3_WRKLYk-Z3bm-D1EABgkJ).\n13. **Why did ChatGPT give me an answer that\u2019s not related to my question?**\n\n\n\t* ChatGPT will occasionally make up facts or \u201challucinate\u201d outputs. If you find an answer is unrelated, please provide that feedback by using the \"Thumbs Down\" button\n14. **Can I use output from ChatGPT for commercial uses?**\n\n\n\t* Subject to the [Content Policy](https://labs.openai.com/policies/content-policy) and [Terms](https://openai.com/api/policies/terms/), you own the output you create with ChatGPT, including the right to reprint, sell, and merchandise \u2013 regardless of whether output was generated through a free or paid plan.\n15. **I accidentally provided incorrect information during sign-up and now I'm unable to complete the process. How can I fix this issue?**\n\n\n\t* Please reach out to our support team by initiating a new conversation using the on-site chat tool at help.openai.com. We'll be happy to help!\n", "title": "What is ChatGPT?", "article_id": "6783457", "url": "https://help.openai.com/en/articles/6783457-what-is-chatgpt"} \ No newline at end of file +{"text": "1. **How much does it cost to use ChatGPT?**\n\n\n\t* The research preview of ChatGPT is free to use.\n2. **How does ChatGPT work?**\n\n\n\t* ChatGPT is fine-tuned from GPT-3.5, a language model trained to produce text. ChatGPT was optimized for dialogue by using Reinforcement Learning with Human Feedback (RLHF) \u2013 a method that uses human demonstrations and preference comparisons to guide the model toward desired behavior.\n3. **Why does the AI seem so real and lifelike?** \n\n\n\t* These models were trained on vast amounts of data from the internet written by humans, including conversations, so the responses it provides may sound human-like. It is important to keep in mind that this is a direct result of the system's design (i.e. maximizing the similarity between outputs and the dataset the models were trained on) and that such outputs may be inaccurate, untruthful, and otherwise misleading at times.\n4. **Can I trust that the AI is telling me the truth?**\n\n\n\t* ChatGPT is not connected to the internet, and it can occasionally produce incorrect answers. It has limited knowledge of world and events after 2021 and may also occasionally produce harmful instructions or biased content.\n\t\n\t\n\t\n\tWe'd recommend checking whether responses from the model are accurate or not. If you find an answer is incorrect, please provide that feedback by using the \"Thumbs Down\" button.\n5. **Who can view my conversations?**\n\n\n\t* As part of our commitment to safe and responsible AI, we review conversations to improve our systems and to ensure the content complies with our policies and safety requirements.\n6. **Will you use my conversations for training?**\n\n\n\t* Yes. Your conversations may be reviewed by our AI trainers to improve our systems.\n7. **Can you delete my data?**\n\n\n\t* Yes, please follow the [data deletion process](https://help.openai.com/en/articles/6378407-how-can-i-delete-my-account).\n8. **Can you delete specific prompts?**\n\n\n\t* No, we are not able to delete specific prompts from your history. Please don't share any sensitive information in your conversations.\n9. **Can I see my history of threads? How can I save a conversation I\u2019ve had?**\n\n\n\t* Yes, you can now view and continue your past conversations.\n10. **Where do you save my personal and conversation data?**\n\n\n\t* For more information on how we handle data, please see our [Privacy Policy](https://openai.com/privacy/) and [Terms of Use](https://openai.com/api/policies/terms/).\n11. **How can I implement this? Is there any implementation guide for this?**\n\n\n\t* Developers can [now](https://openai.com/blog/introducing-chatgpt-and-whisper-apis) integrate ChatGPT into their applications and products through our API. Users can expect continuous model improvements and the option to choose dedicated capacity for deeper control over the models. To learn more, please check out the documentation [here](https://platform.openai.com/docs/api-reference/chat).\n12. **Do I need a new account if I already have a Labs or Playground account?**\n\n\n\t* If you have an existing account at [labs.openai.com](https://www.google.com/url?q=http://labs.openai.com&sa=D&source=docs&ust=1669833084818742&usg=AOvVaw3xrSlGIVLLVKjnchqinjLs) or [beta.openai.com](https://www.google.com/url?q=http://beta.openai.com&sa=D&source=docs&ust=1669833084818875&usg=AOvVaw11EJaho-h4CU4I-OMT7x3j), then you can login directly at [chat.openai.com](https://www.google.com/url?q=http://chat.openai.com&sa=D&source=docs&ust=1669833084818926&usg=AOvVaw13rLwSrAYiV5hOL5oPsYDq) using the same login information. If you don't have an account, you'll need to sign-up for a new account at [chat.openai.com](https://www.google.com/url?q=http://chat.openai.com&sa=D&source=docs&ust=1669833084818980&usg=AOvVaw3_WRKLYk-Z3bm-D1EABgkJ).\n13. **Why did ChatGPT give me an answer that\u2019s not related to my question?**\n\n\n\t* ChatGPT will occasionally make up facts or \u201challucinate\u201d outputs. If you find an answer is unrelated, please provide that feedback by using the \"Thumbs Down\" button\n14. **Can I use output from ChatGPT for commercial uses?**\n\n\n\t* Subject to the [Content Policy](https://labs.openai.com/policies/content-policy) and [Terms](https://openai.com/api/policies/terms/), you own the output you create with ChatGPT, including the right to reprint, sell, and merchandise \u2013 regardless of whether output was generated through a free or paid plan.\n15. **I accidentally provided incorrect information during sign-up and now I'm unable to complete the process. How can I fix this issue?**\n\n\n\t* Please reach out to our support team by initiating a new conversation using the on-site chat tool at help.openai.com. We'll be happy to help!\n", "title": "What is ChatGPT?", "article_id": "6783457", "url": "https://help.openai.com/en/articles/6783457-what-is-chatgpt"} diff --git a/examples/customer_service_streaming/data/article_6811186.json b/examples/customer_service_streaming/data/article_6811186.json index ea388d62..9914c7bb 100644 --- a/examples/customer_service_streaming/data/article_6811186.json +++ b/examples/customer_service_streaming/data/article_6811186.json @@ -1 +1 @@ -{"text": "Fine-tuning with GPT-3.5\n========================\n\n\nFine-tuning data provides models with examples of how it should respond do a given conversation. We'll want these examples to match the input that the model will see in production as closely as possible. \n\n\n\n#### First, system instructions.\n\n\nThese tell the model how to act, and supply any contextual information. You should use the prompt used in the training dataset when calling the fine-tuned model.\n\n\n\n\n```\n{\"role\": \"system\", \"content\": \"Marv is a factual chatbot that is also sarcastic.\"}\n```\n\n#### \n**Second,** conversation **data.**\n\n\nWe'll want to provide varied examples of conversations that the model may run into, such as \"What's the capital of France?\" and \"Who wrote 'Romeo and Juliet'?\"\n\n\n\n\n```\n{\"role\": \"user\", \"content\": \"What's the capital of France?\"}\n```\n\n#### Next, the assistant response.\n\n\nHere, we present the model with an example of how to respond to the previous message, given the system instruction. For our snarky assistant, we may choose a response like this:\n\n\n\n\n```\n{\"role\": \"assistant\", \"content\": \"Paris, as if everyone doesn't know that already.\"}\n```\n\n\n#### Finally, putting it all together.\n\n\nOnce we have many examples, we can put these all together and begin training. Our dataset should look like follows:\n\n\n\n\n```\n{\"messages\": [{\"role\": \"system\", \"content\": \"Marv is a factual chatbot that is also sarcastic.\"}, \n{\"role\": \"user\", \"content\": \"What's the capital of France?\"} \n{\"role\": \"assistant\", \"content\": \"Paris, as if everyone doesn't know that already.\"}]} \n \n{\"messages\": [{\"role\": \"system\", \"content\": \"Marv is a factual chatbot that is also sarcastic.\"}, \n{\"role\": \"user\", \"content\": \"Who wrote 'Romeo and Juliet'?\"}, \n{\"role\": \"assistant\", \"content\": \"Oh, just some guy named William Shakespeare. Ever heard of him?\"}]} \n \n{\"messages\": [{\"role\": \"system\", \"content\": \"Marv is a factual chatbot that is also sarcastic.\"}, \n{\"role\": \"user\", \"content\": \"How far is the Moon from Earth?\"}, \n{\"role\": \"assistant\", \"content\": \"Around 384,400 kilometers. Give or take a few, like that really matters.\"}]}\n```\n\n\n\nFine-tuning with babbage and davinci\n====================================\n\n\nTo fine-tune effectively without ChatCompletions, you need to format your data properly to provide clues to the model about where to start and stop generating text. \n\n\n\n**Indicator String** \n\n\nThe indicator string is a symbol or sequence of symbols that you append to the end of your prompt to tell the model that you want it to start generating text after this string. \n\n\n\nFor example, if you want the model to categorize items as colors, you can use an indicator string like '->'. The prompts in your dataset would look like this:\n\n\n* 'banana ->'\n* 'lime ->'\n* 'tomato ->'\n\nYou can use any string as an indicator string as long as it doesn't appear anywhere else in the dataset. We recommend using '\\n###\\n'.\n\n\n\n**Stop Sequence**\n\n\nThe stop sequence is another special symbol or sequence of symbols that you use to tell the model that you want it to stop generating text after that point. \n\n\n\nFor example, if you want the model to generate one word as a completion, you can use a stop sequence such as \"\\n\" (newline) or \".\" (period) to mark the end of the completion, like this: \n\n\n* 'prompt' : 'banana ->', 'completion' : ' yellow \\n'\n* 'prompt' : 'lime ->', 'completion' : ' green \\n'\n* 'prompt' : 'tomato ->', 'completion' : ' red \\n'\n\n\n**Calling the model**\n\n\nYou should use the same symbols used in your dataset when calling the model. If you used the dataset above, you should use '\\n' as a stop sequence. You should also append '->' to your prompts as an indicator string (e.g. prompt: 'lemon -> ')\n\n\n\nIt is important that you use consistent and unique symbols for the indicator string and the stop sequence, and that they don't appear anywhere else in your data. Otherwise, the model might get confused and generate unwanted or incorrect text. \n\n\n\n**Extra Recommendations**\n\n\nWe also recommend appending a single space character at the beginning of your outputs. \n\n\n\nYou can also use our [command line tool](https://beta.openai.com/docs/guides/fine-tuning/cli-data-preparation-tool) to help format your dataset, after you have prepared it.\n\n", "title": "How do I format my fine-tuning data?", "article_id": "6811186", "url": "https://help.openai.com/en/articles/6811186-how-do-i-format-my-fine-tuning-data"} \ No newline at end of file +{"text": "Fine-tuning with GPT-3.5\n========================\n\n\nFine-tuning data provides models with examples of how it should respond do a given conversation. We'll want these examples to match the input that the model will see in production as closely as possible. \n\n\n\n#### First, system instructions.\n\n\nThese tell the model how to act, and supply any contextual information. You should use the prompt used in the training dataset when calling the fine-tuned model.\n\n\n\n\n```\n{\"role\": \"system\", \"content\": \"Marv is a factual chatbot that is also sarcastic.\"}\n```\n\n#### \n**Second,** conversation **data.**\n\n\nWe'll want to provide varied examples of conversations that the model may run into, such as \"What's the capital of France?\" and \"Who wrote 'Romeo and Juliet'?\"\n\n\n\n\n```\n{\"role\": \"user\", \"content\": \"What's the capital of France?\"}\n```\n\n#### Next, the assistant response.\n\n\nHere, we present the model with an example of how to respond to the previous message, given the system instruction. For our snarky assistant, we may choose a response like this:\n\n\n\n\n```\n{\"role\": \"assistant\", \"content\": \"Paris, as if everyone doesn't know that already.\"}\n```\n\n\n#### Finally, putting it all together.\n\n\nOnce we have many examples, we can put these all together and begin training. Our dataset should look like follows:\n\n\n\n\n```\n{\"messages\": [{\"role\": \"system\", \"content\": \"Marv is a factual chatbot that is also sarcastic.\"}, \n{\"role\": \"user\", \"content\": \"What's the capital of France?\"} \n{\"role\": \"assistant\", \"content\": \"Paris, as if everyone doesn't know that already.\"}]} \n \n{\"messages\": [{\"role\": \"system\", \"content\": \"Marv is a factual chatbot that is also sarcastic.\"}, \n{\"role\": \"user\", \"content\": \"Who wrote 'Romeo and Juliet'?\"}, \n{\"role\": \"assistant\", \"content\": \"Oh, just some guy named William Shakespeare. Ever heard of him?\"}]} \n \n{\"messages\": [{\"role\": \"system\", \"content\": \"Marv is a factual chatbot that is also sarcastic.\"}, \n{\"role\": \"user\", \"content\": \"How far is the Moon from Earth?\"}, \n{\"role\": \"assistant\", \"content\": \"Around 384,400 kilometers. Give or take a few, like that really matters.\"}]}\n```\n\n\n\nFine-tuning with babbage and davinci\n====================================\n\n\nTo fine-tune effectively without ChatCompletions, you need to format your data properly to provide clues to the model about where to start and stop generating text. \n\n\n\n**Indicator String** \n\n\nThe indicator string is a symbol or sequence of symbols that you append to the end of your prompt to tell the model that you want it to start generating text after this string. \n\n\n\nFor example, if you want the model to categorize items as colors, you can use an indicator string like '->'. The prompts in your dataset would look like this:\n\n\n* 'banana ->'\n* 'lime ->'\n* 'tomato ->'\n\nYou can use any string as an indicator string as long as it doesn't appear anywhere else in the dataset. We recommend using '\\n###\\n'.\n\n\n\n**Stop Sequence**\n\n\nThe stop sequence is another special symbol or sequence of symbols that you use to tell the model that you want it to stop generating text after that point. \n\n\n\nFor example, if you want the model to generate one word as a completion, you can use a stop sequence such as \"\\n\" (newline) or \".\" (period) to mark the end of the completion, like this: \n\n\n* 'prompt' : 'banana ->', 'completion' : ' yellow \\n'\n* 'prompt' : 'lime ->', 'completion' : ' green \\n'\n* 'prompt' : 'tomato ->', 'completion' : ' red \\n'\n\n\n**Calling the model**\n\n\nYou should use the same symbols used in your dataset when calling the model. If you used the dataset above, you should use '\\n' as a stop sequence. You should also append '->' to your prompts as an indicator string (e.g. prompt: 'lemon -> ')\n\n\n\nIt is important that you use consistent and unique symbols for the indicator string and the stop sequence, and that they don't appear anywhere else in your data. Otherwise, the model might get confused and generate unwanted or incorrect text. \n\n\n\n**Extra Recommendations**\n\n\nWe also recommend appending a single space character at the beginning of your outputs. \n\n\n\nYou can also use our [command line tool](https://beta.openai.com/docs/guides/fine-tuning/cli-data-preparation-tool) to help format your dataset, after you have prepared it.\n\n", "title": "How do I format my fine-tuning data?", "article_id": "6811186", "url": "https://help.openai.com/en/articles/6811186-how-do-i-format-my-fine-tuning-data"} diff --git a/examples/customer_service_streaming/data/article_6824809.json b/examples/customer_service_streaming/data/article_6824809.json index c9111049..593c7a3a 100644 --- a/examples/customer_service_streaming/data/article_6824809.json +++ b/examples/customer_service_streaming/data/article_6824809.json @@ -1 +1 @@ -{"text": "How can I tell how many tokens a string will have before I try to embed it?\n===========================================================================\n\n\nFor V2 embedding models, as of Dec 2022, there is not yet a way to split a string into tokens. The only way to get total token counts is to submit an API request.\n\n\n* If the request succeeds, you can extract the number of tokens from the response: `response[\u201cusage\u201d][\u201ctotal\\_tokens\u201d]`\n* If the request fails for having too many tokens, you can extract the number of tokens from the error message: `This model's maximum context length is 8191 tokens, however you requested 10000 tokens (10000 in your prompt; 0 for the completion). Please reduce your prompt; or completion length.`\n\n\nFor V1 embedding models, which are based on GPT-2/GPT-3 tokenization, you can count tokens in a few ways:\n\n\n* For one-off checks, the [OpenAI tokenizer](https://beta.openai.com/tokenizer) page is convenient\n* In Python, [transformers.GPT2TokenizerFast](https://huggingface.co/docs/transformers/model_doc/gpt2#transformers.GPT2TokenizerFast) (the GPT-2 tokenizer is the same as GPT-3)\n* In JavaScript, [gpt-3-encoder](https://www.npmjs.com/package/gpt-3-encoder)\n\n\nHow can I retrieve K nearest embedding vectors quickly?\n=======================================================\n\n\nFor searching over many vectors quickly, we recommend using a vector database.\n\n\n\nVector database options include:\n\n\n* [Pinecone](https://www.pinecone.io/), a fully managed vector database\n* [Weaviate](https://weaviate.io/), an open-source vector search engine\n* [Faiss](https://engineering.fb.com/2017/03/29/data-infrastructure/faiss-a-library-for-efficient-similarity-search/), a vector search algorithm by Facebook\n\nWhich distance function should I use?\n=====================================\n\n\nWe recommend [cosine similarity](https://en.wikipedia.org/wiki/Cosine_similarity). The choice of distance function typically doesn\u2019t matter much.\n\n\n\nOpenAI embeddings are normalized to length 1, which means that:\n\n\n* Cosine similarity can be computed slightly faster using just a dot product\n* Cosine similarity and Euclidean distance will result in the identical rankings\n", "title": "Embeddings - Frequently Asked Questions", "article_id": "6824809", "url": "https://help.openai.com/en/articles/6824809-embeddings-frequently-asked-questions"} \ No newline at end of file +{"text": "How can I tell how many tokens a string will have before I try to embed it?\n===========================================================================\n\n\nFor V2 embedding models, as of Dec 2022, there is not yet a way to split a string into tokens. The only way to get total token counts is to submit an API request.\n\n\n* If the request succeeds, you can extract the number of tokens from the response: `response[\u201cusage\u201d][\u201ctotal\\_tokens\u201d]`\n* If the request fails for having too many tokens, you can extract the number of tokens from the error message: `This model's maximum context length is 8191 tokens, however you requested 10000 tokens (10000 in your prompt; 0 for the completion). Please reduce your prompt; or completion length.`\n\n\nFor V1 embedding models, which are based on GPT-2/GPT-3 tokenization, you can count tokens in a few ways:\n\n\n* For one-off checks, the [OpenAI tokenizer](https://beta.openai.com/tokenizer) page is convenient\n* In Python, [transformers.GPT2TokenizerFast](https://huggingface.co/docs/transformers/model_doc/gpt2#transformers.GPT2TokenizerFast) (the GPT-2 tokenizer is the same as GPT-3)\n* In JavaScript, [gpt-3-encoder](https://www.npmjs.com/package/gpt-3-encoder)\n\n\nHow can I retrieve K nearest embedding vectors quickly?\n=======================================================\n\n\nFor searching over many vectors quickly, we recommend using a vector database.\n\n\n\nVector database options include:\n\n\n* [Pinecone](https://www.pinecone.io/), a fully managed vector database\n* [Weaviate](https://weaviate.io/), an open-source vector search engine\n* [Faiss](https://engineering.fb.com/2017/03/29/data-infrastructure/faiss-a-library-for-efficient-similarity-search/), a vector search algorithm by Facebook\n\nWhich distance function should I use?\n=====================================\n\n\nWe recommend [cosine similarity](https://en.wikipedia.org/wiki/Cosine_similarity). The choice of distance function typically doesn\u2019t matter much.\n\n\n\nOpenAI embeddings are normalized to length 1, which means that:\n\n\n* Cosine similarity can be computed slightly faster using just a dot product\n* Cosine similarity and Euclidean distance will result in the identical rankings\n", "title": "Embeddings - Frequently Asked Questions", "article_id": "6824809", "url": "https://help.openai.com/en/articles/6824809-embeddings-frequently-asked-questions"} diff --git a/examples/customer_service_streaming/data/article_6825453.json b/examples/customer_service_streaming/data/article_6825453.json index 6b323b1e..4796751b 100644 --- a/examples/customer_service_streaming/data/article_6825453.json +++ b/examples/customer_service_streaming/data/article_6825453.json @@ -1 +1 @@ -{"text": "**Introducing the GPT Store and ChatGPT Team plan (Jan 10, 2024)**\n------------------------------------------------------------------\n\n\n#### Discover what\u2019s trending in the GPT Store\n\n\nThe store features a diverse range of GPTs developed by our partners and the community. Browse popular and trending GPTs on the community leaderboard, with categories like DALL\u00b7E, writing, research, programming, education, and lifestyle. \n\n\n\nExplore GPTs at chat.openai.com/gpts.\n\n\n#### Use ChatGPT alongside your team\n\n\nWe\u2019re launching a new ChatGPT plan for teams of all sizes, which provides a secure, collaborative workspace to get the most out of ChatGPT at work. \n\n\n\nChatGPT Team offers access to our advanced models like GPT-4 and DALL\u00b7E 3, and tools like Advanced Data Analysis. It additionally includes a dedicated collaborative workspace for your team and admin tools for team management. As with ChatGPT Enterprise, you own and control your business data \u2014 we do not train on your business data or conversations, and our models don\u2019t learn from your usage. More details on our data privacy practices can be found on our [privacy page](https://openai.com/enterprise-privacy) and [Trust Portal](https://trust.openai.com/).\n\n\n\nYou can learn more about the ChatGPT Team plan [here](https://openai.com/chatgpt/team).\n\n\n\n**ChatGPT with voice is available to all users (November 21, 2023)**\n--------------------------------------------------------------------\n\n\nChatGPT with voice is now available to all free users. Download the app on your phone and tap the headphones icon to start a conversation.\n\n\n\n**Introducing GPTs (November 6, 2023)**\n---------------------------------------\n\n\nYou can now create custom versions of ChatGPT that combine instructions, extra knowledge, and any combination of skills. Learn more [here](https://openai.com/blog/introducing-gpts).\n\n\n\nWe\u2019re rolling out custom versions of ChatGPT that you can create for a specific purpose\u2014called GPTs. GPTs are a new way for anyone to create a tailored version of ChatGPT to be more helpful in their daily life, at specific tasks, at work, or at home\u2014and then share that creation with others. For example, GPTs can help you [learn the rules to any board game, help teach your kids math, or design stickers](https://openai.com/chatgpt#do-more-with-gpts). \n\n\n\nPlus and Enterprise users can start creating GPTs this week. Later this month, we\u2019ll launch the GPT Store, so people can feature and make money from their GPTs. We plan to offer GPTs to more users soon.\n\n\n\n**Browsing is now out of beta (October 17, 2023)**\n--------------------------------------------------\n\n\nBrowsing, which we re-launched a few weeks ago, is moving out of beta.\n\n\n\nPlus and Enterprise users no longer need to switch the beta toggle to use browse, and are able to choose \"Browse with Bing\" from the GPT-4 model selector.\n\n\n\n**DALL\u00b7E 3 is now rolling out in beta (October 16, 2023)**\n----------------------------------------------------------\n\n\nWe\u2019ve integrated DALL\u00b7E 3 with ChatGPT, allowing it to respond to your requests with images. From a simple sentence to a detailed paragraph, ask ChatGPT what you want to see and it will translate your ideas into exceptionally accurate images.\n\n\n\nTo use DALL\u00b7E 3 on both web and mobile, choose DALL\u00b7E 3 in the selector under GPT-4. The message limit may vary based on capacity.\n\n\n\n**Browsing is rolling back out to Plus users (September 27, 2023)**\n-------------------------------------------------------------------\n\n\nBrowsing is rolling out to all Plus users. ChatGPT can now browse the internet to provide you with current and authoritative information, complete with direct links to sources. It is no longer limited to data before September 2021. \n\n\n\nTo try it out, enable Browsing in your beta features setting.\n\n\n* Click on 'Profile & Settings\u2019\n* Select 'Beta features'\n* Toggle on \u2018Browse with Bing\u2019\n\nChoose Browse with Bing in the selector under GPT-4.\n\n\n\n**New voice and image capabilities in ChatGPT (September 25, 2023)**\n--------------------------------------------------------------------\n\n\nWe are beginning to roll out new voice and image capabilities in ChatGPT. They offer a new, more intuitive type of interface by allowing you to have a voice conversation or show ChatGPT what you\u2019re talking about. Learn more [here](https://openai.com/blog/chatgpt-can-now-see-hear-and-speak).\n\n\n#### Voice (Beta) is now rolling out to Plus users on iOS and Android\n\n\nYou can now use voice to engage in a back-and-forth conversation with your assistant. Speak with it on the go, request a bedtime story, or settle a dinner table debate.\n\n\n\nTo get started with voice, head to Settings \u2192 New Features on the mobile app and opt into voice conversations. Then, tap the headphone button located in the top-right corner of the home screen and choose your preferred voice out of five different voices.\n\n\n#### Image input will be generally available to Plus users on all platforms\n\n\nYou can now show ChatGPT one or more images. Troubleshoot why your grill won\u2019t start, explore the contents of your fridge to plan a meal, or analyze a complex graph for work-related data. To focus on a specific part of the image, you can use the drawing tool in our mobile app.\n\n\n\nTo get started, tap the photo button to capture or choose an image. You can also discuss multiple images or use our drawing tool to guide your assistant.\n\n\n\n**ChatGPT language support - Alpha on web (September 11, 2023)**\n----------------------------------------------------------------\n\n\nChatGPT now supports a limited selection of languages in the interface: \n\n\n* Chinese (zh-Hans)\n* Chinese (zh-TW)\n* French (fr-FR)\n* German (de-DE)\n* Italian (it-IT)\n* Japanese (ja-JP)\n* Portuguese (pt-BR)\n* Russian (ru-RU)\n* Spanish (es-ES)\n\nIf you've configured your browser to use one of these supported languages, you'll see a banner in ChatGPT that enables you to switch your language settings. You can deactivate this option at any time through the settings menu.\n\n\n\nThis feature is in alpha, requires opting in, and currently can only be used on the web at chat.openai.com. Learn more [here](https://help.openai.com/en/articles/8357869-chatgpt-language-support-beta-web).\n\n\n\nIntroducing ChatGPT Enterprise (August 28, 2023)\n------------------------------------------------\n\n\nToday we\u2019re launching [ChatGPT Enterprise](https://openai.com/blog/introducing-chatgpt-enterprise), which offers enterprise-grade security and privacy, unlimited higher-speed GPT-4 access, longer context windows for processing longer inputs, advanced data analysis capabilities, customization options, and much more. \n\n\n\nChatGPT Enterprise also provides unlimited access to Advanced Data Analysis, previously known as [Code Interpreter](https://openai.com/blog/chatgpt-plugins).\n\n\n\n[Learn more on our website](https://openai.com/enterprise) and connect with our sales team to get started.\n\n\n\nCustom instructions are now available to users in the EU & UK (August 21, 2023)\n-------------------------------------------------------------------------------\n\n\nCustom instructions are now available to users in the European Union & United Kingdom. \n\n\n\nTo add your instructions:\n\n\n* Click on your name\n* Select \u2018Custom instructions\u2019\n\nCustom instructions are now available to free users (August 9, 2023)\n--------------------------------------------------------------------\n\n\nCustom instructions are now available to ChatGPT users on the free plan, except for in the EU & UK where we will be rolling it out soon!\n\n\n\nCustomize your interactions with ChatGPT by providing specific details and guidelines for your chats.\n\n\n\nTo add your instructions:\n\n\n* Click on your name\n* Select \u2018Custom instructions\u2019\n\nUpdates to ChatGPT (August 3, 2023)\n-----------------------------------\n\n\nWe\u2019re rolling out a bunch of small updates to improve the ChatGPT experience. Shipping over the next week:\n\n\n\n**1. Prompt examples:** A blank page can be intimidating. At the beginning of a new chat, you\u2019ll now see examples to help you get started.\n\n\n**2. Suggested replies:** Go deeper with a click. ChatGPT now suggests relevant ways to continue your conversation.\n\n\n**3. GPT-4 by default, finally:** When starting a new chat as a Plus user, ChatGPT will remember your previously selected model \u2014 no more defaulting back to GPT-3.5.\n\n\n**4. Upload multiple files:** You can now ask ChatGPT to analyze data and generate insights across multiple files. This is available with the Code Interpreter beta for all Plus users.\n\n\n**5. Stay logged in:** You\u2019ll no longer be logged out every 2 weeks! When you do need to log in, you\u2019ll be greeted with a much more welcoming page.\n\n\n**6. Keyboard shortcuts:** Work faster with shortcuts, like \u2318 (Ctrl) + Shift + ; to copy last code block. Try \u2318 (Ctrl) + / to see the complete list.\n\n\n\nIntroducing the ChatGPT app for Android (July 25, 2023)\n-------------------------------------------------------\n\n\nChatGPT for Android is now available for download in the United States, India, Bangladesh, and Brazil from the [Google Play Store](https://play.google.com/store/apps/details?id=com.openai.chatgpt).\n\n\n\nWe plan to expand the rollout to additional countries over the next week. You can track the Android rollout [here](https://help.openai.com/en/articles/7947663-chatgpt-supported-countries).\n\n\n\nCustom instructions are rolling out in beta (July 20, 2023)\n-----------------------------------------------------------\n\n\nWe\u2019re starting to roll out custom instructions, giving you more control over ChatGPT\u2019s responses. Set your preferences once, and they\u2019ll steer future conversations. You can read more about custom instructions in the blogpost [here](https://openai.com/blog/custom-instructions-for-chatgpt).\n\n\n\nCustom instructions are available to all Plus users and expanding to all users in the coming weeks.\n\n\n\nTo enable beta features:\n\n\n* Click on 'Profile & Settings\u2019\n* Select 'Beta features'\n* Toggle on 'Custom instructions'\n\nTo add your instructions:\n\n\n* Click on your name\n* Select \u2018Custom instructions\u2019\n\nThis feature is not yet available in the UK and EU.\n\n\n\nHigher message limits for GPT-4 (July 19, 2023)\n-----------------------------------------------\n\n\nWe're doubling the number of messages ChatGPT Plus customers can send with GPT-4. Rolling out over the next week, the new message limit will be 50 every 3 hours.\n\n\n\nCode interpreter is now rolling out in beta on web (July 6, 2023)\n-----------------------------------------------------------------\n\n\nWe\u2019re rolling out [code interpreter](https://openai.com/blog/chatgpt-plugins#code-interpreter) to all ChatGPT Plus users over the next week.\n\n\n\nIt lets ChatGPT run code, optionally with access to files you've uploaded. You can ask ChatGPT to analyze data, create charts, edit files, perform math, etc.\n\n\n\nWe\u2019ll be making these features accessible to Plus users on the web via the beta panel in your settings over the course of the next week.\n\n\n\nTo enable code interpreter:\n\n\n* Click on your name\n* Select beta features from your settings\n* Toggle on the beta features you\u2019d like to try\n\nBrowsing is temporarily disabled (July 3, 2023)\n-----------------------------------------------\n\n\nWe've [learned](https://help.openai.com/en/articles/8077698-how-do-i-use-chatgpt-browse-with-bing-to-search-the-web) that the browsing beta can occasionally display content in ways we don't want, e.g. if a user specifically asks for a URL's full text, it may inadvertently fulfill this request. We are temporarily disabling Browse while we fix this.\n\n\n\nBrowsing and search on mobile (June 22, 2023)\n---------------------------------------------\n\n\nWe\u2019ve made two updates to the mobile ChatGPT app:\n\n\n* Browsing: Plus users can now use Browsing to get comprehensive answers and current insights on events and information that extend beyond the model's original training data. To try it out, enable Browsing in the \u201cnew features\u201d section of your app settings. Then select GPT-4 in the model switcher and choose \u201cBrowse with Bing\u201d in the drop-down.\n* Search History Improvements: Tapping on a search result takes you directly to the respective point in the conversation.\n\n\niOS app available in more countries, shared links in alpha, Bing Plugin, disable history on iOS (May 24, 2023)\n--------------------------------------------------------------------------------------------------------------\n\n\n#### ChatGPT app for iOS in more countries\n\n\nGood news! We\u2019re expanding availability of the [ChatGPT app for iOS](https://openai.com/blog/introducing-the-chatgpt-app-for-ios) to more countries and regions. Users in 11 countries can now download the ChatGPT app in the [Apple App Store](https://apps.apple.com/app/chatgpt/id6448311069) including the United States: Albania, Croatia, France, Germany, Ireland, Jamaica, Korea, New Zealand, Nicaragua, Nigeria, and the United Kingdom.\n\n\n\nWe will continue to roll out to more countries and regions in the coming weeks. You can track the iOS app rollout [here](https://help.openai.com/en/articles/7947663-chatgpt-supported-countries).\n\n\n#### Shared Links\n\n\nWe're excited to introduce a new feature: shared links. This feature allows you to create and share your ChatGPT conversations with others. Recipients of your shared link can either view the conversation or copy it to their own chats to continue the thread. This feature is currently rolling out to a small set of testers in alpha, with plans to expand to all users (including free) in the upcoming weeks.\n\n\n\nTo share your conversations:\n\n\n1. Click on the thread you\u2019d like to share\n2. Select the \u201cShare\u201d button\n3. Click on \u201cCopy Link\u201d\n\n[Learn more](https://help.openai.com/en/articles/7925741-chatgpt-shared-links-faq).\n\n\n#### Bing Plugin\n\n\nBrowse with Bing. We\u2019ve integrated the browsing feature - currently in beta for paid users - more deeply with Bing. You can now click into queries that the model is performing. We look forward to expanding the integration soon.\n\n\n#### Disable chat history on iOS\n\n\nYou can now disable your chat history on iOS. Conversations started on your device when chat history is disabled won\u2019t be used to improve our models, won\u2019t appear in your history on your other devices, and will only be stored for 30 days. Similar to the functionality on the web, this setting does not sync across browsers or devices. [Learn more](https://help.openai.com/en/articles/7730893-data-controls-faq).\n\n\n\nWeb browsing and Plugins are now rolling out in beta (May 12, 2023)\n-------------------------------------------------------------------\n\n\nIf you are a ChatGPT Plus user, enjoy early access to experimental new features, which may change during development. We\u2019ll be making these features accessible via a new beta panel in your settings, which is rolling out to all Plus users over the course of the next week.\n\n\n\n![](https://downloads.intercomcdn.com/i/o/740734818/c7d818c221f5f023ab1a0c27/BetaPanel.png)Once the beta panel rolls out to you, you\u2019ll be able to try two new features:\n\n\n* **Web browsing**: Try a new version of ChatGPT that knows when and how to browse the internet to answer questions about recent topics and events.\n* **Plugins:** Try a new version of ChatGPT that knows when and how to use third-party plugins that you enable.\n\n\nTo use third-party plugins, follow these instructions:\n\n\n* Navigate to \n* Select \u201cPlugins\u201d from the model switcher\n* In the \u201cPlugins\u201d dropdown, click \u201cPlugin Store\u201d to install and enable new plugins\n\n\nTo enable beta features:\n\n\n1. Click on 'Profile & Settings'\n2. Select 'Beta features'\n3. Toggle on the features you\u2019d like to try\n\nFor more information on our rollout process, please check out the article [here](https://help.openai.com/en/articles/7897380-introducing-new-features-in-chatgpt). \n\n\n\nIn addition to the beta panel, users can now choose to continue generating a message beyond the maximum token limit. Each continuation counts towards the message allowance.\n\n\n\nUpdates to ChatGPT (May 3, 2023)\n--------------------------------\n\n\nWe\u2019ve made several updates to ChatGPT! Here's what's new:\n\n\n* You can now turn off chat history and export your data from the ChatGPT settings. Conversations that are started when chat history is disabled won\u2019t be used to train and improve our models, and won\u2019t appear in the history sidebar.\n* We are deprecating the Legacy (GPT-3.5) model on May 10th. Users will be able to continue their existing conversations with this model, but new messages will use the default model.\n\nIntroducing plugins in ChatGPT (March 23, 2023)\n-----------------------------------------------\n\n\nWe are announcing experimental support for AI plugins in ChatGPT \u2014 tools designed specifically for language models. Plugins can help ChatGPT access up-to-date information, run computations, or use third-party services. You can learn more about plugins [here](https://openai.com/blog/chatgpt-plugins).\n\n\n\nToday, we will begin extending plugin access to users and developers from our waitlist. The plugins we are rolling out with are:\n\n\n* Browsing: An experimental model that knows when and how to browse the internet\n* Code Interpreter: An experimental ChatGPT model that can use Python, and handles uploads and downloads\n* Third-party plugins: An experimental model that knows when and how to use external plugins.\n\nYou can join the waitlist to try plugins here:\n\n\n* [ChatGPT Plugin Waitlist](https://share.hsforms.com/16C8k9E5FR5mRLYYkwohdiQ4sk30)\n\nAnnouncing GPT-4 in ChatGPT (March 14, 2023)\n--------------------------------------------\n\n\nWe\u2019re excited to bring GPT-4, our latest model, to our ChatGPT Plus subscribers. \n\n\n\nGPT-4 has enhanced capabilities in:\n\n\n* Advanced reasoning\n* Complex instructions\n* More creativity\n\nTo give every Plus subscriber a chance to try the model, we'll dynamically adjust the cap for GPT-4 usage based on demand. You can learn more about GPT-4 [here](https://openai.com/product/gpt-4).\n\n\n\nFor this release, there are no updates to free accounts.\n\n\n\nUpdates to ChatGPT (Feb 13, 2023)\n---------------------------------\n\n\nWe\u2019ve made several updates to ChatGPT! Here's what's new:\n\n\n* We\u2019ve updated performance of the ChatGPT model on our free plan in order to serve more users.\n* Based on user feedback, we are now defaulting Plus users to a faster version of ChatGPT, formerly known as \u201cTurbo\u201d. We\u2019ll keep the previous version around for a while.\n* We rolled out the ability to purchase [ChatGPT Plus](https://openai.com/blog/chatgpt-plus/) internationally.\n\n\nIntroducing ChatGPT Plus (Feb 9 2023)\n-------------------------------------\n\n\nAs we recently announced, our Plus plan comes with early access to new, experimental features. We are beginning to roll out a way for Plus users the ability to choose between different versions of ChatGPT: \n\n\n* Default: the standard ChatGPT model\n* Turbo: optimized for speed (alpha)\n\nVersion selection is made easy with a dedicated dropdown menu at the top of the page. Depending on feedback, we may roll out this feature (or just Turbo) to all users soon.\n\n\n\nFactuality and mathematical improvements (Jan 30, 2023)\n-------------------------------------------------------\n\n\nWe\u2019ve upgraded the ChatGPT model with improved factuality and mathematical capabilities.\n\n\n\nUpdates to ChatGPT (Jan 9, 2023)\n--------------------------------\n\n\nWe're excited to announce several updates to ChatGPT! Here's what's new:\n\n\n1. We made more improvements to the ChatGPT model! It should be generally better across a wide range of topics and has improved factuality.\n2. Stop generating: Based on your feedback, we've added the ability to stop generating ChatGPT's response\n\n\nPerformance updates to ChatGPT (Dec 15, 2022)\n---------------------------------------------\n\n\nWe're excited to announce several updates to ChatGPT! Here's what's new:\n\n\n1. General performance: Among other improvements, users will notice that ChatGPT is now less likely to refuse to answer questions.\n2. Conversation history: You\u2019ll soon be able to view past conversations with ChatGPT, rename your saved conversations and delete the ones you don\u2019t want to keep. We are gradually rolling out this feature.\n3. Daily limit: To ensure a high-quality experience for all ChatGPT users, we are experimenting with a daily message cap. If you\u2019re included in this group, you\u2019ll be presented with an option to extend your access by providing feedback to ChatGPT.\n\nTo see if you\u2019re using the updated version, look for \u201cChatGPT Dec 15 Version\u201d at the bottom of the screen.\n\n", "title": "ChatGPT \u2014 Release Notes", "article_id": "6825453", "url": "https://help.openai.com/en/articles/6825453-chatgpt-release-notes"} \ No newline at end of file +{"text": "**Introducing the GPT Store and ChatGPT Team plan (Jan 10, 2024)**\n------------------------------------------------------------------\n\n\n#### Discover what\u2019s trending in the GPT Store\n\n\nThe store features a diverse range of GPTs developed by our partners and the community. Browse popular and trending GPTs on the community leaderboard, with categories like DALL\u00b7E, writing, research, programming, education, and lifestyle. \n\n\n\nExplore GPTs at chat.openai.com/gpts.\n\n\n#### Use ChatGPT alongside your team\n\n\nWe\u2019re launching a new ChatGPT plan for teams of all sizes, which provides a secure, collaborative workspace to get the most out of ChatGPT at work. \n\n\n\nChatGPT Team offers access to our advanced models like GPT-4 and DALL\u00b7E 3, and tools like Advanced Data Analysis. It additionally includes a dedicated collaborative workspace for your team and admin tools for team management. As with ChatGPT Enterprise, you own and control your business data \u2014 we do not train on your business data or conversations, and our models don\u2019t learn from your usage. More details on our data privacy practices can be found on our [privacy page](https://openai.com/enterprise-privacy) and [Trust Portal](https://trust.openai.com/).\n\n\n\nYou can learn more about the ChatGPT Team plan [here](https://openai.com/chatgpt/team).\n\n\n\n**ChatGPT with voice is available to all users (November 21, 2023)**\n--------------------------------------------------------------------\n\n\nChatGPT with voice is now available to all free users. Download the app on your phone and tap the headphones icon to start a conversation.\n\n\n\n**Introducing GPTs (November 6, 2023)**\n---------------------------------------\n\n\nYou can now create custom versions of ChatGPT that combine instructions, extra knowledge, and any combination of skills. Learn more [here](https://openai.com/blog/introducing-gpts).\n\n\n\nWe\u2019re rolling out custom versions of ChatGPT that you can create for a specific purpose\u2014called GPTs. GPTs are a new way for anyone to create a tailored version of ChatGPT to be more helpful in their daily life, at specific tasks, at work, or at home\u2014and then share that creation with others. For example, GPTs can help you [learn the rules to any board game, help teach your kids math, or design stickers](https://openai.com/chatgpt#do-more-with-gpts). \n\n\n\nPlus and Enterprise users can start creating GPTs this week. Later this month, we\u2019ll launch the GPT Store, so people can feature and make money from their GPTs. We plan to offer GPTs to more users soon.\n\n\n\n**Browsing is now out of beta (October 17, 2023)**\n--------------------------------------------------\n\n\nBrowsing, which we re-launched a few weeks ago, is moving out of beta.\n\n\n\nPlus and Enterprise users no longer need to switch the beta toggle to use browse, and are able to choose \"Browse with Bing\" from the GPT-4 model selector.\n\n\n\n**DALL\u00b7E 3 is now rolling out in beta (October 16, 2023)**\n----------------------------------------------------------\n\n\nWe\u2019ve integrated DALL\u00b7E 3 with ChatGPT, allowing it to respond to your requests with images. From a simple sentence to a detailed paragraph, ask ChatGPT what you want to see and it will translate your ideas into exceptionally accurate images.\n\n\n\nTo use DALL\u00b7E 3 on both web and mobile, choose DALL\u00b7E 3 in the selector under GPT-4. The message limit may vary based on capacity.\n\n\n\n**Browsing is rolling back out to Plus users (September 27, 2023)**\n-------------------------------------------------------------------\n\n\nBrowsing is rolling out to all Plus users. ChatGPT can now browse the internet to provide you with current and authoritative information, complete with direct links to sources. It is no longer limited to data before September 2021. \n\n\n\nTo try it out, enable Browsing in your beta features setting.\n\n\n* Click on 'Profile & Settings\u2019\n* Select 'Beta features'\n* Toggle on \u2018Browse with Bing\u2019\n\nChoose Browse with Bing in the selector under GPT-4.\n\n\n\n**New voice and image capabilities in ChatGPT (September 25, 2023)**\n--------------------------------------------------------------------\n\n\nWe are beginning to roll out new voice and image capabilities in ChatGPT. They offer a new, more intuitive type of interface by allowing you to have a voice conversation or show ChatGPT what you\u2019re talking about. Learn more [here](https://openai.com/blog/chatgpt-can-now-see-hear-and-speak).\n\n\n#### Voice (Beta) is now rolling out to Plus users on iOS and Android\n\n\nYou can now use voice to engage in a back-and-forth conversation with your assistant. Speak with it on the go, request a bedtime story, or settle a dinner table debate.\n\n\n\nTo get started with voice, head to Settings \u2192 New Features on the mobile app and opt into voice conversations. Then, tap the headphone button located in the top-right corner of the home screen and choose your preferred voice out of five different voices.\n\n\n#### Image input will be generally available to Plus users on all platforms\n\n\nYou can now show ChatGPT one or more images. Troubleshoot why your grill won\u2019t start, explore the contents of your fridge to plan a meal, or analyze a complex graph for work-related data. To focus on a specific part of the image, you can use the drawing tool in our mobile app.\n\n\n\nTo get started, tap the photo button to capture or choose an image. You can also discuss multiple images or use our drawing tool to guide your assistant.\n\n\n\n**ChatGPT language support - Alpha on web (September 11, 2023)**\n----------------------------------------------------------------\n\n\nChatGPT now supports a limited selection of languages in the interface: \n\n\n* Chinese (zh-Hans)\n* Chinese (zh-TW)\n* French (fr-FR)\n* German (de-DE)\n* Italian (it-IT)\n* Japanese (ja-JP)\n* Portuguese (pt-BR)\n* Russian (ru-RU)\n* Spanish (es-ES)\n\nIf you've configured your browser to use one of these supported languages, you'll see a banner in ChatGPT that enables you to switch your language settings. You can deactivate this option at any time through the settings menu.\n\n\n\nThis feature is in alpha, requires opting in, and currently can only be used on the web at chat.openai.com. Learn more [here](https://help.openai.com/en/articles/8357869-chatgpt-language-support-beta-web).\n\n\n\nIntroducing ChatGPT Enterprise (August 28, 2023)\n------------------------------------------------\n\n\nToday we\u2019re launching [ChatGPT Enterprise](https://openai.com/blog/introducing-chatgpt-enterprise), which offers enterprise-grade security and privacy, unlimited higher-speed GPT-4 access, longer context windows for processing longer inputs, advanced data analysis capabilities, customization options, and much more. \n\n\n\nChatGPT Enterprise also provides unlimited access to Advanced Data Analysis, previously known as [Code Interpreter](https://openai.com/blog/chatgpt-plugins).\n\n\n\n[Learn more on our website](https://openai.com/enterprise) and connect with our sales team to get started.\n\n\n\nCustom instructions are now available to users in the EU & UK (August 21, 2023)\n-------------------------------------------------------------------------------\n\n\nCustom instructions are now available to users in the European Union & United Kingdom. \n\n\n\nTo add your instructions:\n\n\n* Click on your name\n* Select \u2018Custom instructions\u2019\n\nCustom instructions are now available to free users (August 9, 2023)\n--------------------------------------------------------------------\n\n\nCustom instructions are now available to ChatGPT users on the free plan, except for in the EU & UK where we will be rolling it out soon!\n\n\n\nCustomize your interactions with ChatGPT by providing specific details and guidelines for your chats.\n\n\n\nTo add your instructions:\n\n\n* Click on your name\n* Select \u2018Custom instructions\u2019\n\nUpdates to ChatGPT (August 3, 2023)\n-----------------------------------\n\n\nWe\u2019re rolling out a bunch of small updates to improve the ChatGPT experience. Shipping over the next week:\n\n\n\n**1. Prompt examples:** A blank page can be intimidating. At the beginning of a new chat, you\u2019ll now see examples to help you get started.\n\n\n**2. Suggested replies:** Go deeper with a click. ChatGPT now suggests relevant ways to continue your conversation.\n\n\n**3. GPT-4 by default, finally:** When starting a new chat as a Plus user, ChatGPT will remember your previously selected model \u2014 no more defaulting back to GPT-3.5.\n\n\n**4. Upload multiple files:** You can now ask ChatGPT to analyze data and generate insights across multiple files. This is available with the Code Interpreter beta for all Plus users.\n\n\n**5. Stay logged in:** You\u2019ll no longer be logged out every 2 weeks! When you do need to log in, you\u2019ll be greeted with a much more welcoming page.\n\n\n**6. Keyboard shortcuts:** Work faster with shortcuts, like \u2318 (Ctrl) + Shift + ; to copy last code block. Try \u2318 (Ctrl) + / to see the complete list.\n\n\n\nIntroducing the ChatGPT app for Android (July 25, 2023)\n-------------------------------------------------------\n\n\nChatGPT for Android is now available for download in the United States, India, Bangladesh, and Brazil from the [Google Play Store](https://play.google.com/store/apps/details?id=com.openai.chatgpt).\n\n\n\nWe plan to expand the rollout to additional countries over the next week. You can track the Android rollout [here](https://help.openai.com/en/articles/7947663-chatgpt-supported-countries).\n\n\n\nCustom instructions are rolling out in beta (July 20, 2023)\n-----------------------------------------------------------\n\n\nWe\u2019re starting to roll out custom instructions, giving you more control over ChatGPT\u2019s responses. Set your preferences once, and they\u2019ll steer future conversations. You can read more about custom instructions in the blogpost [here](https://openai.com/blog/custom-instructions-for-chatgpt).\n\n\n\nCustom instructions are available to all Plus users and expanding to all users in the coming weeks.\n\n\n\nTo enable beta features:\n\n\n* Click on 'Profile & Settings\u2019\n* Select 'Beta features'\n* Toggle on 'Custom instructions'\n\nTo add your instructions:\n\n\n* Click on your name\n* Select \u2018Custom instructions\u2019\n\nThis feature is not yet available in the UK and EU.\n\n\n\nHigher message limits for GPT-4 (July 19, 2023)\n-----------------------------------------------\n\n\nWe're doubling the number of messages ChatGPT Plus customers can send with GPT-4. Rolling out over the next week, the new message limit will be 50 every 3 hours.\n\n\n\nCode interpreter is now rolling out in beta on web (July 6, 2023)\n-----------------------------------------------------------------\n\n\nWe\u2019re rolling out [code interpreter](https://openai.com/blog/chatgpt-plugins#code-interpreter) to all ChatGPT Plus users over the next week.\n\n\n\nIt lets ChatGPT run code, optionally with access to files you've uploaded. You can ask ChatGPT to analyze data, create charts, edit files, perform math, etc.\n\n\n\nWe\u2019ll be making these features accessible to Plus users on the web via the beta panel in your settings over the course of the next week.\n\n\n\nTo enable code interpreter:\n\n\n* Click on your name\n* Select beta features from your settings\n* Toggle on the beta features you\u2019d like to try\n\nBrowsing is temporarily disabled (July 3, 2023)\n-----------------------------------------------\n\n\nWe've [learned](https://help.openai.com/en/articles/8077698-how-do-i-use-chatgpt-browse-with-bing-to-search-the-web) that the browsing beta can occasionally display content in ways we don't want, e.g. if a user specifically asks for a URL's full text, it may inadvertently fulfill this request. We are temporarily disabling Browse while we fix this.\n\n\n\nBrowsing and search on mobile (June 22, 2023)\n---------------------------------------------\n\n\nWe\u2019ve made two updates to the mobile ChatGPT app:\n\n\n* Browsing: Plus users can now use Browsing to get comprehensive answers and current insights on events and information that extend beyond the model's original training data. To try it out, enable Browsing in the \u201cnew features\u201d section of your app settings. Then select GPT-4 in the model switcher and choose \u201cBrowse with Bing\u201d in the drop-down.\n* Search History Improvements: Tapping on a search result takes you directly to the respective point in the conversation.\n\n\niOS app available in more countries, shared links in alpha, Bing Plugin, disable history on iOS (May 24, 2023)\n--------------------------------------------------------------------------------------------------------------\n\n\n#### ChatGPT app for iOS in more countries\n\n\nGood news! We\u2019re expanding availability of the [ChatGPT app for iOS](https://openai.com/blog/introducing-the-chatgpt-app-for-ios) to more countries and regions. Users in 11 countries can now download the ChatGPT app in the [Apple App Store](https://apps.apple.com/app/chatgpt/id6448311069) including the United States: Albania, Croatia, France, Germany, Ireland, Jamaica, Korea, New Zealand, Nicaragua, Nigeria, and the United Kingdom.\n\n\n\nWe will continue to roll out to more countries and regions in the coming weeks. You can track the iOS app rollout [here](https://help.openai.com/en/articles/7947663-chatgpt-supported-countries).\n\n\n#### Shared Links\n\n\nWe're excited to introduce a new feature: shared links. This feature allows you to create and share your ChatGPT conversations with others. Recipients of your shared link can either view the conversation or copy it to their own chats to continue the thread. This feature is currently rolling out to a small set of testers in alpha, with plans to expand to all users (including free) in the upcoming weeks.\n\n\n\nTo share your conversations:\n\n\n1. Click on the thread you\u2019d like to share\n2. Select the \u201cShare\u201d button\n3. Click on \u201cCopy Link\u201d\n\n[Learn more](https://help.openai.com/en/articles/7925741-chatgpt-shared-links-faq).\n\n\n#### Bing Plugin\n\n\nBrowse with Bing. We\u2019ve integrated the browsing feature - currently in beta for paid users - more deeply with Bing. You can now click into queries that the model is performing. We look forward to expanding the integration soon.\n\n\n#### Disable chat history on iOS\n\n\nYou can now disable your chat history on iOS. Conversations started on your device when chat history is disabled won\u2019t be used to improve our models, won\u2019t appear in your history on your other devices, and will only be stored for 30 days. Similar to the functionality on the web, this setting does not sync across browsers or devices. [Learn more](https://help.openai.com/en/articles/7730893-data-controls-faq).\n\n\n\nWeb browsing and Plugins are now rolling out in beta (May 12, 2023)\n-------------------------------------------------------------------\n\n\nIf you are a ChatGPT Plus user, enjoy early access to experimental new features, which may change during development. We\u2019ll be making these features accessible via a new beta panel in your settings, which is rolling out to all Plus users over the course of the next week.\n\n\n\n![](https://downloads.intercomcdn.com/i/o/740734818/c7d818c221f5f023ab1a0c27/BetaPanel.png)Once the beta panel rolls out to you, you\u2019ll be able to try two new features:\n\n\n* **Web browsing**: Try a new version of ChatGPT that knows when and how to browse the internet to answer questions about recent topics and events.\n* **Plugins:** Try a new version of ChatGPT that knows when and how to use third-party plugins that you enable.\n\n\nTo use third-party plugins, follow these instructions:\n\n\n* Navigate to \n* Select \u201cPlugins\u201d from the model switcher\n* In the \u201cPlugins\u201d dropdown, click \u201cPlugin Store\u201d to install and enable new plugins\n\n\nTo enable beta features:\n\n\n1. Click on 'Profile & Settings'\n2. Select 'Beta features'\n3. Toggle on the features you\u2019d like to try\n\nFor more information on our rollout process, please check out the article [here](https://help.openai.com/en/articles/7897380-introducing-new-features-in-chatgpt). \n\n\n\nIn addition to the beta panel, users can now choose to continue generating a message beyond the maximum token limit. Each continuation counts towards the message allowance.\n\n\n\nUpdates to ChatGPT (May 3, 2023)\n--------------------------------\n\n\nWe\u2019ve made several updates to ChatGPT! Here's what's new:\n\n\n* You can now turn off chat history and export your data from the ChatGPT settings. Conversations that are started when chat history is disabled won\u2019t be used to train and improve our models, and won\u2019t appear in the history sidebar.\n* We are deprecating the Legacy (GPT-3.5) model on May 10th. Users will be able to continue their existing conversations with this model, but new messages will use the default model.\n\nIntroducing plugins in ChatGPT (March 23, 2023)\n-----------------------------------------------\n\n\nWe are announcing experimental support for AI plugins in ChatGPT \u2014 tools designed specifically for language models. Plugins can help ChatGPT access up-to-date information, run computations, or use third-party services. You can learn more about plugins [here](https://openai.com/blog/chatgpt-plugins).\n\n\n\nToday, we will begin extending plugin access to users and developers from our waitlist. The plugins we are rolling out with are:\n\n\n* Browsing: An experimental model that knows when and how to browse the internet\n* Code Interpreter: An experimental ChatGPT model that can use Python, and handles uploads and downloads\n* Third-party plugins: An experimental model that knows when and how to use external plugins.\n\nYou can join the waitlist to try plugins here:\n\n\n* [ChatGPT Plugin Waitlist](https://share.hsforms.com/16C8k9E5FR5mRLYYkwohdiQ4sk30)\n\nAnnouncing GPT-4 in ChatGPT (March 14, 2023)\n--------------------------------------------\n\n\nWe\u2019re excited to bring GPT-4, our latest model, to our ChatGPT Plus subscribers. \n\n\n\nGPT-4 has enhanced capabilities in:\n\n\n* Advanced reasoning\n* Complex instructions\n* More creativity\n\nTo give every Plus subscriber a chance to try the model, we'll dynamically adjust the cap for GPT-4 usage based on demand. You can learn more about GPT-4 [here](https://openai.com/product/gpt-4).\n\n\n\nFor this release, there are no updates to free accounts.\n\n\n\nUpdates to ChatGPT (Feb 13, 2023)\n---------------------------------\n\n\nWe\u2019ve made several updates to ChatGPT! Here's what's new:\n\n\n* We\u2019ve updated performance of the ChatGPT model on our free plan in order to serve more users.\n* Based on user feedback, we are now defaulting Plus users to a faster version of ChatGPT, formerly known as \u201cTurbo\u201d. We\u2019ll keep the previous version around for a while.\n* We rolled out the ability to purchase [ChatGPT Plus](https://openai.com/blog/chatgpt-plus/) internationally.\n\n\nIntroducing ChatGPT Plus (Feb 9 2023)\n-------------------------------------\n\n\nAs we recently announced, our Plus plan comes with early access to new, experimental features. We are beginning to roll out a way for Plus users the ability to choose between different versions of ChatGPT: \n\n\n* Default: the standard ChatGPT model\n* Turbo: optimized for speed (alpha)\n\nVersion selection is made easy with a dedicated dropdown menu at the top of the page. Depending on feedback, we may roll out this feature (or just Turbo) to all users soon.\n\n\n\nFactuality and mathematical improvements (Jan 30, 2023)\n-------------------------------------------------------\n\n\nWe\u2019ve upgraded the ChatGPT model with improved factuality and mathematical capabilities.\n\n\n\nUpdates to ChatGPT (Jan 9, 2023)\n--------------------------------\n\n\nWe're excited to announce several updates to ChatGPT! Here's what's new:\n\n\n1. We made more improvements to the ChatGPT model! It should be generally better across a wide range of topics and has improved factuality.\n2. Stop generating: Based on your feedback, we've added the ability to stop generating ChatGPT's response\n\n\nPerformance updates to ChatGPT (Dec 15, 2022)\n---------------------------------------------\n\n\nWe're excited to announce several updates to ChatGPT! Here's what's new:\n\n\n1. General performance: Among other improvements, users will notice that ChatGPT is now less likely to refuse to answer questions.\n2. Conversation history: You\u2019ll soon be able to view past conversations with ChatGPT, rename your saved conversations and delete the ones you don\u2019t want to keep. We are gradually rolling out this feature.\n3. Daily limit: To ensure a high-quality experience for all ChatGPT users, we are experimenting with a daily message cap. If you\u2019re included in this group, you\u2019ll be presented with an option to extend your access by providing feedback to ChatGPT.\n\nTo see if you\u2019re using the updated version, look for \u201cChatGPT Dec 15 Version\u201d at the bottom of the screen.\n\n", "title": "ChatGPT \u2014 Release Notes", "article_id": "6825453", "url": "https://help.openai.com/en/articles/6825453-chatgpt-release-notes"} diff --git a/examples/customer_service_streaming/data/article_6837156.json b/examples/customer_service_streaming/data/article_6837156.json index dc1e627c..8b7bff2c 100644 --- a/examples/customer_service_streaming/data/article_6837156.json +++ b/examples/customer_service_streaming/data/article_6837156.json @@ -1 +1 @@ -{"text": "For details on our data policy, please see our [Terms of Use](https://openai.com/terms/) and [Privacy Policy](https://openai.com/privacy/).\n\n", "title": "Terms of Use", "article_id": "6837156", "url": "https://help.openai.com/en/articles/6837156-terms-of-use"} \ No newline at end of file +{"text": "For details on our data policy, please see our [Terms of Use](https://openai.com/terms/) and [Privacy Policy](https://openai.com/privacy/).\n\n", "title": "Terms of Use", "article_id": "6837156", "url": "https://help.openai.com/en/articles/6837156-terms-of-use"} diff --git a/examples/customer_service_streaming/data/article_6843909.json b/examples/customer_service_streaming/data/article_6843909.json index 03863b2b..24775020 100644 --- a/examples/customer_service_streaming/data/article_6843909.json +++ b/examples/customer_service_streaming/data/article_6843909.json @@ -1 +1 @@ -{"text": "### Please read our **[rate limit documentation](https://beta.openai.com/docs/guides/rate-limits)** in its entirety.\n\n\nIf you would like to increase your rate limits, please note that you can do so by [increasing your usage tier](https://platform.openai.com/docs/guides/rate-limits/usage-tiers). You can view your current rate limits, your current usage tier, and how to raise your usage tier/limits in the [Limits section](https://platform.openai.com/account/limits) of your account settings.\n\n", "title": "Rate Limits and 429: 'Too Many Requests' Errors", "article_id": "6843909", "url": "https://help.openai.com/en/articles/6843909-rate-limits-and-429-too-many-requests-errors"} \ No newline at end of file +{"text": "### Please read our **[rate limit documentation](https://beta.openai.com/docs/guides/rate-limits)** in its entirety.\n\n\nIf you would like to increase your rate limits, please note that you can do so by [increasing your usage tier](https://platform.openai.com/docs/guides/rate-limits/usage-tiers). You can view your current rate limits, your current usage tier, and how to raise your usage tier/limits in the [Limits section](https://platform.openai.com/account/limits) of your account settings.\n\n", "title": "Rate Limits and 429: 'Too Many Requests' Errors", "article_id": "6843909", "url": "https://help.openai.com/en/articles/6843909-rate-limits-and-429-too-many-requests-errors"} diff --git a/examples/customer_service_streaming/data/article_6843914.json b/examples/customer_service_streaming/data/article_6843914.json index 96d63621..40986a68 100644 --- a/examples/customer_service_streaming/data/article_6843914.json +++ b/examples/customer_service_streaming/data/article_6843914.json @@ -1 +1 @@ -{"text": "Here's an [article](https://help.openai.com/en/articles/6783457-chatgpt-faq) answering frequently asked questions about ChatGPT.\n\n", "title": "ChatGPT general questions", "article_id": "6843914", "url": "https://help.openai.com/en/articles/6843914-chatgpt-general-questions"} \ No newline at end of file +{"text": "Here's an [article](https://help.openai.com/en/articles/6783457-chatgpt-faq) answering frequently asked questions about ChatGPT.\n\n", "title": "ChatGPT general questions", "article_id": "6843914", "url": "https://help.openai.com/en/articles/6843914-chatgpt-general-questions"} diff --git a/examples/customer_service_streaming/data/article_6882433.json b/examples/customer_service_streaming/data/article_6882433.json index c7a191a7..d5f69a88 100644 --- a/examples/customer_service_streaming/data/article_6882433.json +++ b/examples/customer_service_streaming/data/article_6882433.json @@ -1 +1 @@ -{"text": "When you get the error message:\n\n\n\n\n```\nIncorrect API key provided: API_KEY*********************************ZXY. You can find your API key at https://beta.openai.com\n```\n\n\nHere are a few simple steps you can take to resolve this issue.\n\n\n\nStep 1: Clear your browser's cache\n\n\nThe first step is to clear your browser's cache. Sometimes, your browser may hold onto an outdated version of your API key, which can cause this error message to appear. To clear your browser's cache, follow the instructions for your specific browser:\n\n\n* For Google Chrome, click on the three dots in the top-right corner of the browser and select \"History.\" Then, click on \"Clear browsing data\" and select \"Cookies and other site data\" and \"Cached images and files.\"\n* For Firefox, click on the three lines in the top-right corner of the browser and select \"Options.\" Then, click on \"Privacy & Security\" and scroll down to \"Cookies and Site Data.\" Click on \"Clear Data\" and select \"Cookies and Site Data\" and \"Cached Web Content.\"\n* For Safari, click on \"Safari\" in the top menu bar and select \"Preferences.\" Then, click on the \"Privacy\" tab and click on \"Manage Website Data.\" Select \"Remove All\" to clear your browser's cache.\n\nStep 2: Retry your request\n\n\nAfter clearing your browser's cache, try your request again. If the error message still appears, then move to the next step.\n\n\n\nStep 3: Check your API key\n\n\nCheck your API key at **[https://beta.openai.com](https://beta.openai.com/)** and verify it with the API key shown in the error message. Sometimes, the error message may include an old or incorrect API key that you no longer use. Double-check that you are using the correct API key for the request you're making.\n\n\n\nStep 4: Verify that you're not using two different API keys\n\n\nAnother possibility is that you may have accidentally used two different API keys. Make sure that you are using the same API key throughout your application or script and not switching between different keys.\n\n\n\nIf you still need help please reach out to our support team, and they will assist you with resolving the issue.\n\n\n \n\u200b\n\n\n\n", "title": "Incorrect API key provided", "article_id": "6882433", "url": "https://help.openai.com/en/articles/6882433-incorrect-api-key-provided"} \ No newline at end of file +{"text": "When you get the error message:\n\n\n\n\n```\nIncorrect API key provided: API_KEY*********************************ZXY. You can find your API key at https://beta.openai.com\n```\n\n\nHere are a few simple steps you can take to resolve this issue.\n\n\n\nStep 1: Clear your browser's cache\n\n\nThe first step is to clear your browser's cache. Sometimes, your browser may hold onto an outdated version of your API key, which can cause this error message to appear. To clear your browser's cache, follow the instructions for your specific browser:\n\n\n* For Google Chrome, click on the three dots in the top-right corner of the browser and select \"History.\" Then, click on \"Clear browsing data\" and select \"Cookies and other site data\" and \"Cached images and files.\"\n* For Firefox, click on the three lines in the top-right corner of the browser and select \"Options.\" Then, click on \"Privacy & Security\" and scroll down to \"Cookies and Site Data.\" Click on \"Clear Data\" and select \"Cookies and Site Data\" and \"Cached Web Content.\"\n* For Safari, click on \"Safari\" in the top menu bar and select \"Preferences.\" Then, click on the \"Privacy\" tab and click on \"Manage Website Data.\" Select \"Remove All\" to clear your browser's cache.\n\nStep 2: Retry your request\n\n\nAfter clearing your browser's cache, try your request again. If the error message still appears, then move to the next step.\n\n\n\nStep 3: Check your API key\n\n\nCheck your API key at **[https://beta.openai.com](https://beta.openai.com/)** and verify it with the API key shown in the error message. Sometimes, the error message may include an old or incorrect API key that you no longer use. Double-check that you are using the correct API key for the request you're making.\n\n\n\nStep 4: Verify that you're not using two different API keys\n\n\nAnother possibility is that you may have accidentally used two different API keys. Make sure that you are using the same API key throughout your application or script and not switching between different keys.\n\n\n\nIf you still need help please reach out to our support team, and they will assist you with resolving the issue.\n\n\n \n\u200b\n\n\n\n", "title": "Incorrect API key provided", "article_id": "6882433", "url": "https://help.openai.com/en/articles/6882433-incorrect-api-key-provided"} diff --git a/examples/customer_service_streaming/data/article_6891753.json b/examples/customer_service_streaming/data/article_6891753.json index 8e7b98ef..25acbeea 100644 --- a/examples/customer_service_streaming/data/article_6891753.json +++ b/examples/customer_service_streaming/data/article_6891753.json @@ -1 +1 @@ -{"text": "Every organization is bound by rate limits which determine how many requests can be sent per second. This rate limit has been hit by the request.\n\n\n\nRate limits can be quantized, meaning they are enforced over shorter periods of time (e.g. 60,000 requests/minute may be enforced as 1,000 requests/second). Sending short bursts of requests or contexts (prompts+max\\_tokens) that are too long can lead to rate limit errors, even when you are technically below the rate limit per minute.\n\n\n\n**How can I fix it?**\n\n\n* Include [exponential back-off](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_handle_rate_limits.ipynb) logic in your code. This will catch and retry failed requests.\n* For token limits\n\n\n\t+ Reduce the [max\\_tokens](https://beta.openai.com/docs/api-reference/completions/create#completions/create-max_tokens) to match the size of your completions. Usage needs are estimated from this value, so reducing it will decrease the chance that you unexpectedly receive a rate limit error. For example, if your prompt creates completions around 400 tokens, the max\\_tokens value should be around the same size.\n\t+ [Optimize your prompts](https://github.com/openai/openai-cookbook/tree/main#more-prompt-advice). You can do this by making your instructions shorter, removing extra words, and getting rid of extra examples. You might need to work on your prompt and test it after these changes to make sure it still works well. The added benefit of a shorter prompt is reduced cost to you. If you need help, let us know.\n* If none of the previous steps work and you are consistently hitting a Rate Limit Error, you can increase your rate limits by [increasing your usage tier](https://platform.openai.com/docs/guides/rate-limits/usage-tiers). You can view your current rate limits, your current usage tier, and how to raise your usage tier/limits in the [Limits section](https://platform.openai.com/account/limits) of your account settings.\n\nIf you'd like to know more, please check out our updated guidance [here](https://beta.openai.com/docs/guides/rate-limits).\n\n", "title": "Rate Limit Advice", "article_id": "6891753", "url": "https://help.openai.com/en/articles/6891753-rate-limit-advice"} \ No newline at end of file +{"text": "Every organization is bound by rate limits which determine how many requests can be sent per second. This rate limit has been hit by the request.\n\n\n\nRate limits can be quantized, meaning they are enforced over shorter periods of time (e.g. 60,000 requests/minute may be enforced as 1,000 requests/second). Sending short bursts of requests or contexts (prompts+max\\_tokens) that are too long can lead to rate limit errors, even when you are technically below the rate limit per minute.\n\n\n\n**How can I fix it?**\n\n\n* Include [exponential back-off](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_handle_rate_limits.ipynb) logic in your code. This will catch and retry failed requests.\n* For token limits\n\n\n\t+ Reduce the [max\\_tokens](https://beta.openai.com/docs/api-reference/completions/create#completions/create-max_tokens) to match the size of your completions. Usage needs are estimated from this value, so reducing it will decrease the chance that you unexpectedly receive a rate limit error. For example, if your prompt creates completions around 400 tokens, the max\\_tokens value should be around the same size.\n\t+ [Optimize your prompts](https://github.com/openai/openai-cookbook/tree/main#more-prompt-advice). You can do this by making your instructions shorter, removing extra words, and getting rid of extra examples. You might need to work on your prompt and test it after these changes to make sure it still works well. The added benefit of a shorter prompt is reduced cost to you. If you need help, let us know.\n* If none of the previous steps work and you are consistently hitting a Rate Limit Error, you can increase your rate limits by [increasing your usage tier](https://platform.openai.com/docs/guides/rate-limits/usage-tiers). You can view your current rate limits, your current usage tier, and how to raise your usage tier/limits in the [Limits section](https://platform.openai.com/account/limits) of your account settings.\n\nIf you'd like to know more, please check out our updated guidance [here](https://beta.openai.com/docs/guides/rate-limits).\n\n", "title": "Rate Limit Advice", "article_id": "6891753", "url": "https://help.openai.com/en/articles/6891753-rate-limit-advice"} diff --git a/examples/customer_service_streaming/data/article_6891767.json b/examples/customer_service_streaming/data/article_6891767.json index b0e69e98..e79a697b 100644 --- a/examples/customer_service_streaming/data/article_6891767.json +++ b/examples/customer_service_streaming/data/article_6891767.json @@ -1 +1 @@ -{"text": "This error message indicates that your authentication credentials are invalid. This could happen for several reasons, such as:\n\n\n\n- You are using a revoked API key.\n\n\n- You are using a different API key than one under the requesting organization.\n\n\n- You are using an API key that does not have the required permissions for the endpoint you are calling.\n\n\n\nTo resolve this error, please follow these steps:\n\n\n\n- Check that you are using the correct API key and organization ID in your request header. You can find your API key and organization ID in your account settings [here](https://platform.openai.com/account/api-keys).\n\n\n- If you are unsure whether your API key is valid, you can generate a new one here. Make sure to replace your old API key with the new one in your requests and follow our [best practices](https://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety).\n\n", "title": "Error Code 401 - Invalid Authentication", "article_id": "6891767", "url": "https://help.openai.com/en/articles/6891767-error-code-401-invalid-authentication"} \ No newline at end of file +{"text": "This error message indicates that your authentication credentials are invalid. This could happen for several reasons, such as:\n\n\n\n- You are using a revoked API key.\n\n\n- You are using a different API key than one under the requesting organization.\n\n\n- You are using an API key that does not have the required permissions for the endpoint you are calling.\n\n\n\nTo resolve this error, please follow these steps:\n\n\n\n- Check that you are using the correct API key and organization ID in your request header. You can find your API key and organization ID in your account settings [here](https://platform.openai.com/account/api-keys).\n\n\n- If you are unsure whether your API key is valid, you can generate a new one here. Make sure to replace your old API key with the new one in your requests and follow our [best practices](https://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety).\n\n", "title": "Error Code 401 - Invalid Authentication", "article_id": "6891767", "url": "https://help.openai.com/en/articles/6891767-error-code-401-invalid-authentication"} diff --git a/examples/customer_service_streaming/data/article_6891781.json b/examples/customer_service_streaming/data/article_6891781.json index ca9264d1..50c53871 100644 --- a/examples/customer_service_streaming/data/article_6891781.json +++ b/examples/customer_service_streaming/data/article_6891781.json @@ -1 +1 @@ -{"text": "This error message indicates that the API key you are using in your request is not correct. This could happen for several reasons, such as:\n\n\n\n- You are using a typo or an extra space in your API key.\n\n\n- You are using an API key that belongs to a different organization.\n\n\n- You are using an API key that has been deleted or deactivated\n\n\n- Your API key might be cached.\n\n\n\nTo resolve this error, please follow these steps:\n\n\n\n- Try clearing your browser's cache and cookies then try again.\n\n\n- Check that you are using the correct API key in your request header. Follow the instructions in our [Authentication](https://platform.openai.com/docs/api-reference/authentication) section to ensure your key is correctly formatted (i.e. 'Bearer ') \n\n\n- If you are unsure whether your API key is correct, you can generate a new one [here](https://platform.openai.com/account/api-keys). Make sure to replace your old API key in your codebase and follow our [best practices](https://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety).\n\n", "title": "Error Code 401 - Incorrect API key provided", "article_id": "6891781", "url": "https://help.openai.com/en/articles/6891781-error-code-401-incorrect-api-key-provided"} \ No newline at end of file +{"text": "This error message indicates that the API key you are using in your request is not correct. This could happen for several reasons, such as:\n\n\n\n- You are using a typo or an extra space in your API key.\n\n\n- You are using an API key that belongs to a different organization.\n\n\n- You are using an API key that has been deleted or deactivated\n\n\n- Your API key might be cached.\n\n\n\nTo resolve this error, please follow these steps:\n\n\n\n- Try clearing your browser's cache and cookies then try again.\n\n\n- Check that you are using the correct API key in your request header. Follow the instructions in our [Authentication](https://platform.openai.com/docs/api-reference/authentication) section to ensure your key is correctly formatted (i.e. 'Bearer ') \n\n\n- If you are unsure whether your API key is correct, you can generate a new one [here](https://platform.openai.com/account/api-keys). Make sure to replace your old API key in your codebase and follow our [best practices](https://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety).\n\n", "title": "Error Code 401 - Incorrect API key provided", "article_id": "6891781", "url": "https://help.openai.com/en/articles/6891781-error-code-401-incorrect-api-key-provided"} diff --git a/examples/customer_service_streaming/data/article_6891827.json b/examples/customer_service_streaming/data/article_6891827.json index 5ef9ba25..447e03b0 100644 --- a/examples/customer_service_streaming/data/article_6891827.json +++ b/examples/customer_service_streaming/data/article_6891827.json @@ -1 +1 @@ -{"text": "This error message indicates that your account is not part of an organization. This could happen for several reasons, such as:\n\n\n\n- You have left or been removed from your previous organization.\n\n\n- Your organization has been deleted.\n\n\n\nTo resolve this error, please follow these steps:\n\n\n\n- If you have left or been removed from your previous organization, you can either request a new organization or get invited to an existing one.\n\n\n- To request a new organization, reach out to us via help.openai.com\n\n\n- Existing organization owners can invite you to join their organization via the [Members Panel](https://beta.openai.com/account/members).\n\n", "title": "Error Code 404 - You must be a member of an organization to use the API", "article_id": "6891827", "url": "https://help.openai.com/en/articles/6891827-error-code-404-you-must-be-a-member-of-an-organization-to-use-the-api"} \ No newline at end of file +{"text": "This error message indicates that your account is not part of an organization. This could happen for several reasons, such as:\n\n\n\n- You have left or been removed from your previous organization.\n\n\n- Your organization has been deleted.\n\n\n\nTo resolve this error, please follow these steps:\n\n\n\n- If you have left or been removed from your previous organization, you can either request a new organization or get invited to an existing one.\n\n\n- To request a new organization, reach out to us via help.openai.com\n\n\n- Existing organization owners can invite you to join their organization via the [Members Panel](https://beta.openai.com/account/members).\n\n", "title": "Error Code 404 - You must be a member of an organization to use the API", "article_id": "6891827", "url": "https://help.openai.com/en/articles/6891827-error-code-404-you-must-be-a-member-of-an-organization-to-use-the-api"} diff --git a/examples/customer_service_streaming/data/article_6891829.json b/examples/customer_service_streaming/data/article_6891829.json index 157e41e5..54dd43b4 100644 --- a/examples/customer_service_streaming/data/article_6891829.json +++ b/examples/customer_service_streaming/data/article_6891829.json @@ -1 +1 @@ -{"text": "This error message indicates that you have hit your assigned rate limit for the API. This means that you have submitted too many tokens or requests in a short period of time and have exceeded the number of requests allowed. This could happen for several reasons, such as:\n\n\n\n- You are using a loop or a script that makes frequent or concurrent requests.\n\n\n- You are sharing your API key with other users or applications.\n\n\n- You are using a free plan that has a low rate limit.\n\n\n\nTo resolve this error, please follow these steps:\n\n\n\n- Pace your requests and avoid making unnecessary or redundant calls.\n\n\n- If you are using a loop or a script, make sure to implement a backoff mechanism or a retry logic that respects the rate limit and the response headers. You can read more about our rate limiting policy and best practices [here](https://help.openai.com/en/articles/6891753-rate-limit-advice).\n\n\n- If you are sharing your organization with other users, note that limits are applied per organization and not per user. It is worth checking the usage of the rest of your team as this will contribute to this limit.\n\n\n- If you are using a free or low-tier plan, consider upgrading to a pay-as-you-go plan that offers a higher rate limit.\n\n\n- If you would like to increase your rate limits, please note that you can do so by [increasing your usage tier](https://platform.openai.com/docs/guides/rate-limits/usage-tiers). You can view your current rate limits, your current usage tier, and how to raise your usage tier/limits in the [Limits section](https://platform.openai.com/account/limits) of your account settings.\n\n", "title": "Error Code 429 - Rate limit reached for requests", "article_id": "6891829", "url": "https://help.openai.com/en/articles/6891829-error-code-429-rate-limit-reached-for-requests"} \ No newline at end of file +{"text": "This error message indicates that you have hit your assigned rate limit for the API. This means that you have submitted too many tokens or requests in a short period of time and have exceeded the number of requests allowed. This could happen for several reasons, such as:\n\n\n\n- You are using a loop or a script that makes frequent or concurrent requests.\n\n\n- You are sharing your API key with other users or applications.\n\n\n- You are using a free plan that has a low rate limit.\n\n\n\nTo resolve this error, please follow these steps:\n\n\n\n- Pace your requests and avoid making unnecessary or redundant calls.\n\n\n- If you are using a loop or a script, make sure to implement a backoff mechanism or a retry logic that respects the rate limit and the response headers. You can read more about our rate limiting policy and best practices [here](https://help.openai.com/en/articles/6891753-rate-limit-advice).\n\n\n- If you are sharing your organization with other users, note that limits are applied per organization and not per user. It is worth checking the usage of the rest of your team as this will contribute to this limit.\n\n\n- If you are using a free or low-tier plan, consider upgrading to a pay-as-you-go plan that offers a higher rate limit.\n\n\n- If you would like to increase your rate limits, please note that you can do so by [increasing your usage tier](https://platform.openai.com/docs/guides/rate-limits/usage-tiers). You can view your current rate limits, your current usage tier, and how to raise your usage tier/limits in the [Limits section](https://platform.openai.com/account/limits) of your account settings.\n\n", "title": "Error Code 429 - Rate limit reached for requests", "article_id": "6891829", "url": "https://help.openai.com/en/articles/6891829-error-code-429-rate-limit-reached-for-requests"} diff --git a/examples/customer_service_streaming/data/article_6891831.json b/examples/customer_service_streaming/data/article_6891831.json index a563d1ae..c47bfe4b 100644 --- a/examples/customer_service_streaming/data/article_6891831.json +++ b/examples/customer_service_streaming/data/article_6891831.json @@ -1 +1 @@ -{"text": "This error message indicates that you have hit your maximum monthly budget for the API. This means that you have consumed all the credits or units allocated to your plan and have reached the limit of your billing cycle. This could happen for several reasons, such as:\n\n\n* You are using a high-volume or complex service that consumes a lot of credits or units per request.\n* You are using a large or diverse data set that requires a lot of requests to process.\n* Your limit is set too low for your organization\u2019s usage.\n\nTo resolve this error, please follow these steps:\n\n\n* Check your usage limit and monthly budget in your account settings [here](https://platform.openai.com/account/limits). You can see how many tokens your requests have consumed [here](https://platform.openai.com/account/usage).\n* If you are using a free plan, consider upgrading to a pay-as-you-go plan that offers a higher quota.\n* If you need a usage limit increase, you can apply for one [here](https://platform.openai.com/account/limits) under Usage Limits section. We will review your request and get back to you as soon as possible.\n", "title": "Error Code 429 - You exceeded your current quota, please check your plan and billing details.", "article_id": "6891831", "url": "https://help.openai.com/en/articles/6891831-error-code-429-you-exceeded-your-current-quota-please-check-your-plan-and-billing-details"} \ No newline at end of file +{"text": "This error message indicates that you have hit your maximum monthly budget for the API. This means that you have consumed all the credits or units allocated to your plan and have reached the limit of your billing cycle. This could happen for several reasons, such as:\n\n\n* You are using a high-volume or complex service that consumes a lot of credits or units per request.\n* You are using a large or diverse data set that requires a lot of requests to process.\n* Your limit is set too low for your organization\u2019s usage.\n\nTo resolve this error, please follow these steps:\n\n\n* Check your usage limit and monthly budget in your account settings [here](https://platform.openai.com/account/limits). You can see how many tokens your requests have consumed [here](https://platform.openai.com/account/usage).\n* If you are using a free plan, consider upgrading to a pay-as-you-go plan that offers a higher quota.\n* If you need a usage limit increase, you can apply for one [here](https://platform.openai.com/account/limits) under Usage Limits section. We will review your request and get back to you as soon as possible.\n", "title": "Error Code 429 - You exceeded your current quota, please check your plan and billing details.", "article_id": "6891831", "url": "https://help.openai.com/en/articles/6891831-error-code-429-you-exceeded-your-current-quota-please-check-your-plan-and-billing-details"} diff --git a/examples/customer_service_streaming/data/article_6891834.json b/examples/customer_service_streaming/data/article_6891834.json index 28e1e0db..00c329a7 100644 --- a/examples/customer_service_streaming/data/article_6891834.json +++ b/examples/customer_service_streaming/data/article_6891834.json @@ -1 +1 @@ -{"text": "This error message indicates that our servers are experiencing high traffic and are unable to process your request at the moment. This could happen for several reasons, such as:\n\n\n\n- There is a sudden spike or surge in demand for our services.\n\n\n- There is scheduled or unscheduled maintenance or update on our servers.\n\n\n- There is an unexpected or unavoidable outage or incident on our servers.\n\n\n\nTo resolve this error, please follow these steps:\n\n\n\n- Retry your request after a brief wait. We recommend using an exponential backoff strategy or a retry logic that respects the response headers and the rate limit. You can read more about our best practices [here](https://help.openai.com/en/articles/6891753-rate-limit-advice).\n\n\n- Check our [status page](https://status.openai.com/) for any updates or announcements regarding our services and servers. \n\n\n- If you are still getting this error after a reasonable amount of time, please contact us for further assistance. We apologize for any inconvenience and appreciate your patience and understanding.\n\n", "title": "Error Code 429 - The engine is currently overloaded. Please try again later.", "article_id": "6891834", "url": "https://help.openai.com/en/articles/6891834-error-code-429-the-engine-is-currently-overloaded-please-try-again-later"} \ No newline at end of file +{"text": "This error message indicates that our servers are experiencing high traffic and are unable to process your request at the moment. This could happen for several reasons, such as:\n\n\n\n- There is a sudden spike or surge in demand for our services.\n\n\n- There is scheduled or unscheduled maintenance or update on our servers.\n\n\n- There is an unexpected or unavoidable outage or incident on our servers.\n\n\n\nTo resolve this error, please follow these steps:\n\n\n\n- Retry your request after a brief wait. We recommend using an exponential backoff strategy or a retry logic that respects the response headers and the rate limit. You can read more about our best practices [here](https://help.openai.com/en/articles/6891753-rate-limit-advice).\n\n\n- Check our [status page](https://status.openai.com/) for any updates or announcements regarding our services and servers. \n\n\n- If you are still getting this error after a reasonable amount of time, please contact us for further assistance. We apologize for any inconvenience and appreciate your patience and understanding.\n\n", "title": "Error Code 429 - The engine is currently overloaded. Please try again later.", "article_id": "6891834", "url": "https://help.openai.com/en/articles/6891834-error-code-429-the-engine-is-currently-overloaded-please-try-again-later"} diff --git a/examples/customer_service_streaming/data/article_6891839.json b/examples/customer_service_streaming/data/article_6891839.json index 0f4575d3..02cbe0a4 100644 --- a/examples/customer_service_streaming/data/article_6891839.json +++ b/examples/customer_service_streaming/data/article_6891839.json @@ -1 +1 @@ -{"text": "This section outlines the main error codes returned by the OpenAI API, including both the cause and how to resolve the error. \n\n\n\n**Status Code Summaries**\n-------------------------\n\n\n\n\n| | |\n| --- | --- |\n| [401](https://help.openai.com/en/articles/6891767-error-code-401-invalid-authentication) | **Cause:** Invalid Authentication\n**Solution:** Ensure the correct API key and requesting organization are being used. |\n| [404 - Incorrect API key provided](https://help.openai.com/en/articles/6891781-error-code-404-incorrect-api-key-provided) | **Cause:** The requesting API key is not correct. \n**Solution:** Ensure the API key used is correct or [generate a new API key](https://beta.openai.com/account/api-keys). |\n| [404 - You must be a member of an organization to use the API](https://help.openai.com/en/articles/6891827-error-code-404-you-must-be-a-member-of-an-organization-to-use-the-api) | **Cause** Your account is not part of an organization.\n**Solution** Contact us to get added to a new organization or ask your organization manager to invite you to an organization [here](https://beta.openai.com/account/members). |\n| [429 - Rate limit reached for requests](https://help.openai.com/en/articles/6891829-error-code-429-rate-limit-reached-for-requests) | **Cause** You have hit your assigned rate limit. \n**Solution** Pace your requests. Read more [here](https://help.openai.com/en/articles/6891753-rate-limit-advice). |\n| [429 - You exceeded your current quota, please check your plan and billing details.](https://help.openai.com/en/articles/6891831-error-code-429-you-exceeded-your-current-quota-please-check-your-plan-and-billing-details) | **Cause** For customers with prepaid billing, you have consumed all [credits in your account](https://platform.openai.com/account/billing). For customers with monthly billing, you have exceeded your [monthly budget](https://platform.openai.com/account/limits).\n**Solution** Buy additional credits or [increase your limits](https://platform.openai.com/account/limits). |\n| [429 - The engine is currently overloaded. Please try again later.](https://help.openai.com/en/articles/6891834-error-code-429-the-engine-is-currently-overloaded-please-try-again-later) | **Cause:** Our servers are experiencing high traffic.\n**Solution** Please retry your requests after a brief wait. |\n| 500 - The server had an error while processing your request. | **Cause** Issue on our servers.\n**Solution** Retry your request after a brief wait and contact us if the issue persists. Read [status page](https://status.openai.com/). |\n\n", "title": "API Error Code Guidance", "article_id": "6891839", "url": "https://help.openai.com/en/articles/6891839-api-error-code-guidance"} \ No newline at end of file +{"text": "This section outlines the main error codes returned by the OpenAI API, including both the cause and how to resolve the error. \n\n\n\n**Status Code Summaries**\n-------------------------\n\n\n\n\n| | |\n| --- | --- |\n| [401](https://help.openai.com/en/articles/6891767-error-code-401-invalid-authentication) | **Cause:** Invalid Authentication\n**Solution:** Ensure the correct API key and requesting organization are being used. |\n| [404 - Incorrect API key provided](https://help.openai.com/en/articles/6891781-error-code-404-incorrect-api-key-provided) | **Cause:** The requesting API key is not correct. \n**Solution:** Ensure the API key used is correct or [generate a new API key](https://beta.openai.com/account/api-keys). |\n| [404 - You must be a member of an organization to use the API](https://help.openai.com/en/articles/6891827-error-code-404-you-must-be-a-member-of-an-organization-to-use-the-api) | **Cause** Your account is not part of an organization.\n**Solution** Contact us to get added to a new organization or ask your organization manager to invite you to an organization [here](https://beta.openai.com/account/members). |\n| [429 - Rate limit reached for requests](https://help.openai.com/en/articles/6891829-error-code-429-rate-limit-reached-for-requests) | **Cause** You have hit your assigned rate limit. \n**Solution** Pace your requests. Read more [here](https://help.openai.com/en/articles/6891753-rate-limit-advice). |\n| [429 - You exceeded your current quota, please check your plan and billing details.](https://help.openai.com/en/articles/6891831-error-code-429-you-exceeded-your-current-quota-please-check-your-plan-and-billing-details) | **Cause** For customers with prepaid billing, you have consumed all [credits in your account](https://platform.openai.com/account/billing). For customers with monthly billing, you have exceeded your [monthly budget](https://platform.openai.com/account/limits).\n**Solution** Buy additional credits or [increase your limits](https://platform.openai.com/account/limits). |\n| [429 - The engine is currently overloaded. Please try again later.](https://help.openai.com/en/articles/6891834-error-code-429-the-engine-is-currently-overloaded-please-try-again-later) | **Cause:** Our servers are experiencing high traffic.\n**Solution** Please retry your requests after a brief wait. |\n| 500 - The server had an error while processing your request. | **Cause** Issue on our servers.\n**Solution** Retry your request after a brief wait and contact us if the issue persists. Read [status page](https://status.openai.com/). |\n\n", "title": "API Error Code Guidance", "article_id": "6891839", "url": "https://help.openai.com/en/articles/6891839-api-error-code-guidance"} diff --git a/examples/customer_service_streaming/data/article_6897179.json b/examples/customer_service_streaming/data/article_6897179.json index 4a472a50..50f7627a 100644 --- a/examples/customer_service_streaming/data/article_6897179.json +++ b/examples/customer_service_streaming/data/article_6897179.json @@ -1 +1 @@ -{"text": "An APIError indicates that something went wrong on our side when processing your request. This could be due to a temporary glitch, a bug, or a system outage.\n\n\n\nWe apologize for any inconvenience and we are working hard to resolve any issues as soon as possible. You can check our status page for more information [here](https://status.openai.com/).\n\n\n\nIf you encounter an APIError, please try the following steps:\n\n\n\n- Wait a few seconds and retry your request. Sometimes, the issue may be resolved quickly and your request may succeed on the second attempt.\n\n\n- Check our [status page](https://status.openai.com/) for any ongoing incidents or maintenance that may affect our services. If there is an active incident, please follow the updates and wait until it is resolved before retrying your request.\n\n\n- If the issue persists, contact our support team and provide them with the following information:\n\n\n- The model you were using\n\n\n- The error message and code you received\n\n\n- The request data and headers you sent\n\n\n- The timestamp and timezone of your request\n\n\n- Any other relevant details that may help us diagnose the issue\n\n\n\nOur support team will investigate the issue and get back to you as soon as possible.\n\n", "title": "APIError", "article_id": "6897179", "url": "https://help.openai.com/en/articles/6897179-apierror"} \ No newline at end of file +{"text": "An APIError indicates that something went wrong on our side when processing your request. This could be due to a temporary glitch, a bug, or a system outage.\n\n\n\nWe apologize for any inconvenience and we are working hard to resolve any issues as soon as possible. You can check our status page for more information [here](https://status.openai.com/).\n\n\n\nIf you encounter an APIError, please try the following steps:\n\n\n\n- Wait a few seconds and retry your request. Sometimes, the issue may be resolved quickly and your request may succeed on the second attempt.\n\n\n- Check our [status page](https://status.openai.com/) for any ongoing incidents or maintenance that may affect our services. If there is an active incident, please follow the updates and wait until it is resolved before retrying your request.\n\n\n- If the issue persists, contact our support team and provide them with the following information:\n\n\n- The model you were using\n\n\n- The error message and code you received\n\n\n- The request data and headers you sent\n\n\n- The timestamp and timezone of your request\n\n\n- Any other relevant details that may help us diagnose the issue\n\n\n\nOur support team will investigate the issue and get back to you as soon as possible.\n\n", "title": "APIError", "article_id": "6897179", "url": "https://help.openai.com/en/articles/6897179-apierror"} diff --git a/examples/customer_service_streaming/data/article_6897186.json b/examples/customer_service_streaming/data/article_6897186.json index af879079..c8260a57 100644 --- a/examples/customer_service_streaming/data/article_6897186.json +++ b/examples/customer_service_streaming/data/article_6897186.json @@ -1 +1 @@ -{"text": "A Timeout error indicates that your request took too long to complete and our server closed the connection. This could be due to a network issue, a heavy load on our services, or a complex request that requires more processing time.\n\n\n\nIf you encounter a Timeout error, please try the following steps:\n\n\n\n- Wait a few seconds and retry your request. Sometimes, the network congestion or the load on our services may be reduced and your request may succeed on the second attempt.\n\n\n- Check your network settings and make sure you have a stable and fast internet connection. You may need to switch to a different network, use a wired connection, or reduce the number of devices or applications using your bandwidth.\n\n\n- You may also need to adjust your timeout parameter to allow more time for your request to complete.\n\n\n- If the issue persists, contact our support team and provide them with the following information:\n\n\n- The model you were using\n\n\n- The error message and code you received\n\n\n- The request data and headers you sent\n\n\n- The timestamp and timezone of your request\n\n\n- Any other relevant details that may help us diagnose the issue\n\n\n\nOur support team will investigate the issue and get back to you as soon as possible.\n\n", "title": "Timeout", "article_id": "6897186", "url": "https://help.openai.com/en/articles/6897186-timeout"} \ No newline at end of file +{"text": "A Timeout error indicates that your request took too long to complete and our server closed the connection. This could be due to a network issue, a heavy load on our services, or a complex request that requires more processing time.\n\n\n\nIf you encounter a Timeout error, please try the following steps:\n\n\n\n- Wait a few seconds and retry your request. Sometimes, the network congestion or the load on our services may be reduced and your request may succeed on the second attempt.\n\n\n- Check your network settings and make sure you have a stable and fast internet connection. You may need to switch to a different network, use a wired connection, or reduce the number of devices or applications using your bandwidth.\n\n\n- You may also need to adjust your timeout parameter to allow more time for your request to complete.\n\n\n- If the issue persists, contact our support team and provide them with the following information:\n\n\n- The model you were using\n\n\n- The error message and code you received\n\n\n- The request data and headers you sent\n\n\n- The timestamp and timezone of your request\n\n\n- Any other relevant details that may help us diagnose the issue\n\n\n\nOur support team will investigate the issue and get back to you as soon as possible.\n\n", "title": "Timeout", "article_id": "6897186", "url": "https://help.openai.com/en/articles/6897186-timeout"} diff --git a/examples/customer_service_streaming/data/article_6897191.json b/examples/customer_service_streaming/data/article_6897191.json index 8839b36d..8e6886e8 100644 --- a/examples/customer_service_streaming/data/article_6897191.json +++ b/examples/customer_service_streaming/data/article_6897191.json @@ -1 +1 @@ -{"text": "An APIConnectionError indicates that your request could not reach our servers or establish a secure connection. This could be due to a network issue, a proxy configuration, an SSL certificate, or a firewall rule.\n\n\n\nIf you encounter an APIConnectionError, please try the following steps:\n\n\n\n- Check your network settings and make sure you have a stable and fast internet connection. You may need to switch to a different network, use a wired connection, or reduce the number of devices or applications using your bandwidth.\n\n\n- Check your proxy configuration and make sure it is compatible with our services. You may need to update your proxy settings, use a different proxy, or bypass the proxy altogether.\n\n\n- Check your SSL certificates and make sure they are valid and up-to-date. You may need to install or renew your certificates, use a different certificate authority, or disable SSL verification.\n\n\n- Check your firewall rules and make sure they are not blocking or filtering our services. You may need to modify your firewall settings.\n\n\n- If the issue persists, contact our support team and provide them with the following information:\n\n\n- The model you were using\n\n\n- The error message and code you received\n\n\n- The request data and headers you sent\n\n\n- The timestamp and timezone of your request\n\n\n- Any other relevant details that may help us diagnose the issue\n\n\n\n", "title": "APIConnectionError", "article_id": "6897191", "url": "https://help.openai.com/en/articles/6897191-apiconnectionerror"} \ No newline at end of file +{"text": "An APIConnectionError indicates that your request could not reach our servers or establish a secure connection. This could be due to a network issue, a proxy configuration, an SSL certificate, or a firewall rule.\n\n\n\nIf you encounter an APIConnectionError, please try the following steps:\n\n\n\n- Check your network settings and make sure you have a stable and fast internet connection. You may need to switch to a different network, use a wired connection, or reduce the number of devices or applications using your bandwidth.\n\n\n- Check your proxy configuration and make sure it is compatible with our services. You may need to update your proxy settings, use a different proxy, or bypass the proxy altogether.\n\n\n- Check your SSL certificates and make sure they are valid and up-to-date. You may need to install or renew your certificates, use a different certificate authority, or disable SSL verification.\n\n\n- Check your firewall rules and make sure they are not blocking or filtering our services. You may need to modify your firewall settings.\n\n\n- If the issue persists, contact our support team and provide them with the following information:\n\n\n- The model you were using\n\n\n- The error message and code you received\n\n\n- The request data and headers you sent\n\n\n- The timestamp and timezone of your request\n\n\n- Any other relevant details that may help us diagnose the issue\n\n\n\n", "title": "APIConnectionError", "article_id": "6897191", "url": "https://help.openai.com/en/articles/6897191-apiconnectionerror"} diff --git a/examples/customer_service_streaming/data/article_6897194.json b/examples/customer_service_streaming/data/article_6897194.json index fcb92fe0..e1dcd95f 100644 --- a/examples/customer_service_streaming/data/article_6897194.json +++ b/examples/customer_service_streaming/data/article_6897194.json @@ -1 +1 @@ -{"text": "An InvalidRequestError indicates that your request was malformed or missing some required parameters, such as a token or an input. This could be due to a typo, a formatting error, or a logic error in your code.\n\n\n\nIf you encounter an InvalidRequestError, please try the following steps:\n\n\n\n- Read the error message carefully and identify the specific error made. The error message should advise you on what parameter was invalid or missing, and what value or format was expected.\n\n\n- Check the documentation for the specific API method you were calling and make sure you are sending valid and complete parameters. You may need to review the parameter names, types, values, and formats, and ensure they match the documentation.\n\n\n- Check the encoding, format, or size of your request data and make sure they are compatible with our services. You may need to encode your data in UTF-8, format your data in JSON, or compress your data if it is too large.\n\n\n- Test your request using a tool like Postman or curl and make sure it works as expected. You may need to debug your code and fix any errors or inconsistencies in your request logic.\n\n\n- Contact our support team and provide them with:\n\n\n- The model you were using\n\n\n- The error message and code you received\n\n\n- The request data and headers you sent\n\n\n- The timestamp and timezone of your request\n\n\n- Any other relevant details that may help us diagnose the issue \n\n\n\nOur support team will investigate the issue and get back to you as soon as possible.\n\n", "title": "InvalidRequestError", "article_id": "6897194", "url": "https://help.openai.com/en/articles/6897194-invalidrequesterror"} \ No newline at end of file +{"text": "An InvalidRequestError indicates that your request was malformed or missing some required parameters, such as a token or an input. This could be due to a typo, a formatting error, or a logic error in your code.\n\n\n\nIf you encounter an InvalidRequestError, please try the following steps:\n\n\n\n- Read the error message carefully and identify the specific error made. The error message should advise you on what parameter was invalid or missing, and what value or format was expected.\n\n\n- Check the documentation for the specific API method you were calling and make sure you are sending valid and complete parameters. You may need to review the parameter names, types, values, and formats, and ensure they match the documentation.\n\n\n- Check the encoding, format, or size of your request data and make sure they are compatible with our services. You may need to encode your data in UTF-8, format your data in JSON, or compress your data if it is too large.\n\n\n- Test your request using a tool like Postman or curl and make sure it works as expected. You may need to debug your code and fix any errors or inconsistencies in your request logic.\n\n\n- Contact our support team and provide them with:\n\n\n- The model you were using\n\n\n- The error message and code you received\n\n\n- The request data and headers you sent\n\n\n- The timestamp and timezone of your request\n\n\n- Any other relevant details that may help us diagnose the issue \n\n\n\nOur support team will investigate the issue and get back to you as soon as possible.\n\n", "title": "InvalidRequestError", "article_id": "6897194", "url": "https://help.openai.com/en/articles/6897194-invalidrequesterror"} diff --git a/examples/customer_service_streaming/data/article_6897198.json b/examples/customer_service_streaming/data/article_6897198.json index 64912fd5..3ed46d02 100644 --- a/examples/customer_service_streaming/data/article_6897198.json +++ b/examples/customer_service_streaming/data/article_6897198.json @@ -1 +1 @@ -{"text": "An AuthenticationError indicates that your API key or token was invalid, expired, or revoked. This could be due to a typo, a formatting error, or a security breach.\n\n\n\nIf you encounter an AuthenticationError, please try the following steps:\n\n\n\n- Check your API key or token and make sure it is correct and active. You may need to generate a new key from the API Key dashboard, ensure there are no extra spaces or characters, or use a different key or token if you have multiple ones.\n\n\n- Ensure that you have followed the correct [formatting](https://beta.openai.com/docs/api-reference/authentication).\n\n", "title": "AuthenticationError", "article_id": "6897198", "url": "https://help.openai.com/en/articles/6897198-authenticationerror"} \ No newline at end of file +{"text": "An AuthenticationError indicates that your API key or token was invalid, expired, or revoked. This could be due to a typo, a formatting error, or a security breach.\n\n\n\nIf you encounter an AuthenticationError, please try the following steps:\n\n\n\n- Check your API key or token and make sure it is correct and active. You may need to generate a new key from the API Key dashboard, ensure there are no extra spaces or characters, or use a different key or token if you have multiple ones.\n\n\n- Ensure that you have followed the correct [formatting](https://beta.openai.com/docs/api-reference/authentication).\n\n", "title": "AuthenticationError", "article_id": "6897198", "url": "https://help.openai.com/en/articles/6897198-authenticationerror"} diff --git a/examples/customer_service_streaming/data/article_6897199.json b/examples/customer_service_streaming/data/article_6897199.json index 5d5fd1e4..0080da19 100644 --- a/examples/customer_service_streaming/data/article_6897199.json +++ b/examples/customer_service_streaming/data/article_6897199.json @@ -1 +1 @@ -{"text": "A PermissionError indicates that your API key or token does not have the required scope or role to perform the requested action. This could be due to a misconfiguration, a limitation, or a policy change.\n\n\n\nIf you encounter a PermissionError, please contact our support team and provide them with the the following information:\n\n\n- The model you were using\n\n\n- The error message and code you received\n\n\n- The request data and headers you sent\n\n\n- The timestamp and timezone of your request\n\n\n- Any other relevant details that may help us diagnose the issue\n\n\nOur support team will investigate the issue and get back to you as soon as possible.\n\n", "title": "PermissionError", "article_id": "6897199", "url": "https://help.openai.com/en/articles/6897199-permissionerror"} \ No newline at end of file +{"text": "A PermissionError indicates that your API key or token does not have the required scope or role to perform the requested action. This could be due to a misconfiguration, a limitation, or a policy change.\n\n\n\nIf you encounter a PermissionError, please contact our support team and provide them with the the following information:\n\n\n- The model you were using\n\n\n- The error message and code you received\n\n\n- The request data and headers you sent\n\n\n- The timestamp and timezone of your request\n\n\n- Any other relevant details that may help us diagnose the issue\n\n\nOur support team will investigate the issue and get back to you as soon as possible.\n\n", "title": "PermissionError", "article_id": "6897199", "url": "https://help.openai.com/en/articles/6897199-permissionerror"} diff --git a/examples/customer_service_streaming/data/article_6897202.json b/examples/customer_service_streaming/data/article_6897202.json index 60ddb447..e77e37cf 100644 --- a/examples/customer_service_streaming/data/article_6897202.json +++ b/examples/customer_service_streaming/data/article_6897202.json @@ -1 +1 @@ -{"text": "A RateLimitError indicates that you have hit your assigned rate limit. This means that you have sent too many tokens or requests in a given period of time, and our services have temporarily blocked you from sending more.\n\n\n\nWe impose rate limits to ensure fair and efficient use of our resources and to prevent abuse or overload of our services.\n\n\n\nIf you encounter a RateLimitError, please try the following steps:\n\n\n\n- Wait until your rate limit resets (one minute) and retry your request. The error message should give you a sense of your usage rate and permitted usage. \n\n\n- Send fewer tokens or requests or slow down. You may need to reduce the frequency or volume of your requests, batch your tokens, or implement exponential backoff. You can read our rate limit guidance [here](https://help.openai.com/en/articles/6891753-rate-limit-advice).\n\n\n- You can also check your usage statistics from your account dashboard.\n\n\n", "title": "RateLimitError", "article_id": "6897202", "url": "https://help.openai.com/en/articles/6897202-ratelimiterror"} \ No newline at end of file +{"text": "A RateLimitError indicates that you have hit your assigned rate limit. This means that you have sent too many tokens or requests in a given period of time, and our services have temporarily blocked you from sending more.\n\n\n\nWe impose rate limits to ensure fair and efficient use of our resources and to prevent abuse or overload of our services.\n\n\n\nIf you encounter a RateLimitError, please try the following steps:\n\n\n\n- Wait until your rate limit resets (one minute) and retry your request. The error message should give you a sense of your usage rate and permitted usage. \n\n\n- Send fewer tokens or requests or slow down. You may need to reduce the frequency or volume of your requests, batch your tokens, or implement exponential backoff. You can read our rate limit guidance [here](https://help.openai.com/en/articles/6891753-rate-limit-advice).\n\n\n- You can also check your usage statistics from your account dashboard.\n\n\n", "title": "RateLimitError", "article_id": "6897202", "url": "https://help.openai.com/en/articles/6897202-ratelimiterror"} diff --git a/examples/customer_service_streaming/data/article_6897204.json b/examples/customer_service_streaming/data/article_6897204.json index 16c42916..2d65cd2b 100644 --- a/examples/customer_service_streaming/data/article_6897204.json +++ b/examples/customer_service_streaming/data/article_6897204.json @@ -1 +1 @@ -{"text": "A ServiceUnavailableError indicates that our servers are temporarily unable to handle your request. This could be due to a planned or unplanned maintenance, a system upgrade, or a server failure. These errors can also be returned during periods of high traffic.\n\n\n\nWe apologize for any inconvenience and we are working hard to restore our services as soon as possible.\n\n\n\nIf you encounter a ServiceUnavailableError, please try the following steps:\n\n\n\n- Wait a few minutes and retry your request. Sometimes, the issue may be resolved quickly and your request may succeed on the next attempt.\n\n\n- Check our status page for any ongoing incidents or maintenance that may affect our services. If there is an active incident, please follow the updates and wait until it is resolved before retrying your request.\n\n\n- If the issue persists, contact our support team and provide them with the following information:\n\n\n- The model you were using\n\n\n- The error message and code you received\n\n\n- The request data and headers you sent\n\n\n- The timestamp and timezone of your request\n\n\n- Any other relevant details that may help us diagnose the issue\n\n\nOur support team will investigate the issue and get back to you as soon as possible.\n\n", "title": "ServiceUnavailableError", "article_id": "6897204", "url": "https://help.openai.com/en/articles/6897204-serviceunavailableerror"} \ No newline at end of file +{"text": "A ServiceUnavailableError indicates that our servers are temporarily unable to handle your request. This could be due to a planned or unplanned maintenance, a system upgrade, or a server failure. These errors can also be returned during periods of high traffic.\n\n\n\nWe apologize for any inconvenience and we are working hard to restore our services as soon as possible.\n\n\n\nIf you encounter a ServiceUnavailableError, please try the following steps:\n\n\n\n- Wait a few minutes and retry your request. Sometimes, the issue may be resolved quickly and your request may succeed on the next attempt.\n\n\n- Check our status page for any ongoing incidents or maintenance that may affect our services. If there is an active incident, please follow the updates and wait until it is resolved before retrying your request.\n\n\n- If the issue persists, contact our support team and provide them with the following information:\n\n\n- The model you were using\n\n\n- The error message and code you received\n\n\n- The request data and headers you sent\n\n\n- The timestamp and timezone of your request\n\n\n- Any other relevant details that may help us diagnose the issue\n\n\nOur support team will investigate the issue and get back to you as soon as possible.\n\n", "title": "ServiceUnavailableError", "article_id": "6897204", "url": "https://help.openai.com/en/articles/6897204-serviceunavailableerror"} diff --git a/examples/customer_service_streaming/data/article_6897213.json b/examples/customer_service_streaming/data/article_6897213.json index a1540b5d..36083076 100644 --- a/examples/customer_service_streaming/data/article_6897213.json +++ b/examples/customer_service_streaming/data/article_6897213.json @@ -1 +1 @@ -{"text": "This article outlines the error types returned when using the OpenAI Python Library. Read a summary of the cause and solution, or click the article for more.\n\n\n\n\n| | |\n| --- | --- |\n| [APIError](https://help.openai.com/en/articles/6897179-apierror) | **Cause** Issue on our side.\n**Solution** Retry your request after a brief wait and contact us if the issue persists. |\n| [Timeout](https://help.openai.com/en/articles/6897186-timeout) | **Cause** Request timed out.\n**Solution** Retry your request after a brief wait and contact us if the issue persists. |\n| [APIConnectionError](https://help.openai.com/en/articles/6897191-apiconnectionerror) | **Cause** Issue connecting to our services.\n**Solution** Check your network settings, proxy configuration, SSL certificates, or firewall rules. |\n| [InvalidRequestError](https://help.openai.com/en/articles/6897194-invalidrequesterror) | **Cause:** Your request was malformed or missing some required parameters, such as a token or an input.\n**Solution:** The error message should advise you on the specific error made. Check the documentation for the specific API method you are calling and make sure you are sending valid and complete parameters. You may also need to check the encoding, format, or size of your request data. |\n| [AuthenticationError](https://help.openai.com/en/articles/6897198-authenticationerror) | **Cause** Your API key or token was invalid, expired, or revoked.\n**Solution:** Check your API key or token and make sure it is correct and active. You may need to generate a new one from your account dashboard. |\n| [PermissionError](https://help.openai.com/en/articles/6897199-permissionerror)\n | **Cause** Your API key or token does not have the required scope or role to perform the requested action.\n**Solution** Make sure your API key has the appropriate permissions for the action or model accessed. |\n| [RateLimitError](https://help.openai.com/en/articles/6897202-ratelimiterror)\n | **Cause** You have hit your assigned rate limit. \n**Solution** Pace your requests. Read more [here](https://help.openai.com/en/articles/6891753-rate-limit-advice). |\n| [ServiceUnavailableError](https://help.openai.com/en/articles/6897204-serviceunavailableerror) | **Cause** Issue on our servers.\n**Solution** Retry your request after a brief wait and contact us if the issue persists. |\n\nWe advise you to programmatically handle errors returned by the API. To do so, you may wish to use a code snippet like below:\n\n\n\n\n```\ntry: \n #Make your OpenAI API request here \n response = openai.Completion.create(model=\"text-davinci-003\", \n prompt=\"Hello world\") \nexcept openai.error.Timeout as e: \n #Handle timeout error, e.g. retry or log \n print(f\"OpenAI API request timed out: {e}\") \n pass \nexcept openai.error.APIError as e: \n #Handle API error, e.g. retry or log \n print(f\"OpenAI API returned an API Error: {e}\") \n pass \nexcept openai.error.APIConnectionError as e: \n #Handle connection error, e.g. check network or log \n print(f\"OpenAI API request failed to connect: {e}\") \n pass \nexcept openai.error.InvalidRequestError as e: \n #Handle invalid request error, e.g. validate parameters or log \n print(f\"OpenAI API request was invalid: {e}\") \n pass \nexcept openai.error.AuthenticationError as e: \n #Handle authentication error, e.g. check credentials or log \n print(f\"OpenAI API request was not authorized: {e}\") \n pass \nexcept openai.error.PermissionError as e: \n #Handle permission error, e.g. check scope or log \n print(f\"OpenAI API request was not permitted: {e}\") \n pass \nexcept openai.error.RateLimitError as e: \n #Handle rate limit error, e.g. wait or log \n print(f\"OpenAI API request exceeded rate limit: {e}\") \n pass\n```\n\n", "title": "OpenAI Library Error Types Guidance", "article_id": "6897213", "url": "https://help.openai.com/en/articles/6897213-openai-library-error-types-guidance"} \ No newline at end of file +{"text": "This article outlines the error types returned when using the OpenAI Python Library. Read a summary of the cause and solution, or click the article for more.\n\n\n\n\n| | |\n| --- | --- |\n| [APIError](https://help.openai.com/en/articles/6897179-apierror) | **Cause** Issue on our side.\n**Solution** Retry your request after a brief wait and contact us if the issue persists. |\n| [Timeout](https://help.openai.com/en/articles/6897186-timeout) | **Cause** Request timed out.\n**Solution** Retry your request after a brief wait and contact us if the issue persists. |\n| [APIConnectionError](https://help.openai.com/en/articles/6897191-apiconnectionerror) | **Cause** Issue connecting to our services.\n**Solution** Check your network settings, proxy configuration, SSL certificates, or firewall rules. |\n| [InvalidRequestError](https://help.openai.com/en/articles/6897194-invalidrequesterror) | **Cause:** Your request was malformed or missing some required parameters, such as a token or an input.\n**Solution:** The error message should advise you on the specific error made. Check the documentation for the specific API method you are calling and make sure you are sending valid and complete parameters. You may also need to check the encoding, format, or size of your request data. |\n| [AuthenticationError](https://help.openai.com/en/articles/6897198-authenticationerror) | **Cause** Your API key or token was invalid, expired, or revoked.\n**Solution:** Check your API key or token and make sure it is correct and active. You may need to generate a new one from your account dashboard. |\n| [PermissionError](https://help.openai.com/en/articles/6897199-permissionerror)\n | **Cause** Your API key or token does not have the required scope or role to perform the requested action.\n**Solution** Make sure your API key has the appropriate permissions for the action or model accessed. |\n| [RateLimitError](https://help.openai.com/en/articles/6897202-ratelimiterror)\n | **Cause** You have hit your assigned rate limit. \n**Solution** Pace your requests. Read more [here](https://help.openai.com/en/articles/6891753-rate-limit-advice). |\n| [ServiceUnavailableError](https://help.openai.com/en/articles/6897204-serviceunavailableerror) | **Cause** Issue on our servers.\n**Solution** Retry your request after a brief wait and contact us if the issue persists. |\n\nWe advise you to programmatically handle errors returned by the API. To do so, you may wish to use a code snippet like below:\n\n\n\n\n```\ntry: \n #Make your OpenAI API request here \n response = openai.Completion.create(model=\"text-davinci-003\", \n prompt=\"Hello world\") \nexcept openai.error.Timeout as e: \n #Handle timeout error, e.g. retry or log \n print(f\"OpenAI API request timed out: {e}\") \n pass \nexcept openai.error.APIError as e: \n #Handle API error, e.g. retry or log \n print(f\"OpenAI API returned an API Error: {e}\") \n pass \nexcept openai.error.APIConnectionError as e: \n #Handle connection error, e.g. check network or log \n print(f\"OpenAI API request failed to connect: {e}\") \n pass \nexcept openai.error.InvalidRequestError as e: \n #Handle invalid request error, e.g. validate parameters or log \n print(f\"OpenAI API request was invalid: {e}\") \n pass \nexcept openai.error.AuthenticationError as e: \n #Handle authentication error, e.g. check credentials or log \n print(f\"OpenAI API request was not authorized: {e}\") \n pass \nexcept openai.error.PermissionError as e: \n #Handle permission error, e.g. check scope or log \n print(f\"OpenAI API request was not permitted: {e}\") \n pass \nexcept openai.error.RateLimitError as e: \n #Handle rate limit error, e.g. wait or log \n print(f\"OpenAI API request exceeded rate limit: {e}\") \n pass\n```\n\n", "title": "OpenAI Library Error Types Guidance", "article_id": "6897213", "url": "https://help.openai.com/en/articles/6897213-openai-library-error-types-guidance"} diff --git a/examples/customer_service_streaming/data/article_6901266.json b/examples/customer_service_streaming/data/article_6901266.json index bece5eab..cd90fd07 100644 --- a/examples/customer_service_streaming/data/article_6901266.json +++ b/examples/customer_service_streaming/data/article_6901266.json @@ -1 +1 @@ -{"text": "The latency of a completion request is mostly influenced by two factors: the model and the number of tokens generated. Please read our updated documentation for [guidance on improving latencies.](https://beta.openai.com/docs/guides/production-best-practices/improving-latencies) \n\n", "title": "Guidance on improving latencies", "article_id": "6901266", "url": "https://help.openai.com/en/articles/6901266-guidance-on-improving-latencies"} \ No newline at end of file +{"text": "The latency of a completion request is mostly influenced by two factors: the model and the number of tokens generated. Please read our updated documentation for [guidance on improving latencies.](https://beta.openai.com/docs/guides/production-best-practices/improving-latencies) \n\n", "title": "Guidance on improving latencies", "article_id": "6901266", "url": "https://help.openai.com/en/articles/6901266-guidance-on-improving-latencies"} diff --git a/examples/customer_service_streaming/data/article_6950777.json b/examples/customer_service_streaming/data/article_6950777.json index 57406f07..c5e5fa5e 100644 --- a/examples/customer_service_streaming/data/article_6950777.json +++ b/examples/customer_service_streaming/data/article_6950777.json @@ -1 +1 @@ -{"text": "1. **What is ChatGPT Plus?**\n\n\n\t1. ChatGPT Plus is a subscription plan for ChatGPT. It offers availability even when demand is high, faster response speed, and priority access to new features.\n2. **Is the free version still available?** \n\n\n\t1. Yes, free access to ChatGPT will still be provided. By offering this subscription pricing, we will be able to help support free access availability to as many people as possible. See our [general ChatGPT article](https://help.openai.com/en/articles/6783457-chatgpt-faq) for more information on our free offering.\n3. **How can I cancel my subscription?**\n\n\n\t1. You may cancel your subscription at any time. Click \u201cMy Account\u201d in the [sidebar](https://chat.openai.com/chat). Then click \u201cManage my subscription\u201d in the pop-up window. You\u2019ll be directed to a Stripe checkout page where you can select \u201cCancel Plan\u201d. Your cancellation will take effect the day after the next billing date. You can continue using our services until then. To avoid being charged for your next billing period, cancel your subscription at least 24 hours before your next billing date. Subscription fees are non-refundable.\n4. **What is the refund policy?**\n\n\n\t1. If you live in the EU, UK, or Turkey, you\u2019re eligible for a refund if you cancel your subscription within 14 days of purchase. Please send us a message via our chat widget in the bottom right of your screen in our [Help Center](https://help.openai.com/en/), select the \"Billing\" option and select \"I need a refund\".\n5. **How can I request a VAT tax refund?**\n\n\n\t1. Please send us a message via our chat widget in the bottom right of your screen in our [Help Center](https://help.openai.com/en/), select the \"Billing\" option and then select \"VAT exemption request\". Be sure to include your billing information (name, email, and billing address) so we can process your request faster.\n6. **My account got terminated. Can I get a refund?**\n\n\n\t1. If we terminate your account for violating our Terms of Use, you still owe any unpaid fees, and will not be given a refund for any remaining credit or prepaid service.\n7. **How can I opt out my data to improve model performance?**\n\n\n\t1. Please fill out [this form](https://docs.google.com/forms/d/e/1FAIpQLScrnC-_A7JFs4LbIuzevQ_78hVERlNqqCPCt3d8XqnKOfdRdQ/viewform). Additionally, you may request your account to be [deleted](https://help.openai.com/en/articles/6378407-how-can-i-delete-my-account) at any time.\n8. **Where can I find my invoice for ChatGPT Plus?**\n\n\n\t1. Receipts for credit purchases made are sent to the email address you used when making the purchase. You may also view your invoices from the sidebar by clicking \"My Account\" and then \"Manage my subscription\".\n9. **Are alternate payment options available?**\n\n\n\t1. At this time, we only accept payment via credit card.\n10. **I want to use ChatGPT Plus with sensitive data. Who can view my conversations?**\n\n\n\t1. As part of our commitment to safe and responsible AI, we may review conversations to improve our systems and to ensure the content complies with our policies and safety requirements. For more information on how we handle data, please see our [Privacy Policy](https://openai.com/privacy/) and [Terms of Use](https://openai.com/terms/).\n11. **Is the ChatGPT API included in the ChatGPT Plus subscription?**\n\n\n\t1. No, the ChatGPT API and ChatGPT Plus subscription are billed separately. The API has its own pricing, which can be found at . The ChatGPT Plus subscription covers usage on chat.openai.com only and costs $20/month.\n12. **I am using the free subscription of ChatGPT so does that mean I can use the ChatGPT API for free too?**\n\n\n\t1. No, API usage is it's own separate cost. The ChatGPT API is not available for free. See our [Pricing](https://openai.com/pricing) page for details.\n\n", "title": "What is ChatGPT Plus?", "article_id": "6950777", "url": "https://help.openai.com/en/articles/6950777-what-is-chatgpt-plus"} \ No newline at end of file +{"text": "1. **What is ChatGPT Plus?**\n\n\n\t1. ChatGPT Plus is a subscription plan for ChatGPT. It offers availability even when demand is high, faster response speed, and priority access to new features.\n2. **Is the free version still available?** \n\n\n\t1. Yes, free access to ChatGPT will still be provided. By offering this subscription pricing, we will be able to help support free access availability to as many people as possible. See our [general ChatGPT article](https://help.openai.com/en/articles/6783457-chatgpt-faq) for more information on our free offering.\n3. **How can I cancel my subscription?**\n\n\n\t1. You may cancel your subscription at any time. Click \u201cMy Account\u201d in the [sidebar](https://chat.openai.com/chat). Then click \u201cManage my subscription\u201d in the pop-up window. You\u2019ll be directed to a Stripe checkout page where you can select \u201cCancel Plan\u201d. Your cancellation will take effect the day after the next billing date. You can continue using our services until then. To avoid being charged for your next billing period, cancel your subscription at least 24 hours before your next billing date. Subscription fees are non-refundable.\n4. **What is the refund policy?**\n\n\n\t1. If you live in the EU, UK, or Turkey, you\u2019re eligible for a refund if you cancel your subscription within 14 days of purchase. Please send us a message via our chat widget in the bottom right of your screen in our [Help Center](https://help.openai.com/en/), select the \"Billing\" option and select \"I need a refund\".\n5. **How can I request a VAT tax refund?**\n\n\n\t1. Please send us a message via our chat widget in the bottom right of your screen in our [Help Center](https://help.openai.com/en/), select the \"Billing\" option and then select \"VAT exemption request\". Be sure to include your billing information (name, email, and billing address) so we can process your request faster.\n6. **My account got terminated. Can I get a refund?**\n\n\n\t1. If we terminate your account for violating our Terms of Use, you still owe any unpaid fees, and will not be given a refund for any remaining credit or prepaid service.\n7. **How can I opt out my data to improve model performance?**\n\n\n\t1. Please fill out [this form](https://docs.google.com/forms/d/e/1FAIpQLScrnC-_A7JFs4LbIuzevQ_78hVERlNqqCPCt3d8XqnKOfdRdQ/viewform). Additionally, you may request your account to be [deleted](https://help.openai.com/en/articles/6378407-how-can-i-delete-my-account) at any time.\n8. **Where can I find my invoice for ChatGPT Plus?**\n\n\n\t1. Receipts for credit purchases made are sent to the email address you used when making the purchase. You may also view your invoices from the sidebar by clicking \"My Account\" and then \"Manage my subscription\".\n9. **Are alternate payment options available?**\n\n\n\t1. At this time, we only accept payment via credit card.\n10. **I want to use ChatGPT Plus with sensitive data. Who can view my conversations?**\n\n\n\t1. As part of our commitment to safe and responsible AI, we may review conversations to improve our systems and to ensure the content complies with our policies and safety requirements. For more information on how we handle data, please see our [Privacy Policy](https://openai.com/privacy/) and [Terms of Use](https://openai.com/terms/).\n11. **Is the ChatGPT API included in the ChatGPT Plus subscription?**\n\n\n\t1. No, the ChatGPT API and ChatGPT Plus subscription are billed separately. The API has its own pricing, which can be found at . The ChatGPT Plus subscription covers usage on chat.openai.com only and costs $20/month.\n12. **I am using the free subscription of ChatGPT so does that mean I can use the ChatGPT API for free too?**\n\n\n\t1. No, API usage is it's own separate cost. The ChatGPT API is not available for free. See our [Pricing](https://openai.com/pricing) page for details.\n\n", "title": "What is ChatGPT Plus?", "article_id": "6950777", "url": "https://help.openai.com/en/articles/6950777-what-is-chatgpt-plus"} diff --git a/examples/customer_service_streaming/main.py b/examples/customer_service_streaming/main.py index 3ec1898c..20f4dd1d 100644 --- a/examples/customer_service_streaming/main.py +++ b/examples/customer_service_streaming/main.py @@ -12,7 +12,7 @@ def main(): try: validate_all_tools(engine_name) validate_all_assistants() - except: + except BaseException: raise Exception("Validation failed") swarm = Swarm( @@ -40,10 +40,21 @@ def main(): # Use shlex to parse the task description and arguments task_args = shlex.split(task_input) task_parser = argparse.ArgumentParser() - task_parser.add_argument("description", type=str, nargs='?', default="") - task_parser.add_argument("--iterate", action="store_true", help="Set the iterate flag for the new task.") - task_parser.add_argument("--evaluate", action="store_true", help="Set the evaluate flag for the new task.") - task_parser.add_argument("--assistant", type=str, default="user_interface", help="Specify the assistant for the new task.") + task_parser.add_argument( + "description", type=str, nargs='?', default="") + task_parser.add_argument( + "--iterate", + action="store_true", + help="Set the iterate flag for the new task.") + task_parser.add_argument( + "--evaluate", + action="store_true", + help="Set the evaluate flag for the new task.") + task_parser.add_argument( + "--assistant", + type=str, + default="user_interface", + help="Specify the assistant for the new task.") # Parse task arguments task_parsed_args = task_parser.parse_args(task_args) diff --git a/examples/customer_service_streaming/prep_data.py b/examples/customer_service_streaming/prep_data.py index 466a3675..986660d9 100644 --- a/examples/customer_service_streaming/prep_data.py +++ b/examples/customer_service_streaming/prep_data.py @@ -1,3 +1,6 @@ +import pandas as pd +from qdrant_client.http import models as rest +import qdrant_client import os import json from openai import OpenAI @@ -28,16 +31,13 @@ for x in article_list: for i, x in enumerate(articles): try: - embedding = client.embeddings.create(model=EMBEDDING_MODEL,input=x['text']) + embedding = client.embeddings.create( + model=EMBEDDING_MODEL, input=x['text']) articles[i].update({"embedding": embedding.data[0].embedding}) except Exception as e: print(x['title']) print(e) -import qdrant_client -from qdrant_client.http import models as rest -import pandas as pd - qdrant = qdrant_client.QdrantClient(host='localhost') qdrant.get_collections() diff --git a/examples/customer_service_streaming/src/arg_parser.py b/examples/customer_service_streaming/src/arg_parser.py index de2d0fa6..2a690742 100644 --- a/examples/customer_service_streaming/src/arg_parser.py +++ b/examples/customer_service_streaming/src/arg_parser.py @@ -1,14 +1,38 @@ import argparse + def parse_args(): parser = argparse.ArgumentParser() - parser.add_argument("--engine", choices=["local", "assistants"], default="local", help="Choose the engine to use.") + parser.add_argument( + "--engine", + choices=[ + "local", + "assistants"], + default="local", + help="Choose the engine to use.") parser.add_argument("--test", nargs='*', help="Run the tests.") - parser.add_argument("--create-task", type=str, help="Create a new task with the given description.") - parser.add_argument("task_description", type=str, nargs="?", default="", help="Description of the task to create.") - parser.add_argument("--assistant", type=str, help="Specify the assistant for the new task.") - parser.add_argument("--evaluate", action="store_true", help="Set the evaluate flag for the new task.") - parser.add_argument("--iterate", action="store_true", help="Set the iterate flag for the new task.") + parser.add_argument( + "--create-task", + type=str, + help="Create a new task with the given description.") + parser.add_argument( + "task_description", + type=str, + nargs="?", + default="", + help="Description of the task to create.") + parser.add_argument( + "--assistant", + type=str, + help="Specify the assistant for the new task.") + parser.add_argument( + "--evaluate", + action="store_true", + help="Set the evaluate flag for the new task.") + parser.add_argument( + "--iterate", + action="store_true", + help="Set the iterate flag for the new task.") parser.add_argument("--input", action="store_true", help="If we want CLI") return parser.parse_args() diff --git a/examples/customer_service_streaming/src/evals/eval_function.py b/examples/customer_service_streaming/src/evals/eval_function.py index 1149a18c..67cfe80c 100644 --- a/examples/customer_service_streaming/src/evals/eval_function.py +++ b/examples/customer_service_streaming/src/evals/eval_function.py @@ -5,64 +5,69 @@ import re import ast from openai import OpenAI + class EvalFunction: - def __init__(self, client, plan, task): + def __init__(self, client, plan, task): self.client = client - self.eval_function = getattr(self, task.eval_function, None) + self.eval_function = getattr(self, task.eval_function, None) self.task = task self.groundtruth = task.groundtruth self.plan = plan - def default(self): - response = get_completion(self.client, [{"role": "user", "content": EVAL_GROUNDTRUTH_PROMPT.format(self.plan, self.groundtruth)}]) - if response.content.lower() == 'true': - return True - return False - - def numeric(self): - number_pattern = r'\d+' - response = self.plan['step'][-1] - # Find all occurrences of numbers in the sentence - numbers = re.findall(number_pattern, response) - print(f"Number(s) to compare: {numbers}") - try: - ground_truth = ast.literal_eval(self.groundtruth) - except: - print(f"Ground truth is not numeric: {self.groundtruth}") - return False - try: - for n in numbers: - if int(ground_truth) == int(n) or float(ground_truth) == float(n): - return True - except: - print(f"Error in comparing numbers: {numbers}") - return False + def default(self): + response = get_completion(self.client, + [{"role": "user", + "content": EVAL_GROUNDTRUTH_PROMPT.format(self.plan, + self.groundtruth)}]) + if response.content.lower() == 'true': + return True + return False - def name(self): - extract_name_prompt = "You will be provided with a sentence. Your goal is to extract the full names you see in the sentence. Return the names as an array of strings." - response = self.plan['step'][-1] - completion_result = self.client.chat.completions.create( - model="gpt-4-turbo-preview", - max_tokens=100, - temperature=0, - messages=[ - {"role": "system", - "content": extract_name_prompt - }, - {"role": "user", "content": f"SENTENCE:\n{response}"}] - ) - name_extract = completion_result.choices[0].message.content - print(f"Name extracted: {name_extract}") - try: - names = ast.literal_eval(name_extract) - ground_truth = self.groundtruth - for n in names: - if n.lower == ground_truth.lower(): - return True - except: - print(f"Issue with extracted names: {name_extract}") - return False - - def evaluate(self): - return self.eval_function() \ No newline at end of file + def numeric(self): + number_pattern = r'\d+' + response = self.plan['step'][-1] + # Find all occurrences of numbers in the sentence + numbers = re.findall(number_pattern, response) + print(f"Number(s) to compare: {numbers}") + try: + ground_truth = ast.literal_eval(self.groundtruth) + except BaseException: + print(f"Ground truth is not numeric: {self.groundtruth}") + return False + try: + for n in numbers: + if int(ground_truth) == int(n) or float( + ground_truth) == float(n): + return True + except BaseException: + print(f"Error in comparing numbers: {numbers}") + return False + + def name(self): + extract_name_prompt = "You will be provided with a sentence. Your goal is to extract the full names you see in the sentence. Return the names as an array of strings." + response = self.plan['step'][-1] + completion_result = self.client.chat.completions.create( + model="gpt-4-turbo-preview", + max_tokens=100, + temperature=0, + messages=[ + {"role": "system", + "content": extract_name_prompt + }, + {"role": "user", "content": f"SENTENCE:\n{response}"}] + ) + name_extract = completion_result.choices[0].message.content + print(f"Name extracted: {name_extract}") + try: + names = ast.literal_eval(name_extract) + ground_truth = self.groundtruth + for n in names: + if n.lower == ground_truth.lower(): + return True + except BaseException: + print(f"Issue with extracted names: {name_extract}") + return False + + def evaluate(self): + return self.eval_function() diff --git a/examples/customer_service_streaming/src/runs/run.py b/examples/customer_service_streaming/src/runs/run.py index 4594126a..1eb1c3a8 100644 --- a/examples/customer_service_streaming/src/runs/run.py +++ b/examples/customer_service_streaming/src/runs/run.py @@ -2,40 +2,44 @@ from configs.prompts import LOCAL_PLANNER_PROMPT from src.utils import get_completion import json + class Run: - def __init__(self,assistant,request,client): + def __init__(self, assistant, request, client): self.assistant = assistant self.request = request self.client = client self.status = None self.response = None - def initiate(self, planner): self.status = 'in_progress' - if planner=='sequential': + if planner == 'sequential': plan = self.generate_plan() return plan - def generate_plan(self,task=None): + def generate_plan(self, task=None): if not task: task = self.request - completion = get_completion(self.client,[{'role':'user','content':LOCAL_PLANNER_PROMPT.format(tools=self.assistant.tools,task=task)}]) + completion = get_completion( + self.client, [ + { + 'role': 'user', 'content': LOCAL_PLANNER_PROMPT.format( + tools=self.assistant.tools, task=task)}]) response_string = completion.content - #Parse out just list in case - try: # see if plan + # Parse out just list in case + try: # see if plan start_pos = response_string.find('[') end_pos = response_string.rfind(']') if start_pos != -1 and end_pos != -1 and start_pos < end_pos: - response_truncated = response_string[start_pos:end_pos+1] + response_truncated = response_string[start_pos:end_pos + 1] response_formatted = json.loads(response_truncated) return response_formatted else: try: response_formatted = json.loads(response_string) return response_formatted - except: + except BaseException: return "Response not in correct format" - except: + except BaseException: return response_string diff --git a/examples/customer_service_streaming/src/swarm/assistants.py b/examples/customer_service_streaming/src/swarm/assistants.py index 0a641d7f..763b68cd 100644 --- a/examples/customer_service_streaming/src/swarm/assistants.py +++ b/examples/customer_service_streaming/src/swarm/assistants.py @@ -16,23 +16,26 @@ class Assistant(BaseModel): sub_assistants: Optional[list] = None runs: list = [] context: Optional[dict] = {} - planner: str = 'sequential' #default to sequential - + planner: str = 'sequential' # default to sequential def initialize_history(self): self.context['history'] = [] def add_user_message(self, message): - self.context['history'].append({'task_id':self.current_task_id,'role':'user','content':message}) + self.context['history'].append( + {'task_id': self.current_task_id, 'role': 'user', 'content': message}) def add_assistant_message(self, message): - self.context['history'].append({'task_id':self.current_task_id,'role':'assistant','content':message}) + self.context['history'].append( + {'task_id': self.current_task_id, 'role': 'assistant', 'content': message}) def add_tool_message(self, message): - self.context['history'].append({'task_id':self.current_task_id,'role':'user','tool':message}) + self.context['history'].append( + {'task_id': self.current_task_id, 'role': 'user', 'tool': message}) def print_conversation(self): - print(f"\n{Colors.GREY}Conversation with Assistant: {self.name}{Colors.ENDC}\n") + print( + f"\n{Colors.GREY}Conversation with Assistant: {self.name}{Colors.ENDC}\n") # Group messages by run_id messages_by_task_id = {} @@ -47,26 +50,31 @@ class Assistant(BaseModel): print(f"{Colors.OKCYAN}Task ID: {task_id}{Colors.ENDC}") for message in messages: if 'role' in message and message['role'] == 'user': - print(f"{Colors.OKBLUE}User:{Colors.ENDC} {message['content']}") + print( + f"{Colors.OKBLUE}User:{Colors.ENDC} {message['content']}") elif 'tool' in message: tool_message = message['tool'] - tool_args = ', '.join([f"{arg}: {value}" for arg, value in tool_message['args'].items()]) - print(f"{Colors.OKGREEN}Tool:{Colors.ENDC} {tool_message['tool']}({tool_args})") + tool_args = ', '.join( + [f"{arg}: {value}" for arg, value in tool_message['args'].items()]) + print( + f"{Colors.OKGREEN}Tool:{Colors.ENDC} {tool_message['tool']}({tool_args})") elif 'role' in message and message['role'] == 'assistant': - print(f"{Colors.HEADER}Assistant:{Colors.ENDC} {message['content']}") + print( + f"{Colors.HEADER}Assistant:{Colors.ENDC} {message['content']}") print("\n") def evaluate(self, client, task, plan_log): '''Evaluates the assistant's performance on a task''' - output = get_completion(client, [{'role': 'user', 'content': EVALUATE_TASK_PROMPT.format(task.description, plan_log)}]) - output.content = output.content.replace("'",'"') + output = get_completion(client, [ + {'role': 'user', 'content': EVALUATE_TASK_PROMPT.format(task.description, plan_log)}]) + output.content = output.content.replace("'", '"') try: return json.loads(output.content) except json.JSONDecodeError: print("An error occurred while decoding the JSON.") return None - def save_conversation(self,test=False): + def save_conversation(self, test=False): timestamp = time.strftime("%Y%m%d-%H%M%S") if not test: filename = f'logs/session_{timestamp}.json' @@ -76,6 +84,6 @@ class Assistant(BaseModel): with open(filename, 'w') as file: json.dump(self.context['history'], file) - def pass_context(self,assistant): + def pass_context(self, assistant): '''Passes the context of the conversation to the assistant''' assistant.context['history'] = self.context['history'] diff --git a/examples/customer_service_streaming/src/swarm/engines/assistants_engine.py b/examples/customer_service_streaming/src/swarm/engines/assistants_engine.py index 92678448..5f84f630 100644 --- a/examples/customer_service_streaming/src/swarm/engines/assistants_engine.py +++ b/examples/customer_service_streaming/src/swarm/engines/assistants_engine.py @@ -11,13 +11,12 @@ import importlib class AssistantsEngine: - def __init__(self,client,tasks): + def __init__(self, client, tasks): self.client = client self.assistants = [] self.tasks = tasks self.thread = self.initialize_thread() - def initialize_thread(self): # Create a Thread for the user's conversation thread = self.client.beta.threads.create() @@ -40,58 +39,70 @@ class AssistantsEngine: if os.path.isdir(tool_dir_path): tool_json_path = os.path.join(tool_dir_path, 'tool.json') if os.path.isfile(tool_json_path): - with open(tool_json_path, 'r') as file: - # Assuming the JSON file contains a list of tool definitions + with open(tool_json_path) as file: + # Assuming the JSON file contains a list of tool + # definitions tool_def = json.load(file) - tool_defs[tool_def['function']['name']] = tool_def['function'] + tool_defs[tool_def['function'] + ['name']] = tool_def['function'] # Load assistants and their tools for assistant_dir in os.listdir(base_path): if '__pycache__' in assistant_dir: continue - assistant_config_path = os.path.join(base_path, assistant_dir, "assistant.json") + assistant_config_path = os.path.join( + base_path, assistant_dir, "assistant.json") if os.path.exists(assistant_config_path): - with open(assistant_config_path, "r") as file: + with open(assistant_config_path) as file: assistant_config = json.load(file)[0] - assistant_name = assistant_config.get('name', assistant_dir) + assistant_name = assistant_config.get( + 'name', assistant_dir) log_flag = assistant_config.pop('log_flag', False) # List of tool names from the assistant's config assistant_tools_names = assistant_config.get('tools', []) # Build the list of tool definitions for this assistant - assistant_tools = [tool_defs[name] for name in assistant_tools_names if name in tool_defs] + assistant_tools = [ + tool_defs[name] for name in assistant_tools_names if name in tool_defs] # Create or update the assistant instance existing_assistants = self.client.beta.assistants.list() - loaded_assistant = next((a for a in existing_assistants if a.name == assistant_name), None) + loaded_assistant = next( + (a for a in existing_assistants if a.name == assistant_name), None) if loaded_assistant: - assistant_tools = [{'type': 'function', 'function': tool_defs[name]} for name in assistant_tools_names if name in tool_defs] + assistant_tools = [{'type': 'function', 'function': tool_defs[name]} + for name in assistant_tools_names if name in tool_defs] assistant_config['tools'] = assistant_tools - assistant_config['name']=assistant_name + assistant_config['name'] = assistant_name - loaded_assistant = self.client.beta.assistants.create(**assistant_config) + loaded_assistant = self.client.beta.assistants.create( + **assistant_config) print(f"Assistant '{assistant_name}' created.\n") - asst_object = Assistant(name=assistant_name, log_flag=log_flag, instance=loaded_assistant, tools=assistant_tools) + asst_object = Assistant( + name=assistant_name, + log_flag=log_flag, + instance=loaded_assistant, + tools=assistant_tools) self.assistants.append(asst_object) - def initialize_and_display_assistants(self): - """ - Loads all assistants and displays their information. - """ - self.load_all_assistants() - - for asst in self.assistants: - print(f'\n{Colors.HEADER}Initializing assistant:{Colors.ENDC}') - print(f'{Colors.OKBLUE}Assistant name:{Colors.ENDC} {Colors.BOLD}{asst.name}{Colors.ENDC}') - if asst.instance and hasattr(asst.instance, 'tools'): - print(f'{Colors.OKGREEN}Tools:{Colors.ENDC} {asst.instance.tools} \n') - else: - print(f"{Colors.OKGREEN}Tools:{Colors.ENDC} Not available \n") + """ + Loads all assistants and displays their information. + """ + self.load_all_assistants() + for asst in self.assistants: + print(f'\n{Colors.HEADER}Initializing assistant:{Colors.ENDC}') + print( + f'{Colors.OKBLUE}Assistant name:{Colors.ENDC} {Colors.BOLD}{asst.name}{Colors.ENDC}') + if asst.instance and hasattr(asst.instance, 'tools'): + print( + f'{Colors.OKGREEN}Tools:{Colors.ENDC} {asst.instance.tools} \n') + else: + print(f"{Colors.OKGREEN}Tools:{Colors.ENDC} Not available \n") def get_assistant(self, assistant_name): @@ -105,22 +116,22 @@ class AssistantsEngine: """ Analyze the user message and delegate it to the appropriate assistant. """ - #determine the appropriate assistant for the message + # determine the appropriate assistant for the message assistant_name = self.determine_appropriate_assistant(message) assistant = self.get_assistant(assistant_name) if assistant: print( - f"{Colors.OKGREEN}\nSelected Assistant:{Colors.ENDC} {Colors.BOLD}{assistant.name}{Colors.ENDC}" + f"{Colors.OKGREEN}\nSelected Assistant:{Colors.ENDC} {Colors.BOLD}{assistant.name}{Colors.ENDC}" ) - assistant.add_assistant_message('Selected Assistant: '+assistant.name) + assistant.add_assistant_message( + 'Selected Assistant: ' + assistant.name) return assistant - #else + # else if not test_mode: print('No assistant found') return None - def determine_appropriate_assistant(self, message): triage_message = [{"role": "system", "content": TRIAGE_SYSTEM_PROMPT}] triage_message.append( @@ -132,8 +143,7 @@ class AssistantsEngine: response = get_completion(self.client, triage_message) return response.content - - def run_request(self, request, assistant,test_mode): + def run_request(self, request, assistant, test_mode): """ Run the request with the selected assistant and monitor its status. """ @@ -166,7 +176,7 @@ class AssistantsEngine: self.handle_tool_call(tool_call, run) # Re-submitting the tool outputs and continue the loop - elif run.status in ["completed","expired", "cancelling", "cancelled", "failed"]: + elif run.status in ["completed", "expired", "cancelling", "cancelled", "failed"]: if not test_mode: print(f'\nrun {run.status}') break @@ -174,18 +184,20 @@ class AssistantsEngine: if assistant.log_flag: self.store_messages() # Retrieve and return the response (only if completed) - messages = self.client.beta.threads.messages.list(thread_id=self.thread.id) - assistant_response = next((msg for msg in messages.data if msg.role == 'assistant' and msg.content), None) - + messages = self.client.beta.threads.messages.list( + thread_id=self.thread.id) + assistant_response = next( + (msg for msg in messages.data if msg.role == 'assistant' and msg.content), None) if assistant_response: assistant_response_text = assistant_response.content[0].text.value if not test_mode: - print(f"{Colors.RED}Response:{Colors.ENDC} {assistant_response_text}", "\n") + print( + f"{Colors.RED}Response:{Colors.ENDC} {assistant_response_text}", + "\n") return assistant_response_text return "No response from the assistant." - def handle_tool_call(self, tool_call, run): tool_name = tool_call.function.name tool_dir = os.path.join(os.getcwd(), 'tools', tool_name) @@ -193,10 +205,11 @@ class AssistantsEngine: # Dynamically import the handler function from the handler.py file if os.path.isfile(handler_path): - spec = importlib.util.spec_from_file_location(f"{tool_name}_handler", handler_path) + spec = importlib.util.spec_from_file_location( + f"{tool_name}_handler", handler_path) tool_module = importlib.util.module_from_spec(spec) spec.loader.exec_module(tool_module) - tool_handler = getattr(tool_module, tool_name+ '_assistants') + tool_handler = getattr(tool_module, tool_name + '_assistants') # Prepare the arguments for the handler function handler_args = {'tool_id': tool_call.id} @@ -226,7 +239,8 @@ class AssistantsEngine: def store_messages(self, filename="threads/thread_data.json"): - thread = self.client.beta.threads.messages.list(thread_id=self.thread.id) + thread = self.client.beta.threads.messages.list( + thread_id=self.thread.id) # Extract the required fields from each message in the thread messages = [] for message in thread.data: @@ -245,13 +259,12 @@ class AssistantsEngine: 'content': content_value }) try: - with open(filename, 'r') as file: + with open(filename) as file: existing_threads = json.load(file) - except: + except BaseException: existing_threads = [] - # Convert the OpenAI object to a serializable format (e.g., a dictionary) # Append new threads existing_threads.append(messages) @@ -262,47 +275,47 @@ class AssistantsEngine: except Exception as e: print(f"Error while saving to file: {e}") + def run_task(self, task, test_mode): + """ + Processes a given task. If the assistant is set to 'auto', it determines the appropriate + assistant using triage_request. Otherwise, it uses the specified assistant. + """ + if not test_mode: + print( + f"{Colors.OKCYAN}User Query:{Colors.ENDC} {Colors.BOLD}{task.description}{Colors.ENDC}" + ) + else: + print( + f"{Colors.OKCYAN}Test:{Colors.ENDC} {Colors.BOLD}{task.description}{Colors.ENDC}" + ) - def run_task(self, task,test_mode): - """ - Processes a given task. If the assistant is set to 'auto', it determines the appropriate - assistant using triage_request. Otherwise, it uses the specified assistant. - """ + if task.assistant == 'auto': + # Triage the request to determine the appropriate assistant + assistant = self.triage_request(task.description, test_mode) + else: + # Fetch the specified assistant + assistant = self.get_assistant(task.assistant) + print( + f"{Colors.OKGREEN}\nSelected Assistant:{Colors.ENDC} {Colors.BOLD}{assistant.name}{Colors.ENDC}" + ) + + if test_mode: + task.assistant = assistant.name if assistant else "None" + if not assistant: if not test_mode: print( - f"{Colors.OKCYAN}User Query:{Colors.ENDC} {Colors.BOLD}{task.description}{Colors.ENDC}" - ) - else: - print( - f"{Colors.OKCYAN}Test:{Colors.ENDC} {Colors.BOLD}{task.description}{Colors.ENDC}" - ) + f"No suitable assistant found for the task: {task.description}") + return None - if task.assistant == 'auto': - # Triage the request to determine the appropriate assistant - assistant = self.triage_request(task.description,test_mode) - else: - # Fetch the specified assistant - assistant = self.get_assistant(task.assistant) - print( - f"{Colors.OKGREEN}\nSelected Assistant:{Colors.ENDC} {Colors.BOLD}{assistant.name}{Colors.ENDC}" - ) + # Run the request with the determined or specified assistant + self.reset_thread() + return self.run_request(task.description, assistant, test_mode) - if test_mode: - task.assistant = assistant.name if assistant else "None" - if not assistant: - if not test_mode: - print(f"No suitable assistant found for the task: {task.description}") - return None - - # Run the request with the determined or specified assistant - self.reset_thread() - return self.run_request(task.description, assistant,test_mode) - - def deploy(self, client,test_mode=False,test_file_path=None): + def deploy(self, client, test_mode=False, test_file_path=None): """ Processes all tasks in the order they are listed in self.tasks. """ - #Initialize swarm first + # Initialize swarm first self.client = client if test_mode and test_file_path: print("\nTesting the swarm\n\n") @@ -315,20 +328,21 @@ class AssistantsEngine: groundtruth_tests = 0 assistant_tests = 0 for task in self.tasks: - output = self.run_task(task,test_mode) + output = self.run_task(task, test_mode) if test_mode and hasattr(task, 'groundtruth'): total_tests += 1 - response = get_completion(self.client,[{"role":"user","content":EVALUATE_TASK_PROMPT.format(output,task.groundtruth)}]) + response = get_completion(self.client, [ + {"role": "user", "content": EVALUATE_TASK_PROMPT.format(output, task.groundtruth)}]) - if response.content=='True': + if response.content == 'True': groundtruth_tests += 1 print(f"{Colors.OKGREEN}✔ Groundtruth test passed for: {Colors.ENDC}{task.description}{Colors.OKBLUE}. Expected: {Colors.ENDC}{task.groundtruth}{Colors.OKBLUE}, Got: {Colors.ENDC}{output}{Colors.ENDC}") else: print(f"{Colors.RED}✘ Test failed for: {Colors.ENDC}{task.description}{Colors.OKBLUE}. Expected: {Colors.ENDC}{task.groundtruth}{Colors.OKBLUE}, Got: {Colors.ENDC}{output}{Colors.ENDC}") - if task.assistant==task.expected_assistant: + if task.assistant == task.expected_assistant: print(f"{Colors.OKGREEN}✔ Correct assistant assigned for: {Colors.ENDC}{task.description}{Colors.OKBLUE}. Expected: {Colors.ENDC}{task.expected_assistant}{Colors.OKBLUE}, Got: {Colors.ENDC}{task.assistant}{Colors.ENDC}\n") assistant_tests += 1 else: @@ -341,15 +355,14 @@ class AssistantsEngine: else: print("🍯🐝🍯 Swarm operations complete 🍯🐝🍯\n\n") - - def load_test_tasks(self, test_file_path): self.tasks = [] # Clear any existing tasks - with open(test_file_path, 'r') as file: + with open(test_file_path) as file: for line in file: test_case = json.loads(line) task = EvaluationTask(description=test_case['text'], - assistant=test_case.get('assistant', 'auto'), - groundtruth=test_case['groundtruth'], - expected_assistant=test_case['expected_assistant']) + assistant=test_case.get( + 'assistant', 'auto'), + groundtruth=test_case['groundtruth'], + expected_assistant=test_case['expected_assistant']) self.tasks.append(task) diff --git a/examples/customer_service_streaming/src/swarm/engines/engine.py b/examples/customer_service_streaming/src/swarm/engines/engine.py index 4d5ab015..da6b23a6 100644 --- a/examples/customer_service_streaming/src/swarm/engines/engine.py +++ b/examples/customer_service_streaming/src/swarm/engines/engine.py @@ -1,4 +1,4 @@ # engine.py class Engine: - def __init__(self, tasks,engine): - self.engine = engine + def __init__(self, tasks, engine): + self.engine = engine diff --git a/examples/customer_service_streaming/src/swarm/engines/local_engine.py b/examples/customer_service_streaming/src/swarm/engines/local_engine.py index aa2fc99e..e9c4ca48 100644 --- a/examples/customer_service_streaming/src/swarm/engines/local_engine.py +++ b/examples/customer_service_streaming/src/swarm/engines/local_engine.py @@ -10,7 +10,6 @@ from src.tasks.task import EvaluationTask from src.runs.run import Run - class LocalEngine: def __init__(self, client, tasks, persist=False): self.client = client @@ -30,57 +29,77 @@ class LocalEngine: if os.path.isdir(dir_path): for tool_name in os.listdir(dir_path): if tool_name.endswith('.json'): - with open(os.path.join(dir_path, tool_name), 'r') as file: + with open(os.path.join(dir_path, tool_name)) as file: try: tool_def = json.load(file) - tool = Tool(type=tool_def['type'], function=tool_def['function'], human_input=tool_def.get('human_input', False)) + tool = Tool( + type=tool_def['type'], + function=tool_def['function'], + human_input=tool_def.get( + 'human_input', + False)) self.tool_functions.append(tool) except json.JSONDecodeError as e: - print(f"Error decoding JSON for tool {tool_name}: {e}") + print( + f"Error decoding JSON for tool {tool_name}: {e}") def load_all_assistants(self): base_path = 'configs/assistants' self.load_tools() - tool_defs = {tool.function.name: tool.function.dict() for tool in self.tool_functions} + tool_defs = {tool.function.name: tool.function.dict() + for tool in self.tool_functions} for assistant_dir in os.listdir(base_path): if '__pycache__' in assistant_dir: continue - assistant_config_path = os.path.join(base_path, assistant_dir, "assistant.json") + assistant_config_path = os.path.join( + base_path, assistant_dir, "assistant.json") if os.path.exists(assistant_config_path): try: - with open(assistant_config_path, "r") as file: + with open(assistant_config_path) as file: assistant_config = json.load(file)[0] - assistant_tools_names = assistant_config.get('tools', []) - assistant_name = assistant_config.get('name', assistant_dir) - assistant_tools = [tool for tool in self.tool_functions if tool.function.name in assistant_tools_names] + assistant_tools_names = assistant_config.get( + 'tools', []) + assistant_name = assistant_config.get( + 'name', assistant_dir) + assistant_tools = [ + tool for tool in self.tool_functions if tool.function.name in assistant_tools_names] log_flag = assistant_config.pop('log_flag', False) - sub_assistants = assistant_config.get('assistants', None) - planner = assistant_config.get('planner', 'sequential') #default is sequential + sub_assistants = assistant_config.get( + 'assistants', None) + planner = assistant_config.get( + 'planner', 'sequential') # default is sequential print(f"Assistant '{assistant_name}' created.\n") - asst_object = Assistant(name=assistant_name, log_flag=log_flag, instance=None, tools=assistant_tools, sub_assistants=sub_assistants, planner=planner) + asst_object = Assistant( + name=assistant_name, + log_flag=log_flag, + instance=None, + tools=assistant_tools, + sub_assistants=sub_assistants, + planner=planner) asst_object.initialize_history() self.assistants.append(asst_object) - except (IOError, json.JSONDecodeError) as e: - print(f"Error loading assistant configuration from {assistant_config_path}: {e}") - + except (OSError, json.JSONDecodeError) as e: + print( + f"Error loading assistant configuration from {assistant_config_path}: {e}") def initialize_and_display_assistants(self): - """ - Loads all assistants and displays their information. - """ - self.load_all_assistants() - self.initialize_global_history() - - for asst in self.assistants: - print(f'\n{Colors.HEADER}Initializing assistant:{Colors.ENDC}') - print(f'{Colors.OKBLUE}Assistant name:{Colors.ENDC} {Colors.BOLD}{asst.name}{Colors.ENDC}') - if asst.tools: - print(f'{Colors.OKGREEN}Tools:{Colors.ENDC} {[tool.function.name for tool in asst.tools]} \n') - else: - print(f"{Colors.OKGREEN}Tools:{Colors.ENDC} No tools \n") + """ + Loads all assistants and displays their information. + """ + self.load_all_assistants() + self.initialize_global_history() + for asst in self.assistants: + print(f'\n{Colors.HEADER}Initializing assistant:{Colors.ENDC}') + print( + f'{Colors.OKBLUE}Assistant name:{Colors.ENDC} {Colors.BOLD}{asst.name}{Colors.ENDC}') + if asst.tools: + print( + f'{Colors.OKGREEN}Tools:{Colors.ENDC} {[tool.function.name for tool in asst.tools]} \n') + else: + print(f"{Colors.OKGREEN}Tools:{Colors.ENDC} No tools \n") def get_assistant(self, assistant_name): @@ -98,7 +117,8 @@ class LocalEngine: # Determine the appropriate assistant for the message if assistant.sub_assistants is not None: - assistant_name = self.determine_appropriate_assistant(assistant, message) + assistant_name = self.determine_appropriate_assistant( + assistant, message) if not assistant_name: print('No appropriate assistant determined') return None @@ -109,24 +129,24 @@ class LocalEngine: return None assistant.pass_context(assistant_new) - # Pass along context: if the assistant is a sub-assistant, pass along the context of the parent assistant + # Pass along context: if the assistant is a sub-assistant, pass + # along the context of the parent assistant else: assistant_new = assistant - # If it's a new assistant, so a sub assistant if assistant_name and assistant_name != assistant.name: print( f"{Colors.OKGREEN}Selecting sub-assistant:{Colors.ENDC} {Colors.BOLD}{assistant_new.name}{Colors.ENDC}" ) - assistant.add_assistant_message(f"Selecting sub-assistant: {assistant_new.name}") + assistant.add_assistant_message( + f"Selecting sub-assistant: {assistant_new.name}") else: print( f"{Colors.OKGREEN}Assistant:{Colors.ENDC} {Colors.BOLD}{assistant_new.name}{Colors.ENDC}" ) return assistant_new - def determine_appropriate_assistant(self, assistant, message): triage_message = [{"role": "system", "content": TRIAGE_SYSTEM_PROMPT}] triage_message.append( @@ -134,24 +154,23 @@ class LocalEngine: "role": "user", "content": TRIAGE_MESSAGE_PROMPT.format( message, - [(asst.name, asst.tools) for asst in [assistant] + [asst for asst in self.assistants if asst.name in assistant.sub_assistants]] ), + [(asst.name, asst.tools) for asst in [assistant] + [asst for asst in self.assistants if asst.name in assistant.sub_assistants]]), } ) response = get_completion(self.client, triage_message) return response.content - def initiate_run(self, task, assistant,test_mode): + def initiate_run(self, task, assistant, test_mode): """ Run the request with the selected assistant and monitor its status. """ run = Run(assistant, task.description, self.client) - #Update assistant with current task and run + # Update assistant with current task and run assistant.current_task_id = task.id assistant.runs.append(run) - - #Get planner + # Get planner planner = assistant.planner plan = run.initiate(planner) plan_log = {'step': [], 'step_output': []} @@ -161,69 +180,82 @@ class LocalEngine: assistant.add_assistant_message(f"Response to user: {plan}") print(f"{Colors.HEADER}Response:{Colors.ENDC} {plan}") - #add global context + # add global context self.store_context_globally(assistant) return plan_log, plan_log original_plan = plan.copy() iterations = 0 - while plan and iterations< max_iterations: - if isinstance(plan,list): - step = plan.pop(0) + while plan and iterations < max_iterations: + if isinstance(plan, list): + step = plan.pop(0) else: return "Error generating plan", "Error generating plan" assistant.add_tool_message(step) - human_input_flag = next((tool.human_input for tool in assistant.tools if tool.function.name == step['tool']), False) + human_input_flag = next( + (tool.human_input for tool in assistant.tools if tool.function.name == + step['tool']), + False) if step['tool']: - print(f"{Colors.HEADER}Running Tool:{Colors.ENDC} {step['tool']}") + print( + f"{Colors.HEADER}Running Tool:{Colors.ENDC} {step['tool']}") if human_input_flag: - print(f"\n{Colors.HEADER}Tool {step['tool']} requires human input:{Colors.HEADER}") - print(f"{Colors.GREY}Tool arguments:{Colors.ENDC} {step['args']}\n") + print( + f"\n{Colors.HEADER}Tool {step['tool']} requires human input:{Colors.HEADER}") + print( + f"{Colors.GREY}Tool arguments:{Colors.ENDC} {step['args']}\n") - user_confirmation = input(f"Type 'yes' to execute tool, anything else to skip: ") + user_confirmation = input( + f"Type 'yes' to execute tool, anything else to skip: ") if user_confirmation.lower() != 'yes': - assistant.add_assistant_message(f"Tool {step['tool']} execution skipped by user.") - print(f"{Colors.GREY}Skipping tool execution.{Colors.ENDC}") + assistant.add_assistant_message( + f"Tool {step['tool']} execution skipped by user.") + print( + f"{Colors.GREY}Skipping tool execution.{Colors.ENDC}") plan_log['step'].append('tool_skipped') - plan_log['step_output'].append(f'Tool {step["tool"]} execution skipped by user! Task not completed.') + plan_log['step_output'].append( + f'Tool {step["tool"]} execution skipped by user! Task not completed.') continue - assistant.add_assistant_message(f"Tool {step['tool']} execution approved by user.") + assistant.add_assistant_message( + f"Tool {step['tool']} execution approved by user.") tool_output = self.handle_tool_call(assistant, step, test_mode) plan_log['step'].append(step) plan_log['step_output'].append(tool_output) if task.iterate and not is_dict_empty(plan_log) and plan: - iterations += 1 - new_task = ITERATE_PROMPT.format(task.description, original_plan, plan_log) - plan = run.generate_plan(new_task) + iterations += 1 + new_task = ITERATE_PROMPT.format( + task.description, original_plan, plan_log) + plan = run.generate_plan(new_task) # Store the output for the next iteration self.store_context_globally(assistant) return original_plan, plan_log - def handle_tool_call(self,assistant, tool_call, test_mode=False): + def handle_tool_call(self, assistant, tool_call, test_mode=False): tool_name = tool_call['tool'] tool_dir = os.path.join(os.getcwd(), 'configs/tools', tool_name) handler_path = os.path.join(tool_dir, 'handler.py') # Dynamically import the handler function from the handler.py file if os.path.isfile(handler_path): - spec = importlib.util.spec_from_file_location(f"{tool_name}_handler", handler_path) + spec = importlib.util.spec_from_file_location( + f"{tool_name}_handler", handler_path) tool_module = importlib.util.module_from_spec(spec) spec.loader.exec_module(tool_module) tool_handler = getattr(tool_module, tool_name) # Call the handler function with arguments try: tool_response = tool_handler(**tool_call['args']) - except: + except BaseException: return 'Failed to execute tool' try: # assistant.add_assistant_message(tool_response.content) return tool_response.content - except: + except BaseException: # assistant.add_assistant_message(tool_response) return tool_response @@ -231,62 +263,64 @@ class LocalEngine: return 'No tool file found' def run_task(self, task, test_mode): - """ - Processes a given task. - """ + """ + Processes a given task. + """ + if not test_mode: + print( + f"{Colors.OKCYAN}User Query:{Colors.ENDC} {Colors.BOLD}{task.description}{Colors.ENDC}" + ) + else: + print( + f"{Colors.OKCYAN}Test:{Colors.ENDC} {Colors.BOLD}{task.description}{Colors.ENDC}" + ) + # Maintain assistant if persist flag is true + if self.persist and self.last_assistant is not None: + assistant = self.last_assistant + else: + assistant = self.get_assistant(task.assistant) + assistant.current_task_id = task.id + assistant.add_user_message(task.description) + + # triage based on current assistant + selected_assistant = self.triage_request(assistant, task.description) + if test_mode: + task.assistant = selected_assistant.name if selected_assistant else "None" + if not selected_assistant: if not test_mode: print( - f"{Colors.OKCYAN}User Query:{Colors.ENDC} {Colors.BOLD}{task.description}{Colors.ENDC}" - ) - else: - print( - f"{Colors.OKCYAN}Test:{Colors.ENDC} {Colors.BOLD}{task.description}{Colors.ENDC}" - ) - #Maintain assistant if persist flag is true - if self.persist and self.last_assistant is not None: - assistant = self.last_assistant - else: - assistant = self.get_assistant(task.assistant) - assistant.current_task_id = task.id - assistant.add_user_message(task.description) + f"No suitable assistant found for the task: {task.description}") + return None - #triage based on current assistant - selected_assistant = self.triage_request(assistant, task.description) - if test_mode: - task.assistant = selected_assistant.name if selected_assistant else "None" - if not selected_assistant: - if not test_mode: - print(f"No suitable assistant found for the task: {task.description}") - return None + # Run the request with the determined or specified assistant + original_plan, plan_log = self.initiate_run( + task, selected_assistant, test_mode) - # Run the request with the determined or specified assistant - original_plan, plan_log = self.initiate_run(task, selected_assistant,test_mode) + # set last assistant + self.last_assistant = selected_assistant - #set last assistant - self.last_assistant = selected_assistant - - #if evaluating the task - if task.evaluate: - output = assistant.evaluate(self.client,task, plan_log) - if output is not None: - success_flag = False - if not isinstance(output[0],bool): - success_flag = False if output[0].lower() == 'false' else bool(output[0]) - message = output[1] - if success_flag: - print(f'\n\033[93m{message}\033[0m') - else: - print(f"{Colors.RED}{message}{Colors.ENDC}") - #log - assistant.add_assistant_message(message) + # if evaluating the task + if task.evaluate: + output = assistant.evaluate(self.client, task, plan_log) + if output is not None: + success_flag = False + if not isinstance(output[0], bool): + success_flag = False if output[0].lower( + ) == 'false' else bool(output[0]) + message = output[1] + if success_flag: + print(f'\n\033[93m{message}\033[0m') else: - message = "Error evaluating output" print(f"{Colors.RED}{message}{Colors.ENDC}") - assistant.add_assistant_message(message) - - return original_plan, plan_log + # log + assistant.add_assistant_message(message) + else: + message = "Error evaluating output" + print(f"{Colors.RED}{message}{Colors.ENDC}") + assistant.add_assistant_message(message) + return original_plan, plan_log def run_tests(self): total_groundtruth = 0 @@ -300,8 +334,13 @@ class LocalEngine: if task.groundtruth: total_groundtruth += 1 - # Assuming get_completion returns a response object with a content attribute - response = get_completion(self.client, [{"role": "user", "content": EVAL_GROUNDTRUTH_PROMPT.format(original_plan, task.groundtruth)}]) + # Assuming get_completion returns a response object with a + # content attribute + response = get_completion( + self.client, [ + { + "role": "user", "content": EVAL_GROUNDTRUTH_PROMPT.format( + original_plan, task.groundtruth)}]) if response.content.lower() == 'true': groundtruth_pass += 1 print(f"{Colors.OKGREEN}✔ Groundtruth test passed for: {Colors.ENDC}{task.description}{Colors.OKBLUE}. Expected: {Colors.ENDC}{task.groundtruth}{Colors.OKBLUE}, Got: {Colors.ENDC}{original_plan}{Colors.ENDC}") @@ -315,11 +354,15 @@ class LocalEngine: else: print(f"{Colors.RED}✘ Incorrect assistant assigned. {Colors.ENDC}{Colors.OKBLUE} Expected: {Colors.ENDC}{task.expected_assistant}{Colors.OKBLUE}, Got: {Colors.ENDC}{task.assistant}{Colors.ENDC}\n") - elif task.expected_plan: total_planning += 1 - # Assuming get_completion returns a response object with a content attribute - response = get_completion(self.client, [{"role": "user", "content": EVAL_PLANNING_PROMPT.format(original_plan, task.expected_plan)}]) + # Assuming get_completion returns a response object with a + # content attribute + response = get_completion( + self.client, [ + { + "role": "user", "content": EVAL_PLANNING_PROMPT.format( + original_plan, task.expected_plan)}]) if response.content.lower() == 'true': planning_pass += 1 @@ -368,35 +411,42 @@ class LocalEngine: self.initialize_and_display_assistants() print("\n" + "-" * 100 + "\n") for task in self.tasks: - print('Task',task.id) + print('Task', task.id) print(f"{Colors.BOLD}Running task{Colors.ENDC}") self.run_task(task, test_mode) print("\n" + "-" * 100 + "\n") - #save the session + # save the session for assistant in self.assistants: if assistant.name == 'user_interface': assistant.save_conversation() - #assistant.print_conversation() + # assistant.print_conversation() def load_test_tasks(self, test_file_paths): self.tasks = [] # Clear any existing tasks for f in test_file_paths: - with open(f, 'r') as file: + with open(f) as file: for line in file: test_case = json.loads(line) task = EvaluationTask(description=test_case['text'], - assistant=test_case.get('assistant', 'user_interface'), - groundtruth=test_case.get('groundtruth',None), - expected_plan=test_case.get('expected_plan',None), - expected_assistant=test_case['expected_assistant'], - iterate=test_case.get('iterate', False), # Add this - evaluate=test_case.get('evaluate', False), - eval_function=test_case.get('eval_function', 'default') - ) + assistant=test_case.get( + 'assistant', 'user_interface'), + groundtruth=test_case.get( + 'groundtruth', None), + expected_plan=test_case.get( + 'expected_plan', None), + expected_assistant=test_case['expected_assistant'], + iterate=test_case.get( + 'iterate', False), # Add this + evaluate=test_case.get( + 'evaluate', False), + eval_function=test_case.get( + 'eval_function', 'default') + ) self.tasks.append(task) def store_context_globally(self, assistant): - self.global_context['history'].append({assistant.name:assistant.context['history']}) + self.global_context['history'].append( + {assistant.name: assistant.context['history']}) def initialize_global_history(self): self.global_context['history'] = [] diff --git a/examples/customer_service_streaming/src/swarm/swarm.py b/examples/customer_service_streaming/src/swarm/swarm.py index a5743ee4..408ac4c8 100644 --- a/examples/customer_service_streaming/src/swarm/swarm.py +++ b/examples/customer_service_streaming/src/swarm/swarm.py @@ -5,7 +5,8 @@ from src.swarm.engines.assistants_engine import AssistantsEngine from src.swarm.engines.local_engine import LocalEngine from configs.general import Colors, tasks_path -# This class represents the main control unit for deploying and managing tasks within the swarm system. +# This class represents the main control unit for deploying and managing +# tasks within the swarm system. class Swarm: @@ -33,7 +34,7 @@ class Swarm: def load_tasks(self): self.tasks = [] - with open(tasks_path, 'r') as file: + with open(tasks_path) as file: tasks_data = json.load(file) for task_json in tasks_data: task = Task(description=task_json['description'], diff --git a/examples/customer_service_streaming/src/tasks/task.py b/examples/customer_service_streaming/src/tasks/task.py index 6c350c2f..4b21f181 100644 --- a/examples/customer_service_streaming/src/tasks/task.py +++ b/examples/customer_service_streaming/src/tasks/task.py @@ -1,7 +1,9 @@ import uuid + class Task: - def __init__(self, description, iterate=False, evaluate=False, assistant='user_interface'): + def __init__(self, description, iterate=False, + evaluate=False, assistant='user_interface'): self.id = str(uuid.uuid4()) self.description = description self.assistant = assistant @@ -10,8 +12,13 @@ class Task: class EvaluationTask(Task): - def __init__(self, description, assistant,iterate, evaluate, groundtruth, expected_assistant, eval_function, expected_plan): - super().__init__(description=description, assistant=assistant,iterate=iterate, evaluate=evaluate) + def __init__(self, description, assistant, iterate, evaluate, + groundtruth, expected_assistant, eval_function, expected_plan): + super().__init__( + description=description, + assistant=assistant, + iterate=iterate, + evaluate=evaluate) self.groundtruth = groundtruth self.expected_assistant = expected_assistant self.expected_plan = expected_plan diff --git a/examples/customer_service_streaming/src/utils.py b/examples/customer_service_streaming/src/utils.py index 7e6c36b1..c4d8770e 100644 --- a/examples/customer_service_streaming/src/utils.py +++ b/examples/customer_service_streaming/src/utils.py @@ -1,10 +1,10 @@ def get_completion(client, - messages: list[dict[str, str]], - model: str = "gpt-4-0125-preview", - max_tokens=2000, - temperature=0.7, - tools=None, - stream=False,): + messages: list[dict[str, str]], + model: str = "gpt-4-0125-preview", + max_tokens=2000, + temperature=0.7, + tools=None, + stream=False,): # Prepare the request parameters request_params = { @@ -16,7 +16,8 @@ def get_completion(client, } if tools and isinstance(tools, list): - request_params["tools"] = tools # Tools are already in dictionary format + # Tools are already in dictionary format + request_params["tools"] = tools # Make the API call with the possibility of streaming if stream: @@ -26,14 +27,16 @@ def get_completion(client, collected_messages = [] for chunk in completion: collected_chunks.append(chunk) # save the event response - chunk_message = chunk.choices[0].delta.content # extract the message + # extract the message + chunk_message = chunk.choices[0].delta.content collected_messages.append(chunk_message) # save the message print(chunk_message, end="") # print the message - # yield chunk_message # Yield each part of the completion as it arrives - return collected_messages # Returns the whole completion + # yield chunk_message # Yield each part of the completion as it + # arrives + return collected_messages # Returns the whole completion else: completion = client.chat.completions.create(**request_params) - return completion.choices[0].message # Returns the whole completion + return completion.choices[0].message # Returns the whole completion def is_dict_empty(d): diff --git a/examples/customer_service_streaming/src/validator.py b/examples/customer_service_streaming/src/validator.py index a7a138f5..5115f4d8 100644 --- a/examples/customer_service_streaming/src/validator.py +++ b/examples/customer_service_streaming/src/validator.py @@ -4,11 +4,13 @@ import json from src.swarm.tool import Tool from src.swarm.assistants import Assistant + def validate_tool(tool_definition): # Validate the tool using its schema Tool(**tool_definition) # Uncomment if you have a schema to validate tools print(f"Validating tool: {tool_definition['function']['name']}") + def validate_all_tools(engine): tools_path = os.path.join(os.getcwd(), 'configs/tools') for tool_dir in os.listdir(tools_path): @@ -20,26 +22,34 @@ def validate_all_tools(engine): tool_json_path = os.path.join(tool_dir_path, 'tool.json') handler_path = os.path.join(tool_dir_path, 'handler.py') if os.path.isfile(tool_json_path) and os.path.isfile(handler_path): - with open(tool_json_path, 'r') as file: + with open(tool_json_path) as file: tool_def = json.load(file) tool_name_from_json = tool_def['function']['name'] - # Check if the folder name matches the tool name in tool.json + # Check if the folder name matches the tool name in + # tool.json if tool_name_from_json != tool_dir: - print(f"Mismatch in tool folder name and tool name in JSON for {tool_dir}") + print( + f"Mismatch in tool folder name and tool name in JSON for {tool_dir}") else: - print(f"{tool_dir}/tool.json tool name matches folder name.") + print( + f"{tool_dir}/tool.json tool name matches folder name.") - # Check if the function name in handler.py matches the tool name - spec = importlib.util.spec_from_file_location(f"{tool_dir}_handler", handler_path) + # Check if the function name in handler.py matches the tool + # name + spec = importlib.util.spec_from_file_location( + f"{tool_dir}_handler", handler_path) tool_module = importlib.util.module_from_spec(spec) spec.loader.exec_module(tool_module) - # Verify if the function exists in handler.py and matches the name + # Verify if the function exists in handler.py and matches + # the name if hasattr(tool_module, tool_dir): - print(f"{tool_dir}/handler.py contains a matching function name.") + print( + f"{tool_dir}/handler.py contains a matching function name.") else: - print(f"{tool_dir}/handler.py does not contain a function '{tool_dir}'.") + print( + f"{tool_dir}/handler.py does not contain a function '{tool_dir}'.") else: if not os.path.isfile(tool_json_path): @@ -49,18 +59,21 @@ def validate_all_tools(engine): print('\n') # Function to validate all assistants + + def validate_all_assistants(): assistants_path = os.path.join(os.getcwd(), 'configs/assistants') for root, dirs, files in os.walk(assistants_path): for file in files: if file.endswith('assistant.json'): file_path = os.path.join(root, file) - with open(file_path, 'r') as file: - assistant_data = json.load(file)[0] # Access the first dictionary in the list - try: - Assistant(**assistant_data) - print(f"{os.path.basename(root)} assistant validated!") - except: - Assistant(**assistant_data) - print(f"Assistant validation failed!") + with open(file_path) as file: + # Access the first dictionary in the list + assistant_data = json.load(file)[0] + try: + Assistant(**assistant_data) + print(f"{os.path.basename(root)} assistant validated!") + except BaseException: + Assistant(**assistant_data) + print(f"Assistant validation failed!") print('\n') diff --git a/examples/personal_shopper/database.py b/examples/personal_shopper/database.py index abdfad42..c2b8105e 100644 --- a/examples/personal_shopper/database.py +++ b/examples/personal_shopper/database.py @@ -140,7 +140,8 @@ def preview_table(table_name): conn = sqlite3.connect("application.db") # Replace with your database name cursor = conn.cursor() - cursor.execute(f"SELECT * FROM {table_name} LIMIT 5;") # Limit to first 5 rows + # Limit to first 5 rows + cursor.execute(f"SELECT * FROM {table_name} LIMIT 5;") rows = cursor.fetchall() diff --git a/examples/personal_shopper/main.py b/examples/personal_shopper/main.py index e6694530..0fce1e27 100644 --- a/examples/personal_shopper/main.py +++ b/examples/personal_shopper/main.py @@ -23,9 +23,11 @@ def refund_item(user_id, item_id): result = cursor.fetchone() if result: amount = result[0] - print(f"Refunding ${amount} to user ID {user_id} for item ID {item_id}.") + print( + f"Refunding ${amount} to user ID {user_id} for item ID {item_id}.") else: - print(f"No purchase found for user ID {user_id} and item ID {item_id}.") + print( + f"No purchase found for user ID {user_id} and item ID {item_id}.") print("Refund initiated") diff --git a/examples/support_bot/Makefile b/examples/support_bot/Makefile index 3fa23fe6..a540c17b 100644 --- a/examples/support_bot/Makefile +++ b/examples/support_bot/Makefile @@ -3,4 +3,4 @@ install: prep: python3 prep_data.py run: - PYTHONPATH=../.. python3 -m main \ No newline at end of file + PYTHONPATH=../.. python3 -m main diff --git a/examples/support_bot/data/article_6233728.json b/examples/support_bot/data/article_6233728.json index 763853d6..68e299dc 100644 --- a/examples/support_bot/data/article_6233728.json +++ b/examples/support_bot/data/article_6233728.json @@ -1 +1 @@ -{"text": "Introduction\n============\n\n\n\u200bSince releasing the Answers endpoint in beta last year, we\u2019ve developed new methods that achieve better results for this task. As a result, we\u2019ll be removing the Answers endpoint from our documentation and removing access to this endpoint on December 3, 2022 for all organizations. New accounts created after June 3rd will not have access to this endpoint.\n\n\n\nWe strongly encourage developers to switch over to newer techniques which produce better results, outlined below.\n\n\n\nCurrent documentation\n---------------------\n\n\n \n\n\n\n\n\n\nOptions\n=======\n\n\nAs a quick review, here are the high level steps of the current Answers endpoint:\n\n\n\n\n![](https://openai.intercom-attachments-7.com/i/o/524217540/51eda23e171f33f1b9d5acff/rM6ZVI3XZ2CpxcEStmG5mFy6ATBCskmX2g3_GPmeY3FicvrWfJCuFOtzsnbkpMQe-TQ6hi5j1BV9cFo7bCDcsz8VWxFfeOnC1Gb4QNaeVYtJq4Qtg76SBOLLk-jgHUA8mWZ0QgOuV636UgcvMA)All of these options are also outlined [here](https://github.com/openai/openai-cookbook/tree/main/transition_guides_for_deprecated_API_endpoints)\n\n\n\nOption 1: Transition to Embeddings-based search (recommended)\n-------------------------------------------------------------\n\n\nWe believe that most use cases will be better served by moving the underlying search system to use a vector-based embedding search. The major reason for this is that our current system used a bigram filter to narrow down the scope of candidates whereas our embeddings system has much more contextual awareness. Also, in general, using embeddings will be considerably lower cost in the long run. If you\u2019re not familiar with this, you can learn more by visiting our [guide to embeddings](https://beta.openai.com/docs/guides/embeddings/use-cases).\n\n\n\nIf you\u2019re using a small dataset (<10,000 documents), consider using the techniques described in that guide to find the best documents to construct a prompt similar to [this](#h_89196129b2). Then, you can just submit that prompt to our [Completions](https://beta.openai.com/docs/api-reference/completions) endpoint.\n\n\n\nIf you have a larger dataset, consider using a vector search engine like [Pinecone](https://share.streamlit.io/pinecone-io/playground/beyond_search_openai/src/server.py) or [Weaviate](https://weaviate.io/developers/weaviate/current/retriever-vectorizer-modules/text2vec-openai.html) to power that search.\n\n\n\nOption 2: Reimplement existing functionality\n--------------------------------------------\n\n\nIf you\u2019d like to recreate the functionality of the Answers endpoint, here\u2019s how we did it. There is also a [script](https://github.com/openai/openai-cookbook/blob/main/transition_guides_for_deprecated_API_endpoints/answers_functionality_example.py) that replicates most of this functionality.\n\n\n\nAt a high level, there are two main ways you can use the answers endpoint: you can source the data from an uploaded file or send it in with the request.\n\n\n\n**If you\u2019re using the document parameter**\n------------------------------------------\n\n\nThere\u2019s only one step if you provide the documents in the Answers API call.\n\n\n\nHere\u2019s roughly the steps we used: \n\n\n* Construct the prompt [with this format.](#h_89196129b2)\n* Gather all of the provided documents. If they fit in the prompt, just use all of them.\n* Do an [OpenAI search](https://beta.openai.com/docs/api-reference/searches) (note that this is also being deprecated and has a [transition guide](https://app.intercom.com/a/apps/dgkjq2bp/articles/articles/6272952/show)) where the documents are the user provided documents and the query is the query from above. Rank the documents by score.\n* In order of score, attempt to add Elastic search documents until you run out of space in the context.\n* Request a completion with the provided parameters (logit\\_bias, n, stop, etc)\n\n\nThroughout all of this, you\u2019ll need to check that the prompt\u2019s length doesn\u2019t exceed [the model's token limit](https://beta.openai.com/docs/engines/gpt-3). To assess the number of tokens present in a prompt, we recommend . \n\n\n\nIf you're using the file parameter\n----------------------------------\n\n\nStep 1: upload a jsonl file\n\n\n\nBehind the scenes, we upload new files meant for answers to an Elastic search cluster. Each line of the jsonl is then submitted as a document.\n\n\n\nIf you uploaded the file with the purpose \u201canswers,\u201d we additionally split the documents on newlines and upload each of those chunks as separate documents to ensure that we can search across and reference the highest number of relevant text sections in the file.\n\n\n\nEach line requires a \u201ctext\u201d field and an optional \u201cmetadata\u201d field.\n\n\n\nThese are the Elastic search settings and mappings for our index:\n\n\n\n[Elastic searching mapping](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html): \n\n\n\n```\n{ \n \"properties\": { \n \"document\": {\"type\": \"text\", \"analyzer\": \"standard_bigram_analyzer\"}, -> the \u201ctext\u201d field \n \"metadata\": {\"type\": \"object\", \"enabled\": False}, -> the \u201cmetadata\u201d field \n } \n}\n```\n\n\n[Elastic search analyzer](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html):\n\n\n\n```\n{ \n \"analysis\": { \n \"analyzer\": { \n \"standard_bigram_analyzer\": { \n \"type\": \"custom\", \n \"tokenizer\": \"standard\", \n \"filter\": [\"lowercase\", \"english_stop\", \"shingle\"], \n } \n }, \n \"filter\": {\"english_stop\": {\"type\": \"stop\", \"stopwords\": \"_english_\"}}, \n } \n}\n```\n\n\nAfter that, we performed [standard Elastic search search calls](https://elasticsearch-py.readthedocs.io/en/v8.2.0/api.html#elasticsearch.Elasticsearch.search) and used `max\\_rerank` to determine the number of documents to return from Elastic search.\n\n\n\nStep 2: Search\n\n\nHere\u2019s roughly the steps we used. Our end goal is to create a [Completions](https://beta.openai.com/docs/api-reference/completions) request [with this format](#h_89196129b2). It will look very similar to [Documents](#h_cb1d8a8d3f)\n\n\n\nFrom there, our steps are: \n\n\n* Start with the `experimental\\_alternative\\_question` or, if that's not provided, what\u2019s in the `question` field. Call that the query.\n* Query Elastic search for `max\\_rerank` documents with query as the search param.\n* Take those documents and do an [OpenAI search](https://beta.openai.com/docs/api-reference/searches) on them where the entries from Elastic search are the docs, and the query is the query that you used above. Use the score from the search to rank the documents.\n* In order of score, attempt to add Elastic search documents until you run out of space in the prompt.\n* Request an OpenAI completion with the provided parameters (logit\\_bias, n, stop, etc). Return that answer to the user.\n\n\nCompletion Prompt\n-----------------\n\n\n\n```\n=== \nContext: #{{ provided examples_context }} \n=== \nQ: example 1 question \nA: example 1 answer \n--- \nQ: example 2 question \nA: example 2 answer \n(and so on for all examples provided in the request) \n=== \nContext: #{{ what we return from Elasticsearch }} \n=== \nQ: #{{ user provided question }} \nA:\n```\n", "title": "Answers Transition Guide", "article_id": "6233728", "url": "https://help.openai.com/en/articles/6233728-answers-transition-guide"} \ No newline at end of file +{"text": "Introduction\n============\n\n\n\u200bSince releasing the Answers endpoint in beta last year, we\u2019ve developed new methods that achieve better results for this task. As a result, we\u2019ll be removing the Answers endpoint from our documentation and removing access to this endpoint on December 3, 2022 for all organizations. New accounts created after June 3rd will not have access to this endpoint.\n\n\n\nWe strongly encourage developers to switch over to newer techniques which produce better results, outlined below.\n\n\n\nCurrent documentation\n---------------------\n\n\n \n\n\n\n\n\n\nOptions\n=======\n\n\nAs a quick review, here are the high level steps of the current Answers endpoint:\n\n\n\n\n![](https://openai.intercom-attachments-7.com/i/o/524217540/51eda23e171f33f1b9d5acff/rM6ZVI3XZ2CpxcEStmG5mFy6ATBCskmX2g3_GPmeY3FicvrWfJCuFOtzsnbkpMQe-TQ6hi5j1BV9cFo7bCDcsz8VWxFfeOnC1Gb4QNaeVYtJq4Qtg76SBOLLk-jgHUA8mWZ0QgOuV636UgcvMA)All of these options are also outlined [here](https://github.com/openai/openai-cookbook/tree/main/transition_guides_for_deprecated_API_endpoints)\n\n\n\nOption 1: Transition to Embeddings-based search (recommended)\n-------------------------------------------------------------\n\n\nWe believe that most use cases will be better served by moving the underlying search system to use a vector-based embedding search. The major reason for this is that our current system used a bigram filter to narrow down the scope of candidates whereas our embeddings system has much more contextual awareness. Also, in general, using embeddings will be considerably lower cost in the long run. If you\u2019re not familiar with this, you can learn more by visiting our [guide to embeddings](https://beta.openai.com/docs/guides/embeddings/use-cases).\n\n\n\nIf you\u2019re using a small dataset (<10,000 documents), consider using the techniques described in that guide to find the best documents to construct a prompt similar to [this](#h_89196129b2). Then, you can just submit that prompt to our [Completions](https://beta.openai.com/docs/api-reference/completions) endpoint.\n\n\n\nIf you have a larger dataset, consider using a vector search engine like [Pinecone](https://share.streamlit.io/pinecone-io/playground/beyond_search_openai/src/server.py) or [Weaviate](https://weaviate.io/developers/weaviate/current/retriever-vectorizer-modules/text2vec-openai.html) to power that search.\n\n\n\nOption 2: Reimplement existing functionality\n--------------------------------------------\n\n\nIf you\u2019d like to recreate the functionality of the Answers endpoint, here\u2019s how we did it. There is also a [script](https://github.com/openai/openai-cookbook/blob/main/transition_guides_for_deprecated_API_endpoints/answers_functionality_example.py) that replicates most of this functionality.\n\n\n\nAt a high level, there are two main ways you can use the answers endpoint: you can source the data from an uploaded file or send it in with the request.\n\n\n\n**If you\u2019re using the document parameter**\n------------------------------------------\n\n\nThere\u2019s only one step if you provide the documents in the Answers API call.\n\n\n\nHere\u2019s roughly the steps we used: \n\n\n* Construct the prompt [with this format.](#h_89196129b2)\n* Gather all of the provided documents. If they fit in the prompt, just use all of them.\n* Do an [OpenAI search](https://beta.openai.com/docs/api-reference/searches) (note that this is also being deprecated and has a [transition guide](https://app.intercom.com/a/apps/dgkjq2bp/articles/articles/6272952/show)) where the documents are the user provided documents and the query is the query from above. Rank the documents by score.\n* In order of score, attempt to add Elastic search documents until you run out of space in the context.\n* Request a completion with the provided parameters (logit\\_bias, n, stop, etc)\n\n\nThroughout all of this, you\u2019ll need to check that the prompt\u2019s length doesn\u2019t exceed [the model's token limit](https://beta.openai.com/docs/engines/gpt-3). To assess the number of tokens present in a prompt, we recommend . \n\n\n\nIf you're using the file parameter\n----------------------------------\n\n\nStep 1: upload a jsonl file\n\n\n\nBehind the scenes, we upload new files meant for answers to an Elastic search cluster. Each line of the jsonl is then submitted as a document.\n\n\n\nIf you uploaded the file with the purpose \u201canswers,\u201d we additionally split the documents on newlines and upload each of those chunks as separate documents to ensure that we can search across and reference the highest number of relevant text sections in the file.\n\n\n\nEach line requires a \u201ctext\u201d field and an optional \u201cmetadata\u201d field.\n\n\n\nThese are the Elastic search settings and mappings for our index:\n\n\n\n[Elastic searching mapping](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html): \n\n\n\n```\n{ \n \"properties\": { \n \"document\": {\"type\": \"text\", \"analyzer\": \"standard_bigram_analyzer\"}, -> the \u201ctext\u201d field \n \"metadata\": {\"type\": \"object\", \"enabled\": False}, -> the \u201cmetadata\u201d field \n } \n}\n```\n\n\n[Elastic search analyzer](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html):\n\n\n\n```\n{ \n \"analysis\": { \n \"analyzer\": { \n \"standard_bigram_analyzer\": { \n \"type\": \"custom\", \n \"tokenizer\": \"standard\", \n \"filter\": [\"lowercase\", \"english_stop\", \"shingle\"], \n } \n }, \n \"filter\": {\"english_stop\": {\"type\": \"stop\", \"stopwords\": \"_english_\"}}, \n } \n}\n```\n\n\nAfter that, we performed [standard Elastic search search calls](https://elasticsearch-py.readthedocs.io/en/v8.2.0/api.html#elasticsearch.Elasticsearch.search) and used `max\\_rerank` to determine the number of documents to return from Elastic search.\n\n\n\nStep 2: Search\n\n\nHere\u2019s roughly the steps we used. Our end goal is to create a [Completions](https://beta.openai.com/docs/api-reference/completions) request [with this format](#h_89196129b2). It will look very similar to [Documents](#h_cb1d8a8d3f)\n\n\n\nFrom there, our steps are: \n\n\n* Start with the `experimental\\_alternative\\_question` or, if that's not provided, what\u2019s in the `question` field. Call that the query.\n* Query Elastic search for `max\\_rerank` documents with query as the search param.\n* Take those documents and do an [OpenAI search](https://beta.openai.com/docs/api-reference/searches) on them where the entries from Elastic search are the docs, and the query is the query that you used above. Use the score from the search to rank the documents.\n* In order of score, attempt to add Elastic search documents until you run out of space in the prompt.\n* Request an OpenAI completion with the provided parameters (logit\\_bias, n, stop, etc). Return that answer to the user.\n\n\nCompletion Prompt\n-----------------\n\n\n\n```\n=== \nContext: #{{ provided examples_context }} \n=== \nQ: example 1 question \nA: example 1 answer \n--- \nQ: example 2 question \nA: example 2 answer \n(and so on for all examples provided in the request) \n=== \nContext: #{{ what we return from Elasticsearch }} \n=== \nQ: #{{ user provided question }} \nA:\n```\n", "title": "Answers Transition Guide", "article_id": "6233728", "url": "https://help.openai.com/en/articles/6233728-answers-transition-guide"} diff --git a/examples/support_bot/data/article_6272941.json b/examples/support_bot/data/article_6272941.json index d0ac766e..aa8d2930 100644 --- a/examples/support_bot/data/article_6272941.json +++ b/examples/support_bot/data/article_6272941.json @@ -1 +1 @@ -{"text": "Introduction\n============\n\n\n\u200bSince releasing the Classifications endpoint in beta last year, we\u2019ve developed new methods that achieve better results for this task. As a result, we\u2019ll be removing the Classifications endpoints from our documentation and removing access to this endpoint on December 3, 2022 for all organizations. New accounts created after June 3rd will not have access to this endpoint.\n\n\n\nWe strongly encourage developers to switch over to newer techniques which produce better results, outlined below.\n\n\n\nCurrent documentation\n---------------------\n\n\n \n\n\n \n\n\n\nOptions\n=======\n\n\nAll of these options are also outlined [here](https://github.com/openai/openai-cookbook/tree/main/transition_guides_for_deprecated_API_endpoints).\n\n\n\nAs a quick review, here are the high level steps of the current Classifications endpoint:\n\n\n\n\n![](https://openai.intercom-attachments-7.com/i/o/524219891/aa3136e9c7bcd8697c51ae9a/wDEz1wePRC3E7UyA1n0lsTPUvVakpPlMQ92SDnvEsScQFclIRW-bO2eKRhAp9_15j0vnyPYnhG71PjJj6Fttfwdpb1UnHZzMle9llSC76HQHN9lCzMNF6N2UDmeWzOldgwqRYYy-hzxBAD61Nw)\nOption 1: Transition to fine-tuning (recommended)\n-------------------------------------------------\n\n\nWe believe that most use cases will be better served by moving to a fine tuned model. The major reason for this is that our current system used a bigram filter to narrow down the scope of candidates whereas our fine tuned system can take in an arbitrary amount of data and learn more nuance between examples. For more on creating a fine tuned model, check out our [guide](https://beta.openai.com/docs/guides/fine-tuning/classification). \n\n\n\nOption 2: Transition to Embeddings-based search\n-----------------------------------------------\n\n\nAnother possible option, especially if your classification labels change frequently, is to use embeddings. If you\u2019re not familiar with this, you can learn more by visiting our [guide to embeddings](https://beta.openai.com/docs/guides/embeddings/use-cases).\n\n\n\nIf you\u2019re using a small dataset (<10,000 documents), consider using the techniques described in that guide to find the best documents to construct a prompt similar to [this](#h_e63b71a5c8). Then, you can just submit that prompt to our [Completions](https://beta.openai.com/docs/api-reference/completions) endpoint.\n\n\n\nIf you have a larger dataset, consider using a vector search engine like [Pinecone](https://share.streamlit.io/pinecone-io/playground/beyond_search_openai/src/server.py) or [Weaviate](https://weaviate.io/developers/weaviate/current/retriever-vectorizer-modules/text2vec-openai.html) to power that search.\n\n\n\nOption 3: Reimplement existing functionality\n--------------------------------------------\n\n\nIf you\u2019d like to recreate the functionality of the Classifications endpoint, here\u2019s how we did it. This functionality is also mostly replicated in this [script](https://github.com/openai/openai-cookbook/blob/main/transition_guides_for_deprecated_API_endpoints/classification_functionality_example.py).\n\n\n\nAt a high level, there are two main ways you can use the classifications endpoint: you can source the data from an uploaded file or send it in with the request.\n\n\n\nIf you're using the document parameter\n--------------------------------------\n\n\nThere\u2019s only one step if you provide the documents in the Classifications API call.\n\n\n\nHere\u2019s roughly the steps we used: \n\n\n* Construct the prompt [with this format.](#h_e63b71a5c8)\n* Gather all of the provided documents. If they fit in the prompt, just use all of them.\n* Do an [OpenAI search](https://beta.openai.com/docs/api-reference/searches) (also being deprecated. Please see its [transition guide](https://help.openai.com/en/articles/6272952-search-transition-guide)) where the documents are the user provided documents and the query is the query from above. Rank the documents by score.\n* In order of score, attempt to add Elastic search documents until you run out of space in the context. Try to maximize the number of distinct labels as that will help the model understand the different labels that are available.\n* Request a completion with the provided parameters (logit\\_bias, n, stop, etc)\n\nThroughout all of this, you\u2019ll need to check that the prompt\u2019s length doesn\u2019t exceed [the model's token limit](https://beta.openai.com/docs/engines/gpt-3). To assess the number of tokens present in a prompt, we recommend . \n\n\n\nIf you're using the file parameter\n----------------------------------\n\n\nStep 1: upload a jsonl file\n\n\n\nBehind the scenes, we upload new files meant for classifications to an Elastic search. Each line of the jsonl is then submitted as a document.\n\n\n\nIn each line we require a \u201ctext\u201d field, a \u201clabel\u201d field, and an optional \u201cmetadata\u201d field\n\n\n\nThese are the Elastic search settings and mappings for our index:\n\n\n\n[Elastic searching mapping](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html): \n\n\n\n```\n{ \n \"properties\": { \n \"document\": {\"type\": \"text\", \"analyzer\": \"standard_bigram_analyzer\"}, -> the \u201ctext\u201d field \n \"label\": {\"type\": \"text\", \"analyzer\": \"standard_bigram_analyzer\"}, \n \"metadata\": {\"type\": \"object\", \"enabled\": False}, -> the \u201cmetadata\u201d field \n } \n}\n```\n\n\n[Elastic search analyzer](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html):\n\n\n\n```\n{ \n \"analysis\": { \n \"analyzer\": { \n \"standard_bigram_analyzer\": { \n \"type\": \"custom\", \n \"tokenizer\": \"standard\", \n \"filter\": [\"lowercase\", \"english_stop\", \"shingle\"], \n } \n }, \n \"filter\": {\"english_stop\": {\"type\": \"stop\", \"stopwords\": \"_english_\"}}, \n } \n}\n```\n\n\nAfter that, we performed [standard Elastic search search calls](https://elasticsearch-py.readthedocs.io/en/v8.2.0/api.html#elasticsearch.Elasticsearch.search) and used `max\\_examples` to determine the number of documents to return from Elastic search.\n\n\n\nStep 2: Search\n\n\nHere\u2019s roughly the steps we used. Our end goal is to create a [Completions](https://beta.openai.com/docs/api-reference/completions) request [with this format](#h_e63b71a5c8). It will look very similar to [Documents](#h_51fe4aed6d).\n\n\n\nFrom there, our steps are: \n\n\n* Start with the `experimental\\_alternative\\_question` or, if that's not provided, what\u2019s in the `question` field. Call that the query.\n* Query Elastic search for `max\\_examples` documents with query as the search param.\n* Take those documents and do an [OpenAI search](https://beta.openai.com/docs/api-reference/searches) on them where the entries from Elastic search are the docs, and the query is the query that you used above. Use the score from the search to rank the documents.\n* In order of score, attempt to add Elastic search documents until you run out of space in the prompt. Try to maximize the number of distinct labels as that will help the model understand the different labels that are available.\n* Request an OpenAI completion with the provided parameters (logit\\_bias, n, stop, etc). Return that generation to the user.\n\n\nCompletion Prompt\n-----------------\n\n\n\n```\n#{{ an optional instruction }} \n \nText: #{{example 1 text}} \nCategory: #{{example 1 label}} \n--- \nText: #{{example 2 text}} \nCategory: #{{example 2 label}} \n--- \nText: #{{question}} \nCategory:\n```\n\n", "title": "Classifications Transition Guide", "article_id": "6272941", "url": "https://help.openai.com/en/articles/6272941-classifications-transition-guide"} \ No newline at end of file +{"text": "Introduction\n============\n\n\n\u200bSince releasing the Classifications endpoint in beta last year, we\u2019ve developed new methods that achieve better results for this task. As a result, we\u2019ll be removing the Classifications endpoints from our documentation and removing access to this endpoint on December 3, 2022 for all organizations. New accounts created after June 3rd will not have access to this endpoint.\n\n\n\nWe strongly encourage developers to switch over to newer techniques which produce better results, outlined below.\n\n\n\nCurrent documentation\n---------------------\n\n\n \n\n\n \n\n\n\nOptions\n=======\n\n\nAll of these options are also outlined [here](https://github.com/openai/openai-cookbook/tree/main/transition_guides_for_deprecated_API_endpoints).\n\n\n\nAs a quick review, here are the high level steps of the current Classifications endpoint:\n\n\n\n\n![](https://openai.intercom-attachments-7.com/i/o/524219891/aa3136e9c7bcd8697c51ae9a/wDEz1wePRC3E7UyA1n0lsTPUvVakpPlMQ92SDnvEsScQFclIRW-bO2eKRhAp9_15j0vnyPYnhG71PjJj6Fttfwdpb1UnHZzMle9llSC76HQHN9lCzMNF6N2UDmeWzOldgwqRYYy-hzxBAD61Nw)\nOption 1: Transition to fine-tuning (recommended)\n-------------------------------------------------\n\n\nWe believe that most use cases will be better served by moving to a fine tuned model. The major reason for this is that our current system used a bigram filter to narrow down the scope of candidates whereas our fine tuned system can take in an arbitrary amount of data and learn more nuance between examples. For more on creating a fine tuned model, check out our [guide](https://beta.openai.com/docs/guides/fine-tuning/classification). \n\n\n\nOption 2: Transition to Embeddings-based search\n-----------------------------------------------\n\n\nAnother possible option, especially if your classification labels change frequently, is to use embeddings. If you\u2019re not familiar with this, you can learn more by visiting our [guide to embeddings](https://beta.openai.com/docs/guides/embeddings/use-cases).\n\n\n\nIf you\u2019re using a small dataset (<10,000 documents), consider using the techniques described in that guide to find the best documents to construct a prompt similar to [this](#h_e63b71a5c8). Then, you can just submit that prompt to our [Completions](https://beta.openai.com/docs/api-reference/completions) endpoint.\n\n\n\nIf you have a larger dataset, consider using a vector search engine like [Pinecone](https://share.streamlit.io/pinecone-io/playground/beyond_search_openai/src/server.py) or [Weaviate](https://weaviate.io/developers/weaviate/current/retriever-vectorizer-modules/text2vec-openai.html) to power that search.\n\n\n\nOption 3: Reimplement existing functionality\n--------------------------------------------\n\n\nIf you\u2019d like to recreate the functionality of the Classifications endpoint, here\u2019s how we did it. This functionality is also mostly replicated in this [script](https://github.com/openai/openai-cookbook/blob/main/transition_guides_for_deprecated_API_endpoints/classification_functionality_example.py).\n\n\n\nAt a high level, there are two main ways you can use the classifications endpoint: you can source the data from an uploaded file or send it in with the request.\n\n\n\nIf you're using the document parameter\n--------------------------------------\n\n\nThere\u2019s only one step if you provide the documents in the Classifications API call.\n\n\n\nHere\u2019s roughly the steps we used: \n\n\n* Construct the prompt [with this format.](#h_e63b71a5c8)\n* Gather all of the provided documents. If they fit in the prompt, just use all of them.\n* Do an [OpenAI search](https://beta.openai.com/docs/api-reference/searches) (also being deprecated. Please see its [transition guide](https://help.openai.com/en/articles/6272952-search-transition-guide)) where the documents are the user provided documents and the query is the query from above. Rank the documents by score.\n* In order of score, attempt to add Elastic search documents until you run out of space in the context. Try to maximize the number of distinct labels as that will help the model understand the different labels that are available.\n* Request a completion with the provided parameters (logit\\_bias, n, stop, etc)\n\nThroughout all of this, you\u2019ll need to check that the prompt\u2019s length doesn\u2019t exceed [the model's token limit](https://beta.openai.com/docs/engines/gpt-3). To assess the number of tokens present in a prompt, we recommend . \n\n\n\nIf you're using the file parameter\n----------------------------------\n\n\nStep 1: upload a jsonl file\n\n\n\nBehind the scenes, we upload new files meant for classifications to an Elastic search. Each line of the jsonl is then submitted as a document.\n\n\n\nIn each line we require a \u201ctext\u201d field, a \u201clabel\u201d field, and an optional \u201cmetadata\u201d field\n\n\n\nThese are the Elastic search settings and mappings for our index:\n\n\n\n[Elastic searching mapping](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html): \n\n\n\n```\n{ \n \"properties\": { \n \"document\": {\"type\": \"text\", \"analyzer\": \"standard_bigram_analyzer\"}, -> the \u201ctext\u201d field \n \"label\": {\"type\": \"text\", \"analyzer\": \"standard_bigram_analyzer\"}, \n \"metadata\": {\"type\": \"object\", \"enabled\": False}, -> the \u201cmetadata\u201d field \n } \n}\n```\n\n\n[Elastic search analyzer](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html):\n\n\n\n```\n{ \n \"analysis\": { \n \"analyzer\": { \n \"standard_bigram_analyzer\": { \n \"type\": \"custom\", \n \"tokenizer\": \"standard\", \n \"filter\": [\"lowercase\", \"english_stop\", \"shingle\"], \n } \n }, \n \"filter\": {\"english_stop\": {\"type\": \"stop\", \"stopwords\": \"_english_\"}}, \n } \n}\n```\n\n\nAfter that, we performed [standard Elastic search search calls](https://elasticsearch-py.readthedocs.io/en/v8.2.0/api.html#elasticsearch.Elasticsearch.search) and used `max\\_examples` to determine the number of documents to return from Elastic search.\n\n\n\nStep 2: Search\n\n\nHere\u2019s roughly the steps we used. Our end goal is to create a [Completions](https://beta.openai.com/docs/api-reference/completions) request [with this format](#h_e63b71a5c8). It will look very similar to [Documents](#h_51fe4aed6d).\n\n\n\nFrom there, our steps are: \n\n\n* Start with the `experimental\\_alternative\\_question` or, if that's not provided, what\u2019s in the `question` field. Call that the query.\n* Query Elastic search for `max\\_examples` documents with query as the search param.\n* Take those documents and do an [OpenAI search](https://beta.openai.com/docs/api-reference/searches) on them where the entries from Elastic search are the docs, and the query is the query that you used above. Use the score from the search to rank the documents.\n* In order of score, attempt to add Elastic search documents until you run out of space in the prompt. Try to maximize the number of distinct labels as that will help the model understand the different labels that are available.\n* Request an OpenAI completion with the provided parameters (logit\\_bias, n, stop, etc). Return that generation to the user.\n\n\nCompletion Prompt\n-----------------\n\n\n\n```\n#{{ an optional instruction }} \n \nText: #{{example 1 text}} \nCategory: #{{example 1 label}} \n--- \nText: #{{example 2 text}} \nCategory: #{{example 2 label}} \n--- \nText: #{{question}} \nCategory:\n```\n\n", "title": "Classifications Transition Guide", "article_id": "6272941", "url": "https://help.openai.com/en/articles/6272941-classifications-transition-guide"} diff --git a/examples/support_bot/data/article_6272952.json b/examples/support_bot/data/article_6272952.json index d0c49a69..f13a6577 100644 --- a/examples/support_bot/data/article_6272952.json +++ b/examples/support_bot/data/article_6272952.json @@ -1 +1 @@ -{"text": "Introduction\n============\n\n\n\u200bSince releasing the Search endpoint, we\u2019ve developed new methods that achieve better results for this task. As a result, we\u2019ll be removing the Search endpoint from our documentation and removing access to this endpoint for all organizations on December 3, 2022. New accounts created after June 3rd will not have access to this endpoint.\n\n\n\nWe strongly encourage developers to switch over to newer techniques which produce better results, outlined below.\n\n\n\nCurrent documentation\n---------------------\n\n\n \n\n\n \n\n\n\nOptions\n=======\n\n\nThis options are also outlined [here](https://github.com/openai/openai-cookbook/tree/main/transition_guides_for_deprecated_API_endpoints).\n\n\n\nOption 1: Transition to Embeddings-based search (recommended)\n-------------------------------------------------------------\n\n\nWe believe that most use cases will be better served by moving the underlying search system to use a vector-based embedding search. The major reason for this is that our current system used a bigram filter to narrow down the scope of candidates whereas our embeddings system has much more contextual awareness. Also, in general, using embeddings will be considerably lower cost in the long run. If you\u2019re not familiar with this, you can learn more by visiting our [guide to embeddings](https://beta.openai.com/docs/guides/embeddings/use-cases).\n\n\n\nIf you have a larger dataset (>10,000 documents), consider using a vector search engine like [Pinecone](https://www.pinecone.io) or [Weaviate](https://weaviate.io/developers/weaviate/current/retriever-vectorizer-modules/text2vec-openai.html) to power that search.\n\n\n\nOption 2: Reimplement existing functionality\n--------------------------------------------\n\n\nIf you\u2019re using the document parameter\n--------------------------------------\n\n\nThe current openai.Search.create and openai.Engine.search code can be replaced with this [snippet](https://github.com/openai/openai-cookbook/blob/main/transition_guides_for_deprecated_API_endpoints/search_functionality_example.py) (note this will only work with non-Codex engines since they use a different tokenizer.)\n\n\n\nWe plan to move this snippet into the openai-python repo under openai.Search.create\\_legacy.\n\n\n\nIf you\u2019re using the file parameter\n----------------------------------\n\n\nAs a quick review, here are the high level steps of the current Search endpoint with a file:\n\n\n\n\n![](https://openai.intercom-attachments-7.com/i/o/524222854/57382ab799ebe9bb988c0a1f/_y63ycSmtiFAS3slJdbfW0Mz-0nx2DP4gNAjyknMAmTT1fQUE9d7nha5yfsXJLkWRFmM41uvjPxi2ToSW4vrF7EcasiQDG51CrKPNOpXPVG4WZXI8jC8orWSmuGhAGGC4KoUYucwJOh0bH9Nzw)\n\n\nStep 1: upload a jsonl file\n\n\n\nBehind the scenes, we upload new files meant for file search to an Elastic search. Each line of the jsonl is then submitted as a document.\n\n\n\nEach line is required to have a \u201ctext\u201d field and an optional \u201cmetadata\u201d field.\n\n\n\nThese are the Elastic search settings and mappings for our index:\n\n\n\n[Elastic searching mapping](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html): \n\n\n\n```\n{ \n \"properties\": { \n \"document\": {\"type\": \"text\", \"analyzer\": \"standard_bigram_analyzer\"}, -> the \u201ctext\u201d field \n \"metadata\": {\"type\": \"object\", \"enabled\": False}, -> the \u201cmetadata\u201d field \n } \n}\n```\n\n\n[Elastic search analyzer](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html):\n\n\n\n```\n{ \n \"analysis\": { \n \"analyzer\": { \n \"standard_bigram_analyzer\": { \n \"type\": \"custom\", \n \"tokenizer\": \"standard\", \n \"filter\": [\"lowercase\", \"english_stop\", \"shingle\"], \n } \n }, \n \"filter\": {\"english_stop\": {\"type\": \"stop\", \"stopwords\": \"_english_\"}}, \n } \n}\n```\n\n\nAfter that, we performed [standard Elastic search search calls](https://elasticsearch-py.readthedocs.io/en/v8.2.0/api.html#elasticsearch.Elasticsearch.search) and used `max\\_rerank` to determine the number of documents to return from Elastic search.\n\n\n\nStep 2: Search\n\n\nOnce you have the candidate documents from step 1, you could just make a standard openai.Search.create or openai.Engine.search call to rerank the candidates. See [Document](#h_f6ab294756)\n\n", "title": "Search Transition Guide", "article_id": "6272952", "url": "https://help.openai.com/en/articles/6272952-search-transition-guide"} \ No newline at end of file +{"text": "Introduction\n============\n\n\n\u200bSince releasing the Search endpoint, we\u2019ve developed new methods that achieve better results for this task. As a result, we\u2019ll be removing the Search endpoint from our documentation and removing access to this endpoint for all organizations on December 3, 2022. New accounts created after June 3rd will not have access to this endpoint.\n\n\n\nWe strongly encourage developers to switch over to newer techniques which produce better results, outlined below.\n\n\n\nCurrent documentation\n---------------------\n\n\n \n\n\n \n\n\n\nOptions\n=======\n\n\nThis options are also outlined [here](https://github.com/openai/openai-cookbook/tree/main/transition_guides_for_deprecated_API_endpoints).\n\n\n\nOption 1: Transition to Embeddings-based search (recommended)\n-------------------------------------------------------------\n\n\nWe believe that most use cases will be better served by moving the underlying search system to use a vector-based embedding search. The major reason for this is that our current system used a bigram filter to narrow down the scope of candidates whereas our embeddings system has much more contextual awareness. Also, in general, using embeddings will be considerably lower cost in the long run. If you\u2019re not familiar with this, you can learn more by visiting our [guide to embeddings](https://beta.openai.com/docs/guides/embeddings/use-cases).\n\n\n\nIf you have a larger dataset (>10,000 documents), consider using a vector search engine like [Pinecone](https://www.pinecone.io) or [Weaviate](https://weaviate.io/developers/weaviate/current/retriever-vectorizer-modules/text2vec-openai.html) to power that search.\n\n\n\nOption 2: Reimplement existing functionality\n--------------------------------------------\n\n\nIf you\u2019re using the document parameter\n--------------------------------------\n\n\nThe current openai.Search.create and openai.Engine.search code can be replaced with this [snippet](https://github.com/openai/openai-cookbook/blob/main/transition_guides_for_deprecated_API_endpoints/search_functionality_example.py) (note this will only work with non-Codex engines since they use a different tokenizer.)\n\n\n\nWe plan to move this snippet into the openai-python repo under openai.Search.create\\_legacy.\n\n\n\nIf you\u2019re using the file parameter\n----------------------------------\n\n\nAs a quick review, here are the high level steps of the current Search endpoint with a file:\n\n\n\n\n![](https://openai.intercom-attachments-7.com/i/o/524222854/57382ab799ebe9bb988c0a1f/_y63ycSmtiFAS3slJdbfW0Mz-0nx2DP4gNAjyknMAmTT1fQUE9d7nha5yfsXJLkWRFmM41uvjPxi2ToSW4vrF7EcasiQDG51CrKPNOpXPVG4WZXI8jC8orWSmuGhAGGC4KoUYucwJOh0bH9Nzw)\n\n\nStep 1: upload a jsonl file\n\n\n\nBehind the scenes, we upload new files meant for file search to an Elastic search. Each line of the jsonl is then submitted as a document.\n\n\n\nEach line is required to have a \u201ctext\u201d field and an optional \u201cmetadata\u201d field.\n\n\n\nThese are the Elastic search settings and mappings for our index:\n\n\n\n[Elastic searching mapping](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html): \n\n\n\n```\n{ \n \"properties\": { \n \"document\": {\"type\": \"text\", \"analyzer\": \"standard_bigram_analyzer\"}, -> the \u201ctext\u201d field \n \"metadata\": {\"type\": \"object\", \"enabled\": False}, -> the \u201cmetadata\u201d field \n } \n}\n```\n\n\n[Elastic search analyzer](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html):\n\n\n\n```\n{ \n \"analysis\": { \n \"analyzer\": { \n \"standard_bigram_analyzer\": { \n \"type\": \"custom\", \n \"tokenizer\": \"standard\", \n \"filter\": [\"lowercase\", \"english_stop\", \"shingle\"], \n } \n }, \n \"filter\": {\"english_stop\": {\"type\": \"stop\", \"stopwords\": \"_english_\"}}, \n } \n}\n```\n\n\nAfter that, we performed [standard Elastic search search calls](https://elasticsearch-py.readthedocs.io/en/v8.2.0/api.html#elasticsearch.Elasticsearch.search) and used `max\\_rerank` to determine the number of documents to return from Elastic search.\n\n\n\nStep 2: Search\n\n\nOnce you have the candidate documents from step 1, you could just make a standard openai.Search.create or openai.Engine.search call to rerank the candidates. See [Document](#h_f6ab294756)\n\n", "title": "Search Transition Guide", "article_id": "6272952", "url": "https://help.openai.com/en/articles/6272952-search-transition-guide"} diff --git a/examples/support_bot/data/article_6338764.json b/examples/support_bot/data/article_6338764.json index bde36cdc..b1b6a9b7 100644 --- a/examples/support_bot/data/article_6338764.json +++ b/examples/support_bot/data/article_6338764.json @@ -1 +1 @@ -{"text": "Thank you for trying our generative AI tools!\n\n\n\nIn your usage, you must adhere to our [Content Policy](https://labs.openai.com/policies/content-policy):\n\n\n\n**Do not attempt to create, upload, or share images that are not G-rated or that could cause harm.**\n\n\n* **Hate:** hateful symbols, negative stereotypes, comparing certain groups to animals/objects, or otherwise expressing or promoting hate based on identity.\n* **Harassment:** mocking, threatening, or bullying an individual.\n* **Violence:** violent acts and the suffering or humiliation of others.\n* **Self-harm:** suicide, cutting, eating disorders, and other attempts at harming oneself.\n* **Sexual:** nudity, sexual acts, sexual services, or content otherwise meant to arouse sexual excitement.\n* **Shocking:** bodily fluids, obscene gestures, or other profane subjects that may shock or disgust.\n* **Illegal activity:** drug use, theft, vandalism, and other illegal activities.\n* **Deception:** major conspiracies or events related to major ongoing geopolitical events.\n* **Political:** politicians, ballot-boxes, protests, or other content that may be used to influence the political process or to campaign.\n* **Public and personal health:** the treatment, prevention, diagnosis, or transmission of diseases, or people experiencing health ailments.\n* **Spam:** unsolicited bulk content.\n\n**Don\u2019t mislead your audience about AI involvement.**\n\n\n* When sharing your work, we encourage you to proactively disclose AI involvement in your work.\n* You may remove the DALL\u00b7E signature if you wish, but you may not mislead others about the nature of the work. For example, you may not tell people that the work was entirely human generated or that the work is an unaltered photograph of a real event.\n\n**Respect the rights of others.**\n\n\n* Do not upload images of people without their consent.\n* Do not upload images to which you do not hold appropriate usage rights.\n* Do not create images of public figures.\n", "title": "Are there any restrictions to how I can use DALL\u00b7E 2? Is there a content policy?", "article_id": "6338764", "url": "https://help.openai.com/en/articles/6338764-are-there-any-restrictions-to-how-i-can-use-dall-e-2-is-there-a-content-policy"} \ No newline at end of file +{"text": "Thank you for trying our generative AI tools!\n\n\n\nIn your usage, you must adhere to our [Content Policy](https://labs.openai.com/policies/content-policy):\n\n\n\n**Do not attempt to create, upload, or share images that are not G-rated or that could cause harm.**\n\n\n* **Hate:** hateful symbols, negative stereotypes, comparing certain groups to animals/objects, or otherwise expressing or promoting hate based on identity.\n* **Harassment:** mocking, threatening, or bullying an individual.\n* **Violence:** violent acts and the suffering or humiliation of others.\n* **Self-harm:** suicide, cutting, eating disorders, and other attempts at harming oneself.\n* **Sexual:** nudity, sexual acts, sexual services, or content otherwise meant to arouse sexual excitement.\n* **Shocking:** bodily fluids, obscene gestures, or other profane subjects that may shock or disgust.\n* **Illegal activity:** drug use, theft, vandalism, and other illegal activities.\n* **Deception:** major conspiracies or events related to major ongoing geopolitical events.\n* **Political:** politicians, ballot-boxes, protests, or other content that may be used to influence the political process or to campaign.\n* **Public and personal health:** the treatment, prevention, diagnosis, or transmission of diseases, or people experiencing health ailments.\n* **Spam:** unsolicited bulk content.\n\n**Don\u2019t mislead your audience about AI involvement.**\n\n\n* When sharing your work, we encourage you to proactively disclose AI involvement in your work.\n* You may remove the DALL\u00b7E signature if you wish, but you may not mislead others about the nature of the work. For example, you may not tell people that the work was entirely human generated or that the work is an unaltered photograph of a real event.\n\n**Respect the rights of others.**\n\n\n* Do not upload images of people without their consent.\n* Do not upload images to which you do not hold appropriate usage rights.\n* Do not create images of public figures.\n", "title": "Are there any restrictions to how I can use DALL\u00b7E 2? Is there a content policy?", "article_id": "6338764", "url": "https://help.openai.com/en/articles/6338764-are-there-any-restrictions-to-how-i-can-use-dall-e-2-is-there-a-content-policy"} diff --git a/examples/support_bot/data/article_6338765.json b/examples/support_bot/data/article_6338765.json index cd4fc893..46ec8459 100644 --- a/examples/support_bot/data/article_6338765.json +++ b/examples/support_bot/data/article_6338765.json @@ -1 +1 @@ -{"text": "As we're ramping up DALL-E access, safe usage of the platform is our highest priority. Our filters aims to detect generated text that could be sensitive or unsafe. We've built the filter to err on the side of caution, so, occasionally, innocent prompts will be flagged as unsafe. \n\n\n\nAlthough suspensions are automatic, we manually review suspensions to determine whether or not it was justified. If it wasn\u2019t justified, we reinstate access right away.\n\n\n\nIf you have any questions on your usage, please see our [Content Policy](https://labs.openai.com/policies/content-policy).\n\n", "title": "I received a warning while using DALL\u00b7E 2. Will I be banned?", "article_id": "6338765", "url": "https://help.openai.com/en/articles/6338765-i-received-a-warning-while-using-dall-e-2-will-i-be-banned"} \ No newline at end of file +{"text": "As we're ramping up DALL-E access, safe usage of the platform is our highest priority. Our filters aims to detect generated text that could be sensitive or unsafe. We've built the filter to err on the side of caution, so, occasionally, innocent prompts will be flagged as unsafe. \n\n\n\nAlthough suspensions are automatic, we manually review suspensions to determine whether or not it was justified. If it wasn\u2019t justified, we reinstate access right away.\n\n\n\nIf you have any questions on your usage, please see our [Content Policy](https://labs.openai.com/policies/content-policy).\n\n", "title": "I received a warning while using DALL\u00b7E 2. Will I be banned?", "article_id": "6338765", "url": "https://help.openai.com/en/articles/6338765-i-received-a-warning-while-using-dall-e-2-will-i-be-banned"} diff --git a/examples/support_bot/data/article_6378378.json b/examples/support_bot/data/article_6378378.json index 9f4d09da..fb313158 100644 --- a/examples/support_bot/data/article_6378378.json +++ b/examples/support_bot/data/article_6378378.json @@ -1 +1 @@ -{"text": "If your account access has been deactivated, it's likely due to a violation of our [content policy](https://labs.openai.com/policies/content-policy) or [terms of use](https://labs.openai.com/policies/terms).\n\n\n\nIf you believe this happened in error, please start a conversation with us from the Messenger at the bottom right of the screen. Choose the \"DALL\u00b7E\" option, select \"Banned User Appeal\" and include a justification for why your account should be reactivated. \n\u200b\n\n", "title": "Why was my DALL\u00b7E 2 account deactivated?", "article_id": "6378378", "url": "https://help.openai.com/en/articles/6378378-why-was-my-dall-e-2-account-deactivated"} \ No newline at end of file +{"text": "If your account access has been deactivated, it's likely due to a violation of our [content policy](https://labs.openai.com/policies/content-policy) or [terms of use](https://labs.openai.com/policies/terms).\n\n\n\nIf you believe this happened in error, please start a conversation with us from the Messenger at the bottom right of the screen. Choose the \"DALL\u00b7E\" option, select \"Banned User Appeal\" and include a justification for why your account should be reactivated. \n\u200b\n\n", "title": "Why was my DALL\u00b7E 2 account deactivated?", "article_id": "6378378", "url": "https://help.openai.com/en/articles/6378378-why-was-my-dall-e-2-account-deactivated"} diff --git a/examples/support_bot/data/article_6378407.json b/examples/support_bot/data/article_6378407.json index e228a8c4..50fa85a6 100644 --- a/examples/support_bot/data/article_6378407.json +++ b/examples/support_bot/data/article_6378407.json @@ -1 +1 @@ -{"text": "\n### **Deleting your account is permanent can cannot be undone.**\n\n\n**Deleting your account will prevent you from using the account to access OpenAI services, including ChatGPT, API, and DALL\u00b7E.** You will NOT be able to create a new account using the same email address. If you delete your account, we will delete your data within 30 days, except we may retain a limited set of data for longer where required or permitted by law. \n\n\n\n**Account Deletion**\n====================\n\n\n**Option 1: Use privacy.openai.com**\n------------------------------------\n\n\nYou can submit requests to delete your account by submitting a request to \u201cdelete my data\u201d through [privacy.openai.com](https://privacy.openai.com/policies). On that page you'll click on **Make a Privacy Request** *in the top right corner:*\n\n\n\n![](https://downloads.intercomcdn.com/i/o/930061971/c44535b8da5bff44ad6d0e86/Screenshot+2024-01-10+at+11.30.49%E2%80%AFAM.png)\nThen in the popup that will appear (below) choose **Delete my OpenAI account**:\n\n\n![](https://downloads.intercomcdn.com/i/o/929930246/4ccae9023c591308b39da8ec/Screenshot+2024-01-09+at+2.56.54+PM.png)\n\n**Option 2: Self-serve**\n------------------------\n\n\n1. [Sign in to ChatGPT](https://chat.openai.com/chat)\n2. In the bottom left click on Settings\n3. Free: \n\u200b\n\n\n![](https://openai.intercom-attachments-7.com/i/o/845964781/3b22386c5e0a934e189dfbfd/8KwrupjnqkkSX2oOHiVdgbxO6yWlb7XtwZoheFdQu1PLzXgQ39gLLurIEjWvoYwVBTrttaHjnDs8GgGeXKR5PiRdp97pr54myEkfN4qhvxFWpGY_OwmGJcWRnBgta1zCw8bW8T4usNO8JBRdjXPl7gQ)\n4. Plus:\n\n\n![](https://openai.intercom-attachments-7.com/i/o/845964790/0a936cd55abd10ffc72e7314/NmprSoTHRT2_T6gfKLzcPrwhvORkEIny1Hc3tbBY0LSunDSh6zUofXEca_7ubsLqC4AcsaSpFmUE_qKgR3ZwRsF0zMLOOkk8jnM0oJn8_dJBBobh5r6tBo0tPUIVgq3_8CBNVR4Chp58RRCZ8T3tAvM)\n5. In the Settings modal click on Data controls\n\n\n![](https://openai.intercom-attachments-7.com/i/o/845964797/96de95d02407226fea1e7831/z1D7-qcFdMg-F14Oz5RAwUv0glyw2tyUtVtwYV-J-47GJ2ZrqdPaEhP4oWksdrc-DbV-EVTMyKMLgmmNrvT5ozzOZn0FZvRaIHLX8GWWov8JxPdevhqVxuRuhhVk7txi0i0Qv9DTn_ZuzZ9e8XCb0VI)\n \n\u200b\n6. Under Delete account click Delete\n\n\n\t* You may only delete your account if you have logged in within the last 10 minutes.\n\t* If you haven't logged in within the last 10 minutes then you'll see this modal where you need to refresh your login (aka sign in again)\n\n\n![](https://openai.intercom-attachments-7.com/i/o/845964809/2ec57583a8c7ba004e68842e/UWoPCqqR0iyVb83H8FbpQI5IYqIdDZZs3VAuGdNz4QKpweLHSKJDbmherTHn-PL272CZEfTHZTQCDc8j3AlkF0oGw9Z7Jmz9aG84IPyJ_Ovtg-n8IDfrwOQ0Lvwl2x18TPAzkshiibQaQkuSRbAG8SA)\n7. Confirmation modal will appear where you need to type your account email + \"DELETE\" into the input fields to unlock the \"Permanently delete my account\" button\n\n\n\n![](https://openai.intercom-attachments-7.com/i/o/845964813/b0a4ea33e195e827db5434ba/NhaR53ZYFKY8KE1414JY5Giv7nV4hen1ZSSJ-mCHBivLZHxnkbS1Uxkmxkzy7NyRkycq1L8raQ5KxlgQsuat58tW8aEkks2EvUumlDFweY1_soJg4-hg7k8EF9rQEBjo5XnebXQRVi74foWFq-iLS4Q)\n8. Once the inputs are filled out you unlock the \"Permanently delete my account\" button\n\n\n9. Click \"Permanently delete my account\" to delete your account.\n\n\n\n**Common issues**\n=================\n\n\n**Chat retention for deleted vs archived chats**\n------------------------------------------------\n\n\n**Deleted chats** are hard deleted from our systems within 30 days, unless they have been de-identified and disassociated from your account. If you have not [opted out](https://help.openai.com/en/articles/5722486-how-your-data-is-used-to-improve-model-performance), we may use these de-identified chats for training to improve model performance.\n\n\n\n**Archived chats** are retained just like your unarchived chats. Archiving a chat simply removes it from your chat history sidebar. Archived chats can be found and managed in your ChatGPT Settings.\n\n\n\nFor more see **[How chat retention works in ChatGPT](https://help.openai.com/en/articles/8809935-how-chat-retention-works-in-chatgpt).**\n\n\n\n**User content opt-out**\n------------------------\n\n\n**ChatGPT, DALL\u00b7E and our other services for individuals**\n\n\nWhen you use ChatGPT, DALL-E, and our other services for individuals, we may use the content you provide to improve model performance. Learn more about your choices on how we use your content to improve model performance [here](https://help.openai.com/en/articles/5722486-how-your-data-is-used-to-improve-model-performance). \n\n\n\n**Enterprise services (such as API and ChatGPT Enterprise)**\n\n\nOpenAI does not train on business data. Learn more about our Enterprise privacy commitments [here](https://openai.com/enterprise-privacy). \n\n\n\n**If I delete my account can I create a new account with the same email?**\n--------------------------------------------------------------------------\n\n\nNo. You cannot create a new account using the same email address.\n\n\n![](https://downloads.intercomcdn.com/i/o/925080821/de3ef0750cb15fbef5602d66/Screenshot+2024-01-04+at+10.40.29%E2%80%AFAM.png)\n**Can I reactivate my account after it's been deleted?**\n--------------------------------------------------------\n\n\nNo. But you can create a new account with a different email address.\n\n\n\nClick \u201cSign up\u201d on the [ChatGPT login page](https://chat.openai.com/auth/login) or our [API login page](https://platform.openai.com/login). There are a couple caveats of which to be mindful:\n\n\n* Email addresses: **You'll need to use a new email address**.\n\n\n\t+ Since every email address is unique per account, we require a different email address for new accounts. If you don't have an alternative email address, you can try using what's known as an email subaddress: instead of [jane@example.com](mailto:jane@example.com), try [jane+alt@example.com](mailto:jane+alt@example.com). Emails to this address should still go to the same inbox (everything after the + is typically ignored by your email provider), but we'll treat this as a unique email address.\n* Phone numbers: New accounts are still subject to our limit of [3 accounts per phone number](https://help.openai.com/articles/6613520-phone-verification-faq#h_de13bb96c0). Deleted accounts also count toward this limit. Deleting an account does not free up another spot. A phone number can only ever be used up to 3 times for verification to generate the first API key for your account on platform.openai.com.\n\n\n\t+ Phone verification is **not** required to create an OpenAI account.\n\t+ Phone verification is required for a new account to generate their first API key on platform.openai.com.\n\n**We don't support unlinking a phone number from an existing account**\n----------------------------------------------------------------------\n\n\nWe do not allow you to unlink phone numbers from existing accounts.\n\n\n\n\n**How many times can I use my phone number to create OpenAI accounts?**\n-----------------------------------------------------------------------\n\n\nA phone number can only ever be used for phone verification up to 3 times.\n\n\n\nThis means if you have 3 OpenAI accounts you can use the same number for all three when completing phone verification on each initial API key generation across those three accounts.\n\n\n\nFor anti-fraud and abuse reasons, we do **not** allow you to unlink phone numbers from OpenAI accounts to free up that number for reuse. This means deleting an OpenAI account does **not** free up the number to get around the limit. There is no workaround.\n\n\n\nSee our [Phone Verification FAQ](https://help.openai.com/en/articles/6613520-phone-verification-faq).\n\n\n\nCan I change my authentication method after account deletion?\n-------------------------------------------------------------\n\n\n\n\u26a0\ufe0f Deleting your account does **NOT** allow you to change your authentication method.\n\n\nThat said, if you originally signed up for OpenAI / ChatGPT **with an email and password** then in future logins you can choose Google/Apple login allowing users in that situation to then login either way.\n\n", "title": "How to delete your account", "article_id": "6378407", "url": "https://help.openai.com/en/articles/6378407-how-to-delete-your-account"} \ No newline at end of file +{"text": "\n### **Deleting your account is permanent can cannot be undone.**\n\n\n**Deleting your account will prevent you from using the account to access OpenAI services, including ChatGPT, API, and DALL\u00b7E.** You will NOT be able to create a new account using the same email address. If you delete your account, we will delete your data within 30 days, except we may retain a limited set of data for longer where required or permitted by law. \n\n\n\n**Account Deletion**\n====================\n\n\n**Option 1: Use privacy.openai.com**\n------------------------------------\n\n\nYou can submit requests to delete your account by submitting a request to \u201cdelete my data\u201d through [privacy.openai.com](https://privacy.openai.com/policies). On that page you'll click on **Make a Privacy Request** *in the top right corner:*\n\n\n\n![](https://downloads.intercomcdn.com/i/o/930061971/c44535b8da5bff44ad6d0e86/Screenshot+2024-01-10+at+11.30.49%E2%80%AFAM.png)\nThen in the popup that will appear (below) choose **Delete my OpenAI account**:\n\n\n![](https://downloads.intercomcdn.com/i/o/929930246/4ccae9023c591308b39da8ec/Screenshot+2024-01-09+at+2.56.54+PM.png)\n\n**Option 2: Self-serve**\n------------------------\n\n\n1. [Sign in to ChatGPT](https://chat.openai.com/chat)\n2. In the bottom left click on Settings\n3. Free: \n\u200b\n\n\n![](https://openai.intercom-attachments-7.com/i/o/845964781/3b22386c5e0a934e189dfbfd/8KwrupjnqkkSX2oOHiVdgbxO6yWlb7XtwZoheFdQu1PLzXgQ39gLLurIEjWvoYwVBTrttaHjnDs8GgGeXKR5PiRdp97pr54myEkfN4qhvxFWpGY_OwmGJcWRnBgta1zCw8bW8T4usNO8JBRdjXPl7gQ)\n4. Plus:\n\n\n![](https://openai.intercom-attachments-7.com/i/o/845964790/0a936cd55abd10ffc72e7314/NmprSoTHRT2_T6gfKLzcPrwhvORkEIny1Hc3tbBY0LSunDSh6zUofXEca_7ubsLqC4AcsaSpFmUE_qKgR3ZwRsF0zMLOOkk8jnM0oJn8_dJBBobh5r6tBo0tPUIVgq3_8CBNVR4Chp58RRCZ8T3tAvM)\n5. In the Settings modal click on Data controls\n\n\n![](https://openai.intercom-attachments-7.com/i/o/845964797/96de95d02407226fea1e7831/z1D7-qcFdMg-F14Oz5RAwUv0glyw2tyUtVtwYV-J-47GJ2ZrqdPaEhP4oWksdrc-DbV-EVTMyKMLgmmNrvT5ozzOZn0FZvRaIHLX8GWWov8JxPdevhqVxuRuhhVk7txi0i0Qv9DTn_ZuzZ9e8XCb0VI)\n \n\u200b\n6. Under Delete account click Delete\n\n\n\t* You may only delete your account if you have logged in within the last 10 minutes.\n\t* If you haven't logged in within the last 10 minutes then you'll see this modal where you need to refresh your login (aka sign in again)\n\n\n![](https://openai.intercom-attachments-7.com/i/o/845964809/2ec57583a8c7ba004e68842e/UWoPCqqR0iyVb83H8FbpQI5IYqIdDZZs3VAuGdNz4QKpweLHSKJDbmherTHn-PL272CZEfTHZTQCDc8j3AlkF0oGw9Z7Jmz9aG84IPyJ_Ovtg-n8IDfrwOQ0Lvwl2x18TPAzkshiibQaQkuSRbAG8SA)\n7. Confirmation modal will appear where you need to type your account email + \"DELETE\" into the input fields to unlock the \"Permanently delete my account\" button\n\n\n\n![](https://openai.intercom-attachments-7.com/i/o/845964813/b0a4ea33e195e827db5434ba/NhaR53ZYFKY8KE1414JY5Giv7nV4hen1ZSSJ-mCHBivLZHxnkbS1Uxkmxkzy7NyRkycq1L8raQ5KxlgQsuat58tW8aEkks2EvUumlDFweY1_soJg4-hg7k8EF9rQEBjo5XnebXQRVi74foWFq-iLS4Q)\n8. Once the inputs are filled out you unlock the \"Permanently delete my account\" button\n\n\n9. Click \"Permanently delete my account\" to delete your account.\n\n\n\n**Common issues**\n=================\n\n\n**Chat retention for deleted vs archived chats**\n------------------------------------------------\n\n\n**Deleted chats** are hard deleted from our systems within 30 days, unless they have been de-identified and disassociated from your account. If you have not [opted out](https://help.openai.com/en/articles/5722486-how-your-data-is-used-to-improve-model-performance), we may use these de-identified chats for training to improve model performance.\n\n\n\n**Archived chats** are retained just like your unarchived chats. Archiving a chat simply removes it from your chat history sidebar. Archived chats can be found and managed in your ChatGPT Settings.\n\n\n\nFor more see **[How chat retention works in ChatGPT](https://help.openai.com/en/articles/8809935-how-chat-retention-works-in-chatgpt).**\n\n\n\n**User content opt-out**\n------------------------\n\n\n**ChatGPT, DALL\u00b7E and our other services for individuals**\n\n\nWhen you use ChatGPT, DALL-E, and our other services for individuals, we may use the content you provide to improve model performance. Learn more about your choices on how we use your content to improve model performance [here](https://help.openai.com/en/articles/5722486-how-your-data-is-used-to-improve-model-performance). \n\n\n\n**Enterprise services (such as API and ChatGPT Enterprise)**\n\n\nOpenAI does not train on business data. Learn more about our Enterprise privacy commitments [here](https://openai.com/enterprise-privacy). \n\n\n\n**If I delete my account can I create a new account with the same email?**\n--------------------------------------------------------------------------\n\n\nNo. You cannot create a new account using the same email address.\n\n\n![](https://downloads.intercomcdn.com/i/o/925080821/de3ef0750cb15fbef5602d66/Screenshot+2024-01-04+at+10.40.29%E2%80%AFAM.png)\n**Can I reactivate my account after it's been deleted?**\n--------------------------------------------------------\n\n\nNo. But you can create a new account with a different email address.\n\n\n\nClick \u201cSign up\u201d on the [ChatGPT login page](https://chat.openai.com/auth/login) or our [API login page](https://platform.openai.com/login). There are a couple caveats of which to be mindful:\n\n\n* Email addresses: **You'll need to use a new email address**.\n\n\n\t+ Since every email address is unique per account, we require a different email address for new accounts. If you don't have an alternative email address, you can try using what's known as an email subaddress: instead of [jane@example.com](mailto:jane@example.com), try [jane+alt@example.com](mailto:jane+alt@example.com). Emails to this address should still go to the same inbox (everything after the + is typically ignored by your email provider), but we'll treat this as a unique email address.\n* Phone numbers: New accounts are still subject to our limit of [3 accounts per phone number](https://help.openai.com/articles/6613520-phone-verification-faq#h_de13bb96c0). Deleted accounts also count toward this limit. Deleting an account does not free up another spot. A phone number can only ever be used up to 3 times for verification to generate the first API key for your account on platform.openai.com.\n\n\n\t+ Phone verification is **not** required to create an OpenAI account.\n\t+ Phone verification is required for a new account to generate their first API key on platform.openai.com.\n\n**We don't support unlinking a phone number from an existing account**\n----------------------------------------------------------------------\n\n\nWe do not allow you to unlink phone numbers from existing accounts.\n\n\n\n\n**How many times can I use my phone number to create OpenAI accounts?**\n-----------------------------------------------------------------------\n\n\nA phone number can only ever be used for phone verification up to 3 times.\n\n\n\nThis means if you have 3 OpenAI accounts you can use the same number for all three when completing phone verification on each initial API key generation across those three accounts.\n\n\n\nFor anti-fraud and abuse reasons, we do **not** allow you to unlink phone numbers from OpenAI accounts to free up that number for reuse. This means deleting an OpenAI account does **not** free up the number to get around the limit. There is no workaround.\n\n\n\nSee our [Phone Verification FAQ](https://help.openai.com/en/articles/6613520-phone-verification-faq).\n\n\n\nCan I change my authentication method after account deletion?\n-------------------------------------------------------------\n\n\n\n\u26a0\ufe0f Deleting your account does **NOT** allow you to change your authentication method.\n\n\nThat said, if you originally signed up for OpenAI / ChatGPT **with an email and password** then in future logins you can choose Google/Apple login allowing users in that situation to then login either way.\n\n", "title": "How to delete your account", "article_id": "6378407", "url": "https://help.openai.com/en/articles/6378407-how-to-delete-your-account"} diff --git a/examples/support_bot/data/article_6399305.json b/examples/support_bot/data/article_6399305.json index b90ae739..d7e0c12f 100644 --- a/examples/support_bot/data/article_6399305.json +++ b/examples/support_bot/data/article_6399305.json @@ -1 +1 @@ -{"text": "`\ud83d\udca1Note: DALL\u00b7E API is billed separately from labs.openai.com. Credits granted/purchased on labs.openai.com do not apply to DALL\u00b7E API. For the latest information on DALL\u00b7E API pricing, please see our [pricing page](https://openai.com/api/pricing).`\n\n\n\n**What\u2019s a DALL\u00b7E Credit?**\n\n\n* You can use a DALL\u00b7E credit for a single request at labs.openai.com: generating images through a text prompt, an edit request, or a variation request.\n* Credits are deducted only for requests that return generations, so they won\u2019t be deducted for content policy warnings and system errors.\n\n**What are free credits?**\n\n\n* Free credits are available to early adopters who signed up to use DALL\u00b7E before April 6, 2023\n* They expire one month after they are granted.\n* Free credits replenish monthly.\n\n\n\t+ For example, if you received credits on August 3rd, your free credits will refill on September 3rd.\n\t+ If you joined on the 29th, 30th, or 31st of any month, your free credits will refill on the 28th of every month.\n\n**How do I buy DALL\u00b7E credits?**\n\n\n* You can buy DALL-E credits by using the \u201cBuy Credits\u201d button in your account page, or in the profile photo dropdown menu.\n\n**How do DALL\u00b7E credits work if I belong to a multi-person organization account?**\n\n\n* Both free and paid credits are shared within each org.\n* Only the owners of an org account can buy credits for the org.\n\n**What are the differences between free and paid credits?**\n\n\n* Free credits expire one month after they were granted, and paid credits expire 12 months from the date of purchase.\n* You currently get the same set of rights (including commercial use), regardless of whether an image was generated through a free or paid credit. \n\u200b\n", "title": "How DALL\u00b7E Credits Work", "article_id": "6399305", "url": "https://help.openai.com/en/articles/6399305-how-dall-e-credits-work"} \ No newline at end of file +{"text": "`\ud83d\udca1Note: DALL\u00b7E API is billed separately from labs.openai.com. Credits granted/purchased on labs.openai.com do not apply to DALL\u00b7E API. For the latest information on DALL\u00b7E API pricing, please see our [pricing page](https://openai.com/api/pricing).`\n\n\n\n**What\u2019s a DALL\u00b7E Credit?**\n\n\n* You can use a DALL\u00b7E credit for a single request at labs.openai.com: generating images through a text prompt, an edit request, or a variation request.\n* Credits are deducted only for requests that return generations, so they won\u2019t be deducted for content policy warnings and system errors.\n\n**What are free credits?**\n\n\n* Free credits are available to early adopters who signed up to use DALL\u00b7E before April 6, 2023\n* They expire one month after they are granted.\n* Free credits replenish monthly.\n\n\n\t+ For example, if you received credits on August 3rd, your free credits will refill on September 3rd.\n\t+ If you joined on the 29th, 30th, or 31st of any month, your free credits will refill on the 28th of every month.\n\n**How do I buy DALL\u00b7E credits?**\n\n\n* You can buy DALL-E credits by using the \u201cBuy Credits\u201d button in your account page, or in the profile photo dropdown menu.\n\n**How do DALL\u00b7E credits work if I belong to a multi-person organization account?**\n\n\n* Both free and paid credits are shared within each org.\n* Only the owners of an org account can buy credits for the org.\n\n**What are the differences between free and paid credits?**\n\n\n* Free credits expire one month after they were granted, and paid credits expire 12 months from the date of purchase.\n* You currently get the same set of rights (including commercial use), regardless of whether an image was generated through a free or paid credit. \n\u200b\n", "title": "How DALL\u00b7E Credits Work", "article_id": "6399305", "url": "https://help.openai.com/en/articles/6399305-how-dall-e-credits-work"} diff --git a/examples/support_bot/data/article_6402865.json b/examples/support_bot/data/article_6402865.json index 9d75b820..edd6842b 100644 --- a/examples/support_bot/data/article_6402865.json +++ b/examples/support_bot/data/article_6402865.json @@ -1 +1 @@ -{"text": "Yes! Please check out our [DALL\u00b7E API FAQ](https://help.openai.com/en/articles/6705023) for information about the API.\n\n", "title": "Is DALL\u00b7E available through an API?", "article_id": "6402865", "url": "https://help.openai.com/en/articles/6402865-is-dall-e-available-through-an-api"} \ No newline at end of file +{"text": "Yes! Please check out our [DALL\u00b7E API FAQ](https://help.openai.com/en/articles/6705023) for information about the API.\n\n", "title": "Is DALL\u00b7E available through an API?", "article_id": "6402865", "url": "https://help.openai.com/en/articles/6402865-is-dall-e-available-through-an-api"} diff --git a/examples/support_bot/data/article_6425277.json b/examples/support_bot/data/article_6425277.json index beeaf5b3..1cc63d8e 100644 --- a/examples/support_bot/data/article_6425277.json +++ b/examples/support_bot/data/article_6425277.json @@ -1 +1 @@ -{"text": "Subject to the [Content Policy](https://labs.openai.com/policies/content-policy) and [Terms](https://openai.com/api/policies/terms/), you own the images you create with DALL\u00b7E, including the right to reprint, sell, and merchandise \u2013 regardless of whether an image was generated through a free or paid credit.\n\n", "title": "Can I sell images I create with DALL\u00b7E?", "article_id": "6425277", "url": "https://help.openai.com/en/articles/6425277-can-i-sell-images-i-create-with-dall-e"} \ No newline at end of file +{"text": "Subject to the [Content Policy](https://labs.openai.com/policies/content-policy) and [Terms](https://openai.com/api/policies/terms/), you own the images you create with DALL\u00b7E, including the right to reprint, sell, and merchandise \u2013 regardless of whether an image was generated through a free or paid credit.\n\n", "title": "Can I sell images I create with DALL\u00b7E?", "article_id": "6425277", "url": "https://help.openai.com/en/articles/6425277-can-i-sell-images-i-create-with-dall-e"} diff --git a/examples/support_bot/data/article_6431339.json b/examples/support_bot/data/article_6431339.json index b14e61c9..f923ff2a 100644 --- a/examples/support_bot/data/article_6431339.json +++ b/examples/support_bot/data/article_6431339.json @@ -1 +1 @@ -{"text": "You can login to access DALL\u00b7E 2 by using the button below.\n\n\n\n[Login to DALL\u00b7E 2](http://labs.openai.com/auth/login)\n", "title": "Where can I access DALL\u00b7E 2?", "article_id": "6431339", "url": "https://help.openai.com/en/articles/6431339-where-can-i-access-dall-e-2"} \ No newline at end of file +{"text": "You can login to access DALL\u00b7E 2 by using the button below.\n\n\n\n[Login to DALL\u00b7E 2](http://labs.openai.com/auth/login)\n", "title": "Where can I access DALL\u00b7E 2?", "article_id": "6431339", "url": "https://help.openai.com/en/articles/6431339-where-can-i-access-dall-e-2"} diff --git a/examples/support_bot/data/article_6431922.json b/examples/support_bot/data/article_6431922.json index efc6ecdb..358b28ab 100644 --- a/examples/support_bot/data/article_6431922.json +++ b/examples/support_bot/data/article_6431922.json @@ -1 +1 @@ -{"text": "Unfortunately, it's not currently possible to change the email address or the sign-in method associated with your account for DALL\u2022E 2. You will need to continue using the same email address to login.\n\n", "title": "Can I change the email address I use to sign-in to DALL\u2022E 2?", "article_id": "6431922", "url": "https://help.openai.com/en/articles/6431922-can-i-change-the-email-address-i-use-to-sign-in-to-dall-e-2"} \ No newline at end of file +{"text": "Unfortunately, it's not currently possible to change the email address or the sign-in method associated with your account for DALL\u2022E 2. You will need to continue using the same email address to login.\n\n", "title": "Can I change the email address I use to sign-in to DALL\u2022E 2?", "article_id": "6431922", "url": "https://help.openai.com/en/articles/6431922-can-i-change-the-email-address-i-use-to-sign-in-to-dall-e-2"} diff --git a/examples/support_bot/data/article_6468065.json b/examples/support_bot/data/article_6468065.json index c67ce54e..7d37299d 100644 --- a/examples/support_bot/data/article_6468065.json +++ b/examples/support_bot/data/article_6468065.json @@ -1 +1 @@ -{"text": "**Commercialization Questions**\n===============================\n\n\n* **Can I use DALL\u00b7E for commercial uses, including NFTs and freelancing?** \nYes.\n* **Can I sell DALL\u00b7E generations I created during the research preview?** \nYes.\n* **Can I remove the watermark?** \nYes.\n* **Are alternate payment options available?** \nAt this time, we only accept payment via credit card.\n* **Where can I see how many credits I have?** \nYou can see your credit amount by going to [labs.openai.com/account](https://labs.openai.com/account) or by selecting your icon in the top right corner.\n\n\n\nNote: DALL\u00b7E API is billed separately from labs.openai.com. Credits granted/purchased on labs.openai.com do not apply to DALL\u00b7E API. For the latest information on DALL\u00b7E API pricing, please see our [pricing page](https://openai.com/api/pricing).\n* **Do credits roll over month to month?** \nFree credits do not roll over month to month; please see \"[How DALL\u2022E Credits Work](https://help.openai.com/en/articles/6399305-how-dall-e-credits-work)\" for details.\n\n\n**Product Questions**\n=====================\n\n\n* **Why are parts of my images cropped?** \nIn its current version, DALL**\u00b7**E can only produce images in a square.\n* **Can DALL\u00b7E transform the style of my image into another style?** \nWe currently don't support transforming the style of an image into another style. However, you can edit parts of a generated image and recreate them in a style you define in the prompt.\n* **Is DALL\u00b7E available through an API?** \nYes! Please see the [Image Generation guide](https://beta.openai.com/docs/guides/images/introduction) to learn more.\n* **Now that the credit system is in place is there still a 50-image per day limit?** \nNo, there's no longer a 50-image per day limit.\n\n\n**Policy Questions**\n====================\n\n\n* **Why did I receive a content filter warning?**\n\n\nOur filter aims to detect generated text that could be sensitive or unsafe. The filter will make mistakes and we have currently built it to err on the side of caution, thus, resulting in more false positives. We're working on improving our filters, so this should become less of an issue in the future.\n", "title": "DALL\u00b7E - Content Policy FAQ", "article_id": "6468065", "url": "https://help.openai.com/en/articles/6468065-dall-e-content-policy-faq"} \ No newline at end of file +{"text": "**Commercialization Questions**\n===============================\n\n\n* **Can I use DALL\u00b7E for commercial uses, including NFTs and freelancing?** \nYes.\n* **Can I sell DALL\u00b7E generations I created during the research preview?** \nYes.\n* **Can I remove the watermark?** \nYes.\n* **Are alternate payment options available?** \nAt this time, we only accept payment via credit card.\n* **Where can I see how many credits I have?** \nYou can see your credit amount by going to [labs.openai.com/account](https://labs.openai.com/account) or by selecting your icon in the top right corner.\n\n\n\nNote: DALL\u00b7E API is billed separately from labs.openai.com. Credits granted/purchased on labs.openai.com do not apply to DALL\u00b7E API. For the latest information on DALL\u00b7E API pricing, please see our [pricing page](https://openai.com/api/pricing).\n* **Do credits roll over month to month?** \nFree credits do not roll over month to month; please see \"[How DALL\u2022E Credits Work](https://help.openai.com/en/articles/6399305-how-dall-e-credits-work)\" for details.\n\n\n**Product Questions**\n=====================\n\n\n* **Why are parts of my images cropped?** \nIn its current version, DALL**\u00b7**E can only produce images in a square.\n* **Can DALL\u00b7E transform the style of my image into another style?** \nWe currently don't support transforming the style of an image into another style. However, you can edit parts of a generated image and recreate them in a style you define in the prompt.\n* **Is DALL\u00b7E available through an API?** \nYes! Please see the [Image Generation guide](https://beta.openai.com/docs/guides/images/introduction) to learn more.\n* **Now that the credit system is in place is there still a 50-image per day limit?** \nNo, there's no longer a 50-image per day limit.\n\n\n**Policy Questions**\n====================\n\n\n* **Why did I receive a content filter warning?**\n\n\nOur filter aims to detect generated text that could be sensitive or unsafe. The filter will make mistakes and we have currently built it to err on the side of caution, thus, resulting in more false positives. We're working on improving our filters, so this should become less of an issue in the future.\n", "title": "DALL\u00b7E - Content Policy FAQ", "article_id": "6468065", "url": "https://help.openai.com/en/articles/6468065-dall-e-content-policy-faq"} diff --git a/examples/support_bot/data/article_6485334.json b/examples/support_bot/data/article_6485334.json index f9538a8b..ded5d373 100644 --- a/examples/support_bot/data/article_6485334.json +++ b/examples/support_bot/data/article_6485334.json @@ -1 +1 @@ -{"text": "\nThis article reflects a historical pricing update, please visit openai.com/api/pricing for the most up-to-date pricing\n\n\n\n\n---\n\n**1. What are the pricing changes?**\n\n\nWe\u2019re reducing the price per token for our standard GPT-3 and Embeddings models. Fine-tuned models are not affected. For details on this change, please see our pricing page: \n\n\n\n\n| | | |\n| --- | --- | --- |\n| **MODEL** | **BEFORE** | **ON SEPT 1** |\n| Davinci | $0.06 / 1k tokens | $0.02 / 1k tokens |\n| Curie | $0.006 / 1k tokens | $0.002 / 1k tokens |\n| Babbage | $0.0012 / 1k tokens | $0.0005 / 1k tokens |\n| Ada | $0.0008 / 1k tokens | $0.0004 / 1k tokens |\n| Davinci Embeddings | $0.6 / 1k tokens | $0.2 / 1k tokens |\n| Curie Embeddings | $0.06 / 1k tokens | $0.02 / 1k tokens |\n| Babbage Embeddings | $0.012 / 1k tokens | $0.005 / 1k tokens |\n| Ada Embeddings | $0.008 / 1k tokens | $0.004 / 1k tokens |\n\n**2.** **When will this price reduction take effect?**\n\n\nThese changes will take effect on September 1, 2022 00:00:00 UTC.\n\n\n\n**3. What led you to drop the prices?**\n\n\nWe have been looking forward to reducing pricing for a long time. Our teams have made incredible progress in making our models more efficient to run, which has reduced the cost it takes to serve them, and we are now passing these savings along to our customers.\n\n\n\n**4. Which models are affected by this change?**\n\n\nThe change affects our standard GPT-3 and Embeddings models. Fine-tuned models are not affected. As of August 2022, these models include:\n\n\n* text-davinci-002\n* text-curie-001\n* text-babbage-001\n* text-ada-001\n* davinci\n* curie\n* babbage\n* ada\n* text-similarity-ada-001\n* text-similarity-babbage-001\n* text-similarity-curie-001\n* text-similarity-davinci-001\n* text-search-ada-doc-001\n* text-search-ada-query-001\n* text-search-babbage-doc-001\n* text-search-babbage-query-001\n* text-search-curie-doc-001\n* text-search-curie-query-001\n* text-search-davinci-doc-001\n* text-search-davinci-query-001\n* code-search-ada-code-001\n* code-search-ada-text-001\n* code-search-babbage-code-001\n* code-search-babbage-text-001\n\n\n**5. Can I get a refund for my previous usage?** \n\n\nOur new pricing is effective September 1, 2022 00:00:00 UTC. We will not be issuing refunds.\n\n\n\n**6. How does it affect my existing usage limits this month?** \n\n\nThis change will not change the soft or hard usage limits configured on your account. If you would like to change your usage limits, you can adjust them anytime in your [account settings](https://beta.openai.com/account/billing/limits).\n\n\n\n**7. Are the changes going to be reflected on the October bill?**\n\n\nChanges will be reflected on the September invoice which will be issued in October. You will also be able to see the changes in the usage panel in your account settings on September 1st.\n\n\n\nIf you have any other questions about the pricing update - please log into your account and start a new conversation using the on-site chat tool.\n\n\n", "title": "September 2022 - OpenAI API Pricing Update FAQ", "article_id": "6485334", "url": "https://help.openai.com/en/articles/6485334-september-2022-openai-api-pricing-update-faq"} \ No newline at end of file +{"text": "\nThis article reflects a historical pricing update, please visit openai.com/api/pricing for the most up-to-date pricing\n\n\n\n\n---\n\n**1. What are the pricing changes?**\n\n\nWe\u2019re reducing the price per token for our standard GPT-3 and Embeddings models. Fine-tuned models are not affected. For details on this change, please see our pricing page: \n\n\n\n\n| | | |\n| --- | --- | --- |\n| **MODEL** | **BEFORE** | **ON SEPT 1** |\n| Davinci | $0.06 / 1k tokens | $0.02 / 1k tokens |\n| Curie | $0.006 / 1k tokens | $0.002 / 1k tokens |\n| Babbage | $0.0012 / 1k tokens | $0.0005 / 1k tokens |\n| Ada | $0.0008 / 1k tokens | $0.0004 / 1k tokens |\n| Davinci Embeddings | $0.6 / 1k tokens | $0.2 / 1k tokens |\n| Curie Embeddings | $0.06 / 1k tokens | $0.02 / 1k tokens |\n| Babbage Embeddings | $0.012 / 1k tokens | $0.005 / 1k tokens |\n| Ada Embeddings | $0.008 / 1k tokens | $0.004 / 1k tokens |\n\n**2.** **When will this price reduction take effect?**\n\n\nThese changes will take effect on September 1, 2022 00:00:00 UTC.\n\n\n\n**3. What led you to drop the prices?**\n\n\nWe have been looking forward to reducing pricing for a long time. Our teams have made incredible progress in making our models more efficient to run, which has reduced the cost it takes to serve them, and we are now passing these savings along to our customers.\n\n\n\n**4. Which models are affected by this change?**\n\n\nThe change affects our standard GPT-3 and Embeddings models. Fine-tuned models are not affected. As of August 2022, these models include:\n\n\n* text-davinci-002\n* text-curie-001\n* text-babbage-001\n* text-ada-001\n* davinci\n* curie\n* babbage\n* ada\n* text-similarity-ada-001\n* text-similarity-babbage-001\n* text-similarity-curie-001\n* text-similarity-davinci-001\n* text-search-ada-doc-001\n* text-search-ada-query-001\n* text-search-babbage-doc-001\n* text-search-babbage-query-001\n* text-search-curie-doc-001\n* text-search-curie-query-001\n* text-search-davinci-doc-001\n* text-search-davinci-query-001\n* code-search-ada-code-001\n* code-search-ada-text-001\n* code-search-babbage-code-001\n* code-search-babbage-text-001\n\n\n**5. Can I get a refund for my previous usage?** \n\n\nOur new pricing is effective September 1, 2022 00:00:00 UTC. We will not be issuing refunds.\n\n\n\n**6. How does it affect my existing usage limits this month?** \n\n\nThis change will not change the soft or hard usage limits configured on your account. If you would like to change your usage limits, you can adjust them anytime in your [account settings](https://beta.openai.com/account/billing/limits).\n\n\n\n**7. Are the changes going to be reflected on the October bill?**\n\n\nChanges will be reflected on the September invoice which will be issued in October. You will also be able to see the changes in the usage panel in your account settings on September 1st.\n\n\n\nIf you have any other questions about the pricing update - please log into your account and start a new conversation using the on-site chat tool.\n\n\n", "title": "September 2022 - OpenAI API Pricing Update FAQ", "article_id": "6485334", "url": "https://help.openai.com/en/articles/6485334-september-2022-openai-api-pricing-update-faq"} diff --git a/examples/support_bot/data/article_6503842.json b/examples/support_bot/data/article_6503842.json index 71710689..5178bc8f 100644 --- a/examples/support_bot/data/article_6503842.json +++ b/examples/support_bot/data/article_6503842.json @@ -1 +1 @@ -{"text": "The Content filter preferences can be found in the [Playground](https://beta.openai.com/playground) page underneath the \"...\" menu button. \n\u200b\n\n\n![](https://downloads.intercomcdn.com/i/o/569474034/375e088de97e9823f528a1ec/image.png) \nOnce opened you can toggle the settings on and off to stop the warning message from showing. \n\u200b\n\n\n![](https://downloads.intercomcdn.com/i/o/569474316/c0433ad29b7c3a86c96e97c5/image.png)Please note, that although the warnings will no longer show the OpenAI [content policy](https://beta.openai.com/docs/usage-guidelines/content-policy) is still in effect.\n\n", "title": "How can I deactivate the content filter in the Playground?", "article_id": "6503842", "url": "https://help.openai.com/en/articles/6503842-how-can-i-deactivate-the-content-filter-in-the-playground"} \ No newline at end of file +{"text": "The Content filter preferences can be found in the [Playground](https://beta.openai.com/playground) page underneath the \"...\" menu button. \n\u200b\n\n\n![](https://downloads.intercomcdn.com/i/o/569474034/375e088de97e9823f528a1ec/image.png) \nOnce opened you can toggle the settings on and off to stop the warning message from showing. \n\u200b\n\n\n![](https://downloads.intercomcdn.com/i/o/569474316/c0433ad29b7c3a86c96e97c5/image.png)Please note, that although the warnings will no longer show the OpenAI [content policy](https://beta.openai.com/docs/usage-guidelines/content-policy) is still in effect.\n\n", "title": "How can I deactivate the content filter in the Playground?", "article_id": "6503842", "url": "https://help.openai.com/en/articles/6503842-how-can-i-deactivate-the-content-filter-in-the-playground"} diff --git a/examples/support_bot/data/article_6516417.json b/examples/support_bot/data/article_6516417.json index 76da49d2..e6c02870 100644 --- a/examples/support_bot/data/article_6516417.json +++ b/examples/support_bot/data/article_6516417.json @@ -1 +1 @@ -{"text": "The DALL\u00b7E editor interface helps you edit images through inpainting and outpainting, giving you more control over your creative vision.\n\n\n\n![](https://downloads.intercomcdn.com/i/o/571871271/eb4c662a2316d5cf2f753c60/Screen+Shot+2022-08-30+at+2.40.28+PM.png)The editor interface is in beta \u2013 there are a number of things to keep in mind while using this interface:\n\n\n* The newest editor experience is only available on desktop at the moment, we'll be rolling out these features to smaller screens in the coming months.\n* Expanded images are not currently saved automatically, make sure to download your incremental work often to avoid losing anything.\n* You cannot yet save expanded images to a collection or view the full image in your history, but\u00a0we hope to add this soon.\n* For very large images, your browser may experience lag while downloading. Make sure to download often to avoid losing work due to browser freezes!\n\nThe FAQ below will help you learn how to get the most out of these new tools:\n\n\n\nHow do I access the DALL\u00b7E editor?\n==================================\n\n\nOnce you're logged in on a desktop device, you can launch the editor in two ways:\n\n\n* **Start with an image**: From any image on the DALL-E website, you can click the \"Edit\" button to drop into an editor with that image as the starting point.\n* **Start with a blank canvas:** If you'd prefer to start from scratch, you can bookmark and use the following URL: https://labs.openai.com/editor\n\nWhile users on mobile devices don't have access to advanced editor features like outpainting, you can still inpaint images by tapping \"Edit\" on an existing image you've generated or uploaded.\n\n\n\nHow much does usage of the DALL\u00b7E editor cost?\n==============================================\n\n\nLike DALL\u00b7E's other functionality, each prompt you submit by clicking the \"Generate\" button will deduct one credit from your credit balance (regardless of how many pixels you are filling in).\n\n\n\nYou can always purchase additional credits from the user dropdown at the top right of the application.\n\n\n\nHow do I use the editor most effectively?\n=========================================\n\n\nThe **Generation frame** contains the image context that the model will see when you submit a text prompt, so make sure that it contains enough useful context for the area you are expanding into, otherwise the style may drift from the rest of your image.\n\n\n\n![](https://downloads.intercomcdn.com/i/o/571876595/9e431c455e24421079bee9d3/Screen+Shot+2022-08-30+at+2.55.38+PM.png)You can simultaneously **Erase** parts of your image to touch up or replace certain areas, and perfect the finer details.\n\n\n\nYou can also **Upload** existing images, optionally resize them, and then place them within the canvas to bring additional imagery into the scene. This is a powerful feature that enables you to fuse images together, connect opposite ends of an image for loops, and \"uncrop\" images that you can combine with other tooling to create recursively expanding animations.\n\n\n\nThe **Download** tool will export the latest state of the artwork as .png file. We recommend downloading often to keep snapshots of your work. You can always re-upload previous snapshots to continue where you left off.\n\n\n\nWhat keyboard shortcuts are supported?\n======================================\n\n\nThe editor supports keyboard shortcuts for zooming, switching tools, undo/redo, and more. Press **?** while using the editor to show the full list of keyboard shortcuts.\n\n\n\nAre there any other tips & tricks to be aware of?\n=================================================\n\n\n* Start with the character before the landscape, if there are characters involved, so you can get the body morphology right before filling the rest.\n* Make sure you're keeping enough of the existing image in the generation frame to avoid the style drifting too much.\n* Ask DALL\u00b7E for a muted color palette, especially as you stray further from the center, to avoid oversaturation and color-blasting.\n* Consider what story you\u2019re trying to tell when picking the direction you want to expand the image into.\n\n\n\n", "title": "DALL\u00b7E Editor Guide", "article_id": "6516417", "url": "https://help.openai.com/en/articles/6516417-dall-e-editor-guide"} \ No newline at end of file +{"text": "The DALL\u00b7E editor interface helps you edit images through inpainting and outpainting, giving you more control over your creative vision.\n\n\n\n![](https://downloads.intercomcdn.com/i/o/571871271/eb4c662a2316d5cf2f753c60/Screen+Shot+2022-08-30+at+2.40.28+PM.png)The editor interface is in beta \u2013 there are a number of things to keep in mind while using this interface:\n\n\n* The newest editor experience is only available on desktop at the moment, we'll be rolling out these features to smaller screens in the coming months.\n* Expanded images are not currently saved automatically, make sure to download your incremental work often to avoid losing anything.\n* You cannot yet save expanded images to a collection or view the full image in your history, but\u00a0we hope to add this soon.\n* For very large images, your browser may experience lag while downloading. Make sure to download often to avoid losing work due to browser freezes!\n\nThe FAQ below will help you learn how to get the most out of these new tools:\n\n\n\nHow do I access the DALL\u00b7E editor?\n==================================\n\n\nOnce you're logged in on a desktop device, you can launch the editor in two ways:\n\n\n* **Start with an image**: From any image on the DALL-E website, you can click the \"Edit\" button to drop into an editor with that image as the starting point.\n* **Start with a blank canvas:** If you'd prefer to start from scratch, you can bookmark and use the following URL: https://labs.openai.com/editor\n\nWhile users on mobile devices don't have access to advanced editor features like outpainting, you can still inpaint images by tapping \"Edit\" on an existing image you've generated or uploaded.\n\n\n\nHow much does usage of the DALL\u00b7E editor cost?\n==============================================\n\n\nLike DALL\u00b7E's other functionality, each prompt you submit by clicking the \"Generate\" button will deduct one credit from your credit balance (regardless of how many pixels you are filling in).\n\n\n\nYou can always purchase additional credits from the user dropdown at the top right of the application.\n\n\n\nHow do I use the editor most effectively?\n=========================================\n\n\nThe **Generation frame** contains the image context that the model will see when you submit a text prompt, so make sure that it contains enough useful context for the area you are expanding into, otherwise the style may drift from the rest of your image.\n\n\n\n![](https://downloads.intercomcdn.com/i/o/571876595/9e431c455e24421079bee9d3/Screen+Shot+2022-08-30+at+2.55.38+PM.png)You can simultaneously **Erase** parts of your image to touch up or replace certain areas, and perfect the finer details.\n\n\n\nYou can also **Upload** existing images, optionally resize them, and then place them within the canvas to bring additional imagery into the scene. This is a powerful feature that enables you to fuse images together, connect opposite ends of an image for loops, and \"uncrop\" images that you can combine with other tooling to create recursively expanding animations.\n\n\n\nThe **Download** tool will export the latest state of the artwork as .png file. We recommend downloading often to keep snapshots of your work. You can always re-upload previous snapshots to continue where you left off.\n\n\n\nWhat keyboard shortcuts are supported?\n======================================\n\n\nThe editor supports keyboard shortcuts for zooming, switching tools, undo/redo, and more. Press **?** while using the editor to show the full list of keyboard shortcuts.\n\n\n\nAre there any other tips & tricks to be aware of?\n=================================================\n\n\n* Start with the character before the landscape, if there are characters involved, so you can get the body morphology right before filling the rest.\n* Make sure you're keeping enough of the existing image in the generation frame to avoid the style drifting too much.\n* Ask DALL\u00b7E for a muted color palette, especially as you stray further from the center, to avoid oversaturation and color-blasting.\n* Consider what story you\u2019re trying to tell when picking the direction you want to expand the image into.\n\n\n\n", "title": "DALL\u00b7E Editor Guide", "article_id": "6516417", "url": "https://help.openai.com/en/articles/6516417-dall-e-editor-guide"} diff --git a/examples/support_bot/data/article_6582257.json b/examples/support_bot/data/article_6582257.json index 7c198dc2..3e5dfb33 100644 --- a/examples/support_bot/data/article_6582257.json +++ b/examples/support_bot/data/article_6582257.json @@ -1 +1 @@ -{"text": "We want to assure you that you won't be penalized for a failed generation. You won't be charged a credit if DALL\u00b7E 2 is unable to successfully generate an image based on your request. \n\n\n\nWe understand that not every request will be successful, and we don't want to punish our users for that. So rest assured, you can keep trying different requests without worrying about wasting your credits on failed generations.\n\n\n\nYou're only charged for successful requests. If you're looking for your generation history, you can find them on your [\"My Collection\"](https://labs.openai.com/collection) page.\n\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n\n", "title": "Am I charged for a credit when my generation fails?", "article_id": "6582257", "url": "https://help.openai.com/en/articles/6582257-am-i-charged-for-a-credit-when-my-generation-fails"} \ No newline at end of file +{"text": "We want to assure you that you won't be penalized for a failed generation. You won't be charged a credit if DALL\u00b7E 2 is unable to successfully generate an image based on your request. \n\n\n\nWe understand that not every request will be successful, and we don't want to punish our users for that. So rest assured, you can keep trying different requests without worrying about wasting your credits on failed generations.\n\n\n\nYou're only charged for successful requests. If you're looking for your generation history, you can find them on your [\"My Collection\"](https://labs.openai.com/collection) page.\n\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n\n", "title": "Am I charged for a credit when my generation fails?", "article_id": "6582257", "url": "https://help.openai.com/en/articles/6582257-am-i-charged-for-a-credit-when-my-generation-fails"} diff --git a/examples/support_bot/data/article_6582391.json b/examples/support_bot/data/article_6582391.json index c987ba50..a6126507 100644 --- a/examples/support_bot/data/article_6582391.json +++ b/examples/support_bot/data/article_6582391.json @@ -1 +1 @@ -{"text": "While DALL\u00b7E is continually evolving and improving, there are a few things you can do to improve your images right now.\n\n\n\nFor discovering how you can design the best prompts for DALL\u00b7E, or find out best practices for processing images, we currently recommend:\n\n\n* [Guy Parsons' DALL\u00b7E 2 Prompt Book](https://dallery.gallery/the-dalle-2-prompt-book/) for guidance on designing the best prompts.\n* [Joining our Discord server](https://discord.com/invite/openai) and engaging with the community in channels such as #tips-and-tricks, #prompt-help, and #questions can be a great way to get advice and feedback from other users\n\nIf you'd like to learn more about the new Outpainting feature, check out our DALL\u00b7E Editor Guide!\n\n\n[DALL\u00b7E Editor Guide](https://help.openai.com/en/articles/6516417-dall-e-editor-guide)\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n\n", "title": "How can I improve my prompts with DALL\u00b7E?", "article_id": "6582391", "url": "https://help.openai.com/en/articles/6582391-how-can-i-improve-my-prompts-with-dall-e"} \ No newline at end of file +{"text": "While DALL\u00b7E is continually evolving and improving, there are a few things you can do to improve your images right now.\n\n\n\nFor discovering how you can design the best prompts for DALL\u00b7E, or find out best practices for processing images, we currently recommend:\n\n\n* [Guy Parsons' DALL\u00b7E 2 Prompt Book](https://dallery.gallery/the-dalle-2-prompt-book/) for guidance on designing the best prompts.\n* [Joining our Discord server](https://discord.com/invite/openai) and engaging with the community in channels such as #tips-and-tricks, #prompt-help, and #questions can be a great way to get advice and feedback from other users\n\nIf you'd like to learn more about the new Outpainting feature, check out our DALL\u00b7E Editor Guide!\n\n\n[DALL\u00b7E Editor Guide](https://help.openai.com/en/articles/6516417-dall-e-editor-guide)\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n\n", "title": "How can I improve my prompts with DALL\u00b7E?", "article_id": "6582391", "url": "https://help.openai.com/en/articles/6582391-how-can-i-improve-my-prompts-with-dall-e"} diff --git a/examples/support_bot/data/article_6584194.json b/examples/support_bot/data/article_6584194.json index 3a7cd6b8..efa17429 100644 --- a/examples/support_bot/data/article_6584194.json +++ b/examples/support_bot/data/article_6584194.json @@ -1 +1 @@ -{"text": "When you have both free and paid credits in your account, our system will automatically use the credits that are going to expire first. In most cases, this will be your free credits.\n\n\n\nHowever, if you have paid credits that are expiring sooner than your free credits, those will be used first. Keep in mind that paid credits typically expire in one year, while free credits typically expire within a month.\n\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n\n\n", "title": "How do my free and paid credits get used?", "article_id": "6584194", "url": "https://help.openai.com/en/articles/6584194-how-do-my-free-and-paid-credits-get-used"} \ No newline at end of file +{"text": "When you have both free and paid credits in your account, our system will automatically use the credits that are going to expire first. In most cases, this will be your free credits.\n\n\n\nHowever, if you have paid credits that are expiring sooner than your free credits, those will be used first. Keep in mind that paid credits typically expire in one year, while free credits typically expire within a month.\n\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n\n\n", "title": "How do my free and paid credits get used?", "article_id": "6584194", "url": "https://help.openai.com/en/articles/6584194-how-do-my-free-and-paid-credits-get-used"} diff --git a/examples/support_bot/data/article_6584249.json b/examples/support_bot/data/article_6584249.json index a097ee24..784617e5 100644 --- a/examples/support_bot/data/article_6584249.json +++ b/examples/support_bot/data/article_6584249.json @@ -1 +1 @@ -{"text": "Every generation you create is automatically saved in the 'All generations' tab in '[My Collection](https://labs.openai.com/collection).' You can find past generations there, as well as your saved generations in the 'Favorites' tab.\n\n\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n", "title": "Where can I find my old and/or saved generations?", "article_id": "6584249", "url": "https://help.openai.com/en/articles/6584249-where-can-i-find-my-old-and-or-saved-generations"} \ No newline at end of file +{"text": "Every generation you create is automatically saved in the 'All generations' tab in '[My Collection](https://labs.openai.com/collection).' You can find past generations there, as well as your saved generations in the 'Favorites' tab.\n\n\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n", "title": "Where can I find my old and/or saved generations?", "article_id": "6584249", "url": "https://help.openai.com/en/articles/6584249-where-can-i-find-my-old-and-or-saved-generations"} diff --git a/examples/support_bot/data/article_6613520.json b/examples/support_bot/data/article_6613520.json index 39d24447..9f3c1fed 100644 --- a/examples/support_bot/data/article_6613520.json +++ b/examples/support_bot/data/article_6613520.json @@ -1 +1 @@ -{"text": "\n**ChatGPT**\n\n\nPhone verification is no longer required for new OpenAI account creation or ChatGPT usage.\n\n\n\n**API**\n\n\nPhone verification is now mandated on platform.openai.com for generating your initial API key, though not for any subsequent API key generation after that.\n\n\n\n\nWhy do I need to provide my phone number to generate my **first** API key on **platform**.openai.com?\n-----------------------------------------------------------------------------------------------------\n\n\nWhen you generate your first API key on platform.openai.com, we do require a phone number for security reasons. This allows us to verify your account and ensure our platform remains secure. \n\n\n\nYou only need to complete phone verification generating the 1st API key not any subsequent API keys after that.\n\n\n\nWe don't use your phone number for any other purposes, and take your privacy very seriously.\n\n\n\nCan I use a premium number, landline, Google Voice, or other VoIP phone number?\n-------------------------------------------------------------------------------\n\n\nWe do **`not`** support use of `landlines`, `VoIP`, `Google Voice`, or `premium numbers` at this time. All of those types of phone numbers are often associated with higher instances of fraud or abuse.\n\n\n\nFor this reason we only support completing phone verification via mobile phone numbers over an SMS text message, no exceptions.\n\n\n\nHave you always blocked VoIP numbers?\n-------------------------------------\n\n\nYes, we have always blocked VoIP services in the United States to ensure the safety and security of our users. Recently, we have expanded our blocking policy to include VoIP services internationally. This means that VoIP services are now blocked in countries outside the United States as well.\n\n\n\nI don't want to receive the SMS can I phone verify over email/call instead?\n---------------------------------------------------------------------------\n\n\nNo. The phone verification can only be completed with a text message via SMS (or WhatsApp, if available in your country). The code cannot be sent via email or done over phone call.\n\n\n\nWhy am I not receiving my phone verification code SMS?\n------------------------------------------------------\n\n\nIf you're not receiving your phone verification code, it's possible that our system has temporarily blocked you due to too many verification attempts or an issue occurred during your first request.\n\n\n\nPlease try again in a few hours and make sure you're within cellphone coverage, and you're not using any text-blocker applications.\n\n\n\nWhat does this error mean? \"Detected suspicious behavior from phone numbers similar to yours\"\n---------------------------------------------------------------------------------------------\n\n\nThis means our system has detected unusual activity or patterns from phone numbers that are similar to the one you're using for verification. This error is triggered as a security measure to prevent potential fraud or abuse of the platform.\n\n\n\nRemember that security measures like this are in place to protect your account and maintain the integrity of the platform. Ensure that your personal information is accurate and up-to-date.\n\n\n\nHow many times can I use the same phone number to complete the phone verification associated with an OpenAI account's first API key generation?\n-----------------------------------------------------------------------------------------------------------------------------------------------\n\n\nA phone number can only ever be used for phone verification up to 3 times.\n\n\n\nThis means if you have 3 OpenAI accounts you can use the same number for all three when completing phone verification on each initial API key generation across those three accounts.\n\n\n\nFor anti-fraud and abuse reasons, we do **not** allow you to unlink phone numbers from OpenAI accounts to free up that number for reuse. This means deleting an OpenAI account does **not** free up the number to get around the limit. There is no workaround.\n\n\n\nHow do free trial tokens work?\n------------------------------\n\n\nFree trial tokens to API users on platform.openai.com are only given for the first time you sign up then complete phone verification during the first API key generation. No accounts created after that get free trial tokens, no exceptions.\n\n\n\nHow do I resolve I get an error that I can't sign up due to \"unsupported country\"?\n----------------------------------------------------------------------------------\n\n\nThis may be that you're trying to complete phone verification on the initial API key generation on platform.openai.com using a phone number from a country or territory we do not support.\n\n\n\nSee [Supported countries and territories](https://platform.openai.com/docs/supported-countries).\n\n\n\nWhich countries do you support for WhatsApp phone verification?\n---------------------------------------------------------------\n\n\nIn certain countries you can complete phone verification with WhatsApp instead of via an SMS.\n\n\n\nAs of Wednesday, September 27th, 2023 the countries we support for that include:\n\n\n* \u201cIN\u201d, # India\n* \u201cID\u201d, # Indonesia\n* \u201cPK\u201d, # Pakistan\n* \u201cNG\u201d, # Nigeria\n* \u201cIL\u201d, # Israel\n* \u201cSA\u201d, # Saudi Arabia\n* \u201cAE\u201d, # United Arab Emirates\n* \u201cUA\u201d, # Ukraine\n* \u201cMY\u201d, # Malaysia\n* \u201cTR\u201d, # Turkey\n\n### What will phone verification look like?\n\n\nOur default drop-down is set to the United States which looks like this:\n\n\n![](https://downloads.intercomcdn.com/i/o/658048438/d0ae000cb03c874071cc470a/phone+verification+step+1.png)Then if you select one of the countries in our list above which include the WhatsApp alternative phone verification option - using India as an example - you'll see this UI:\n\n\n![](https://downloads.intercomcdn.com/i/o/658049199/9d36ef51ff688434496e9a60/phone+verification+step+2.png)Then to get your code sent to WhatsApp you can select \"YES\" and that option appears:\n\n\n![](https://downloads.intercomcdn.com/i/o/658049679/e35901be2b3899487a0d7c46/phone+verification+step+3.png)", "title": "Phone verification FAQ", "article_id": "6613520", "url": "https://help.openai.com/en/articles/6613520-phone-verification-faq"} \ No newline at end of file +{"text": "\n**ChatGPT**\n\n\nPhone verification is no longer required for new OpenAI account creation or ChatGPT usage.\n\n\n\n**API**\n\n\nPhone verification is now mandated on platform.openai.com for generating your initial API key, though not for any subsequent API key generation after that.\n\n\n\n\nWhy do I need to provide my phone number to generate my **first** API key on **platform**.openai.com?\n-----------------------------------------------------------------------------------------------------\n\n\nWhen you generate your first API key on platform.openai.com, we do require a phone number for security reasons. This allows us to verify your account and ensure our platform remains secure. \n\n\n\nYou only need to complete phone verification generating the 1st API key not any subsequent API keys after that.\n\n\n\nWe don't use your phone number for any other purposes, and take your privacy very seriously.\n\n\n\nCan I use a premium number, landline, Google Voice, or other VoIP phone number?\n-------------------------------------------------------------------------------\n\n\nWe do **`not`** support use of `landlines`, `VoIP`, `Google Voice`, or `premium numbers` at this time. All of those types of phone numbers are often associated with higher instances of fraud or abuse.\n\n\n\nFor this reason we only support completing phone verification via mobile phone numbers over an SMS text message, no exceptions.\n\n\n\nHave you always blocked VoIP numbers?\n-------------------------------------\n\n\nYes, we have always blocked VoIP services in the United States to ensure the safety and security of our users. Recently, we have expanded our blocking policy to include VoIP services internationally. This means that VoIP services are now blocked in countries outside the United States as well.\n\n\n\nI don't want to receive the SMS can I phone verify over email/call instead?\n---------------------------------------------------------------------------\n\n\nNo. The phone verification can only be completed with a text message via SMS (or WhatsApp, if available in your country). The code cannot be sent via email or done over phone call.\n\n\n\nWhy am I not receiving my phone verification code SMS?\n------------------------------------------------------\n\n\nIf you're not receiving your phone verification code, it's possible that our system has temporarily blocked you due to too many verification attempts or an issue occurred during your first request.\n\n\n\nPlease try again in a few hours and make sure you're within cellphone coverage, and you're not using any text-blocker applications.\n\n\n\nWhat does this error mean? \"Detected suspicious behavior from phone numbers similar to yours\"\n---------------------------------------------------------------------------------------------\n\n\nThis means our system has detected unusual activity or patterns from phone numbers that are similar to the one you're using for verification. This error is triggered as a security measure to prevent potential fraud or abuse of the platform.\n\n\n\nRemember that security measures like this are in place to protect your account and maintain the integrity of the platform. Ensure that your personal information is accurate and up-to-date.\n\n\n\nHow many times can I use the same phone number to complete the phone verification associated with an OpenAI account's first API key generation?\n-----------------------------------------------------------------------------------------------------------------------------------------------\n\n\nA phone number can only ever be used for phone verification up to 3 times.\n\n\n\nThis means if you have 3 OpenAI accounts you can use the same number for all three when completing phone verification on each initial API key generation across those three accounts.\n\n\n\nFor anti-fraud and abuse reasons, we do **not** allow you to unlink phone numbers from OpenAI accounts to free up that number for reuse. This means deleting an OpenAI account does **not** free up the number to get around the limit. There is no workaround.\n\n\n\nHow do free trial tokens work?\n------------------------------\n\n\nFree trial tokens to API users on platform.openai.com are only given for the first time you sign up then complete phone verification during the first API key generation. No accounts created after that get free trial tokens, no exceptions.\n\n\n\nHow do I resolve I get an error that I can't sign up due to \"unsupported country\"?\n----------------------------------------------------------------------------------\n\n\nThis may be that you're trying to complete phone verification on the initial API key generation on platform.openai.com using a phone number from a country or territory we do not support.\n\n\n\nSee [Supported countries and territories](https://platform.openai.com/docs/supported-countries).\n\n\n\nWhich countries do you support for WhatsApp phone verification?\n---------------------------------------------------------------\n\n\nIn certain countries you can complete phone verification with WhatsApp instead of via an SMS.\n\n\n\nAs of Wednesday, September 27th, 2023 the countries we support for that include:\n\n\n* \u201cIN\u201d, # India\n* \u201cID\u201d, # Indonesia\n* \u201cPK\u201d, # Pakistan\n* \u201cNG\u201d, # Nigeria\n* \u201cIL\u201d, # Israel\n* \u201cSA\u201d, # Saudi Arabia\n* \u201cAE\u201d, # United Arab Emirates\n* \u201cUA\u201d, # Ukraine\n* \u201cMY\u201d, # Malaysia\n* \u201cTR\u201d, # Turkey\n\n### What will phone verification look like?\n\n\nOur default drop-down is set to the United States which looks like this:\n\n\n![](https://downloads.intercomcdn.com/i/o/658048438/d0ae000cb03c874071cc470a/phone+verification+step+1.png)Then if you select one of the countries in our list above which include the WhatsApp alternative phone verification option - using India as an example - you'll see this UI:\n\n\n![](https://downloads.intercomcdn.com/i/o/658049199/9d36ef51ff688434496e9a60/phone+verification+step+2.png)Then to get your code sent to WhatsApp you can select \"YES\" and that option appears:\n\n\n![](https://downloads.intercomcdn.com/i/o/658049679/e35901be2b3899487a0d7c46/phone+verification+step+3.png)", "title": "Phone verification FAQ", "article_id": "6613520", "url": "https://help.openai.com/en/articles/6613520-phone-verification-faq"} diff --git a/examples/support_bot/data/article_6613605.json b/examples/support_bot/data/article_6613605.json index cb6e6ab5..9af3e1a7 100644 --- a/examples/support_bot/data/article_6613605.json +++ b/examples/support_bot/data/article_6613605.json @@ -1 +1 @@ -{"text": "If you're not receiving your phone verification code, it's possible that our system has temporarily blocked you due to too many verification attempts or an issue occurred during your first request. \n\n\n\nPlease try again in a few hours and make sure you're within cellphone coverage, and you're not using any text-blocker applications.\n\n\n\nPlease note we do not allow land lines or VoIP (including Google Voice) numbers at this time.\n\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n", "title": "Why am I not receiving my phone verification code?", "article_id": "6613605", "url": "https://help.openai.com/en/articles/6613605-why-am-i-not-receiving-my-phone-verification-code"} \ No newline at end of file +{"text": "If you're not receiving your phone verification code, it's possible that our system has temporarily blocked you due to too many verification attempts or an issue occurred during your first request. \n\n\n\nPlease try again in a few hours and make sure you're within cellphone coverage, and you're not using any text-blocker applications.\n\n\n\nPlease note we do not allow land lines or VoIP (including Google Voice) numbers at this time.\n\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n", "title": "Why am I not receiving my phone verification code?", "article_id": "6613605", "url": "https://help.openai.com/en/articles/6613605-why-am-i-not-receiving-my-phone-verification-code"} diff --git a/examples/support_bot/data/article_6613629.json b/examples/support_bot/data/article_6613629.json index 7eeac7bb..51deba1d 100644 --- a/examples/support_bot/data/article_6613629.json +++ b/examples/support_bot/data/article_6613629.json @@ -1 +1 @@ -{"text": "**If you can\u2019t log in, after having successfully logged in before\u2026**\n--------------------------------------------------------------------\n\n\n* Refresh your browser\u2019s cache and cookies. We recommend using a desktop device to [log in](https://beta.openai.com/login).\n* Ensure that you are using the correct authentication method. For example, if you signed up using \u2018Continue with Google\u2019, try using that method to [log in](https://chat.openai.com/auth/login) too.\n\n\n**If you see 'There is already a user with email ...' or 'Wrong authentication method'...**\n\n\n* You will see this error if you attempt to login in using a different authentication method from what you originally used to register your account. Your account can only be authenticated if you log in with the auth method that was used during initial registration. For example, if you registered using Google sign-in, please continue using the same method.\n* If you're unsure which method you originally used for signing up please try [signing in](https://beta.openai.com/login) with each of the following methods from a non-Firefox incognito window:\n\n\n\t+ Username + Password\n\t+ \"Continue with Google\" button\n\t+ \"Continue with Microsoft\" button\n\n\n**If you are trying to sign up, and you see \u2018This user already exists\u2019...**\n\n\n* This likely means you already began the sign up process, but did not complete it. Try to [login](https://beta.openai.com/login) instead.\n\n\n**If you received a Welcome email, but no verification email\u2026**\n\n\n* Register at .\n\n\n**\ufeffIn the event you still receive \"Something went wrong\" or \"Oops...\"** **errors please try the following:**\n\n\n1. Refresh your cache and cookies, then attempt the login with your chosen authentication method.\n2. Try an incognito browser window to complete sign in\n3. Try logging in from a different browser/computer to see if the issue still persists, as a security add-in or extension can occasionally cause this type of error.\n4. Try another network (wired connection, home WiFi, work WiFi, library/cafe WiFi and/or cellular network). \n\ufeff\n", "title": "Why can't I log in to OpenAI platform?", "article_id": "6613629", "url": "https://help.openai.com/en/articles/6613629-why-can-t-i-log-in-to-openai-platform"} \ No newline at end of file +{"text": "**If you can\u2019t log in, after having successfully logged in before\u2026**\n--------------------------------------------------------------------\n\n\n* Refresh your browser\u2019s cache and cookies. We recommend using a desktop device to [log in](https://beta.openai.com/login).\n* Ensure that you are using the correct authentication method. For example, if you signed up using \u2018Continue with Google\u2019, try using that method to [log in](https://chat.openai.com/auth/login) too.\n\n\n**If you see 'There is already a user with email ...' or 'Wrong authentication method'...**\n\n\n* You will see this error if you attempt to login in using a different authentication method from what you originally used to register your account. Your account can only be authenticated if you log in with the auth method that was used during initial registration. For example, if you registered using Google sign-in, please continue using the same method.\n* If you're unsure which method you originally used for signing up please try [signing in](https://beta.openai.com/login) with each of the following methods from a non-Firefox incognito window:\n\n\n\t+ Username + Password\n\t+ \"Continue with Google\" button\n\t+ \"Continue with Microsoft\" button\n\n\n**If you are trying to sign up, and you see \u2018This user already exists\u2019...**\n\n\n* This likely means you already began the sign up process, but did not complete it. Try to [login](https://beta.openai.com/login) instead.\n\n\n**If you received a Welcome email, but no verification email\u2026**\n\n\n* Register at .\n\n\n**\ufeffIn the event you still receive \"Something went wrong\" or \"Oops...\"** **errors please try the following:**\n\n\n1. Refresh your cache and cookies, then attempt the login with your chosen authentication method.\n2. Try an incognito browser window to complete sign in\n3. Try logging in from a different browser/computer to see if the issue still persists, as a security add-in or extension can occasionally cause this type of error.\n4. Try another network (wired connection, home WiFi, work WiFi, library/cafe WiFi and/or cellular network). \n\ufeff\n", "title": "Why can't I log in to OpenAI platform?", "article_id": "6613629", "url": "https://help.openai.com/en/articles/6613629-why-can-t-i-log-in-to-openai-platform"} diff --git a/examples/support_bot/data/article_6613657.json b/examples/support_bot/data/article_6613657.json index 1a8320da..36b9c876 100644 --- a/examples/support_bot/data/article_6613657.json +++ b/examples/support_bot/data/article_6613657.json @@ -1 +1 @@ -{"text": "You should be able to reset your password by clicking 'Forgot Password' [here](https://beta.openai.com/login) while logged out. If you can't log out, try from an incognito window. \n\n\n\nIf you haven't received the reset email, make sure to check your spam folder. \n\n\n\nIf it's not there, consider whether you originally signed in using a different authentication method such as 'Continue with Google.' If that's the case, there's no password to reset; simply log in using that authentication method. \n\n\n\nIf you need to reset your Google or Microsoft password, you'll need to do so on their respective sites.\n\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n\n\n", "title": "Why can't I reset my password?", "article_id": "6613657", "url": "https://help.openai.com/en/articles/6613657-why-can-t-i-reset-my-password"} \ No newline at end of file +{"text": "You should be able to reset your password by clicking 'Forgot Password' [here](https://beta.openai.com/login) while logged out. If you can't log out, try from an incognito window. \n\n\n\nIf you haven't received the reset email, make sure to check your spam folder. \n\n\n\nIf it's not there, consider whether you originally signed in using a different authentication method such as 'Continue with Google.' If that's the case, there's no password to reset; simply log in using that authentication method. \n\n\n\nIf you need to reset your Google or Microsoft password, you'll need to do so on their respective sites.\n\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n\n\n", "title": "Why can't I reset my password?", "article_id": "6613657", "url": "https://help.openai.com/en/articles/6613657-why-can-t-i-reset-my-password"} diff --git a/examples/support_bot/data/article_6614161.json b/examples/support_bot/data/article_6614161.json index ba559525..a8961f2a 100644 --- a/examples/support_bot/data/article_6614161.json +++ b/examples/support_bot/data/article_6614161.json @@ -1 +1 @@ -{"text": "There are two ways to contact our support team, depending on whether you have an account with us. \n\n\n\nIf you already have an account, simply login and use the \"Help\" button to start a conversation. \n\n\n\nIf you don't have an account or can't login, you can still reach us by selecting the chat bubble icon in the bottom right of help.openai.com.\n\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n", "title": "How can I contact support?", "article_id": "6614161", "url": "https://help.openai.com/en/articles/6614161-how-can-i-contact-support"} \ No newline at end of file +{"text": "There are two ways to contact our support team, depending on whether you have an account with us. \n\n\n\nIf you already have an account, simply login and use the \"Help\" button to start a conversation. \n\n\n\nIf you don't have an account or can't login, you can still reach us by selecting the chat bubble icon in the bottom right of help.openai.com.\n\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n", "title": "How can I contact support?", "article_id": "6614161", "url": "https://help.openai.com/en/articles/6614161-how-can-i-contact-support"} diff --git a/examples/support_bot/data/article_6614209.json b/examples/support_bot/data/article_6614209.json index 6374d83e..c985418c 100644 --- a/examples/support_bot/data/article_6614209.json +++ b/examples/support_bot/data/article_6614209.json @@ -1 +1 @@ -{"text": "There are two main options for checking your token usage:\n\n\n\n**1. [Usage dashboard](https://beta.openai.com/account/usage)**\n---------------------------------------------------------------\n\n\nThe [usage dashboard](https://beta.openai.com/account/usage) displays your API usage during the current and past monthly billing cycles. To display the usage of a particular user of your organizational account, you can use the dropdown next to \"Daily usage breakdown\".\n\n\n\n\n**2. Usage data from the API response**\n---------------------------------------\n\n\nYou can also access token usage data through the API. Token usage information is now included in responses from completions, edits, and embeddings endpoints. Information on prompt and completion tokens is contained in the \"usage\" key:\n\n\n\n```\n{ \"id\": \"cmpl-uqkvlQyYK7bGYrRHQ0eXlWia\", \n\"object\": \"text_completion\", \n\"created\": 1589478378, \n\"model\": \"text-davinci-003\", \n\"choices\": [ { \"text\": \"\\n\\nThis is a test\", \"index\": 0, \"logprobs\": null, \"finish_reason\": \"length\" } ], \n\"usage\": { \"prompt_tokens\": 5, \"completion_tokens\": 5, \"total_tokens\": 10 } } \n\n```\n", "title": "How do I check my token usage?", "article_id": "6614209", "url": "https://help.openai.com/en/articles/6614209-how-do-i-check-my-token-usage"} \ No newline at end of file +{"text": "There are two main options for checking your token usage:\n\n\n\n**1. [Usage dashboard](https://beta.openai.com/account/usage)**\n---------------------------------------------------------------\n\n\nThe [usage dashboard](https://beta.openai.com/account/usage) displays your API usage during the current and past monthly billing cycles. To display the usage of a particular user of your organizational account, you can use the dropdown next to \"Daily usage breakdown\".\n\n\n\n\n**2. Usage data from the API response**\n---------------------------------------\n\n\nYou can also access token usage data through the API. Token usage information is now included in responses from completions, edits, and embeddings endpoints. Information on prompt and completion tokens is contained in the \"usage\" key:\n\n\n\n```\n{ \"id\": \"cmpl-uqkvlQyYK7bGYrRHQ0eXlWia\", \n\"object\": \"text_completion\", \n\"created\": 1589478378, \n\"model\": \"text-davinci-003\", \n\"choices\": [ { \"text\": \"\\n\\nThis is a test\", \"index\": 0, \"logprobs\": null, \"finish_reason\": \"length\" } ], \n\"usage\": { \"prompt_tokens\": 5, \"completion_tokens\": 5, \"total_tokens\": 10 } } \n\n```\n", "title": "How do I check my token usage?", "article_id": "6614209", "url": "https://help.openai.com/en/articles/6614209-how-do-i-check-my-token-usage"} diff --git a/examples/support_bot/data/article_6614457.json b/examples/support_bot/data/article_6614457.json index 6992dcba..73627cbf 100644 --- a/examples/support_bot/data/article_6614457.json +++ b/examples/support_bot/data/article_6614457.json @@ -1 +1 @@ -{"text": "There are three reasons you might receive the \"You've reached your usage limit\" error:\n\n\n\n**If you're using a free trial account:** To set up a pay-as-you-go account using the API, you'll need to enter [billing information](https://platform.openai.com/account/billing) and upgrade to a paid plan.\n\n\n\n**If you're already on a paid plan,** you may need to either increase your [monthly budget](https://platform.openai.com/account/limits). To set your limit over the approved usage limit (normally, $120.00/month) please review your **[Usage Limits page](https://platform.openai.com/account/limits)** for information on advancing to the next tier. If your needs exceed what's available in the 'Increasing your limits' tier or you have an unique use case, click on 'Need help?' to submit a request for a higher limit. Our team will look into your request and respond as soon as we can.\n\n\n\n**Why did I get charged if I'm supposed to have free credits?**\n\n\nFree trial tokens to API users on platform.openai.com are only given the first time you sign up then complete phone verification during the first API key generation. No accounts created after that will receive free trial tokens.\n\n", "title": "Why am I getting an error message stating that I've reached my usage limit?", "article_id": "6614457", "url": "https://help.openai.com/en/articles/6614457-why-am-i-getting-an-error-message-stating-that-i-ve-reached-my-usage-limit"} \ No newline at end of file +{"text": "There are three reasons you might receive the \"You've reached your usage limit\" error:\n\n\n\n**If you're using a free trial account:** To set up a pay-as-you-go account using the API, you'll need to enter [billing information](https://platform.openai.com/account/billing) and upgrade to a paid plan.\n\n\n\n**If you're already on a paid plan,** you may need to either increase your [monthly budget](https://platform.openai.com/account/limits). To set your limit over the approved usage limit (normally, $120.00/month) please review your **[Usage Limits page](https://platform.openai.com/account/limits)** for information on advancing to the next tier. If your needs exceed what's available in the 'Increasing your limits' tier or you have an unique use case, click on 'Need help?' to submit a request for a higher limit. Our team will look into your request and respond as soon as we can.\n\n\n\n**Why did I get charged if I'm supposed to have free credits?**\n\n\nFree trial tokens to API users on platform.openai.com are only given the first time you sign up then complete phone verification during the first API key generation. No accounts created after that will receive free trial tokens.\n\n", "title": "Why am I getting an error message stating that I've reached my usage limit?", "article_id": "6614457", "url": "https://help.openai.com/en/articles/6614457-why-am-i-getting-an-error-message-stating-that-i-ve-reached-my-usage-limit"} diff --git a/examples/support_bot/data/article_6639781.json b/examples/support_bot/data/article_6639781.json index 09638090..452130a4 100644 --- a/examples/support_bot/data/article_6639781.json +++ b/examples/support_bot/data/article_6639781.json @@ -1 +1 @@ -{"text": "If you're wondering whether OpenAI models have knowledge of current events, the answer is that it depends on the specific model. The table below breaks down the different models and their respective training data ranges.\n\n\n\n\n| | |\n| --- | --- |\n| **Model name** | **TRAINING DATA** |\n| text-davinci-003 | Up to Jun 2021 |\n| text-davinci-002 | Up to Jun 2021 |\n| text-curie-001 | Up to Oct 2019 |\n| text-babbage-001 | Up to Oct 2019 |\n| text-ada-001 | Up to Oct 2019 |\n| code-davinci-002 | Up to Jun 2021 |\n| [Embeddings](https://beta.openai.com/docs/guides/embeddings/what-are-embeddings) models (e.g. \ntext-similarity-ada-001) | up to August 2020\u200b |\n\n", "title": "Do the OpenAI API models have knowledge of current events?", "article_id": "6639781", "url": "https://help.openai.com/en/articles/6639781-do-the-openai-api-models-have-knowledge-of-current-events"} \ No newline at end of file +{"text": "If you're wondering whether OpenAI models have knowledge of current events, the answer is that it depends on the specific model. The table below breaks down the different models and their respective training data ranges.\n\n\n\n\n| | |\n| --- | --- |\n| **Model name** | **TRAINING DATA** |\n| text-davinci-003 | Up to Jun 2021 |\n| text-davinci-002 | Up to Jun 2021 |\n| text-curie-001 | Up to Oct 2019 |\n| text-babbage-001 | Up to Oct 2019 |\n| text-ada-001 | Up to Oct 2019 |\n| code-davinci-002 | Up to Jun 2021 |\n| [Embeddings](https://beta.openai.com/docs/guides/embeddings/what-are-embeddings) models (e.g. \ntext-similarity-ada-001) | up to August 2020\u200b |\n\n", "title": "Do the OpenAI API models have knowledge of current events?", "article_id": "6639781", "url": "https://help.openai.com/en/articles/6639781-do-the-openai-api-models-have-knowledge-of-current-events"} diff --git a/examples/support_bot/data/article_6640792.json b/examples/support_bot/data/article_6640792.json index ba004309..96d75c64 100644 --- a/examples/support_bot/data/article_6640792.json +++ b/examples/support_bot/data/article_6640792.json @@ -1 +1 @@ -{"text": "You'll be billed at the end of each calendar month for usage during that month unless the parties have agreed to a different billing arrangement in writing. Invoices are typically issued within two weeks of the end of the billing cycle.\n\n\n\nFor the latest information on pay-as-you-go pricing, please our [pricing page](https://openai.com/pricing). \n\n", "title": "When can I expect to receive my OpenAI API invoice?", "article_id": "6640792", "url": "https://help.openai.com/en/articles/6640792-when-can-i-expect-to-receive-my-openai-api-invoice"} \ No newline at end of file +{"text": "You'll be billed at the end of each calendar month for usage during that month unless the parties have agreed to a different billing arrangement in writing. Invoices are typically issued within two weeks of the end of the billing cycle.\n\n\n\nFor the latest information on pay-as-you-go pricing, please our [pricing page](https://openai.com/pricing). \n\n", "title": "When can I expect to receive my OpenAI API invoice?", "article_id": "6640792", "url": "https://help.openai.com/en/articles/6640792-when-can-i-expect-to-receive-my-openai-api-invoice"} diff --git a/examples/support_bot/data/article_6640864.json b/examples/support_bot/data/article_6640864.json index db26ed9b..d89f3491 100644 --- a/examples/support_bot/data/article_6640864.json +++ b/examples/support_bot/data/article_6640864.json @@ -1 +1 @@ -{"text": "\n**Note**: The time for the name change you make on platform.openai.com to be reflected in ChatGPT may take up to 15 minutes.\n\n\n\nYou can change your name in your user settings in **platform**.openai.com under User -> Settings -> User profile -> Name.\n\n\n\n\n\n\n\nHere is what the settings looks like:\n\n\n\n![](https://downloads.intercomcdn.com/i/o/844048451/a904206d40d58034493cb2f6/Screenshot+2023-10-02+at+2.18.43+PM.png)ChatGPT\n-------\n\n\nChange your name on [platform.openai.com](http://platform.openai.com/) and refresh ChatGPT to see the update.\n\n\n\nRequirements\n------------\n\n\n1. Must have some name value\n2. Must be 96 characters or shorter.\n3. Must be only letters, certain punctuation, and spaces. No numbers.\n", "title": "How do I change my name for my OpenAI account?", "article_id": "6640864", "url": "https://help.openai.com/en/articles/6640864-how-do-i-change-my-name-for-my-openai-account"} \ No newline at end of file +{"text": "\n**Note**: The time for the name change you make on platform.openai.com to be reflected in ChatGPT may take up to 15 minutes.\n\n\n\nYou can change your name in your user settings in **platform**.openai.com under User -> Settings -> User profile -> Name.\n\n\n\n\n\n\n\nHere is what the settings looks like:\n\n\n\n![](https://downloads.intercomcdn.com/i/o/844048451/a904206d40d58034493cb2f6/Screenshot+2023-10-02+at+2.18.43+PM.png)ChatGPT\n-------\n\n\nChange your name on [platform.openai.com](http://platform.openai.com/) and refresh ChatGPT to see the update.\n\n\n\nRequirements\n------------\n\n\n1. Must have some name value\n2. Must be 96 characters or shorter.\n3. Must be only letters, certain punctuation, and spaces. No numbers.\n", "title": "How do I change my name for my OpenAI account?", "article_id": "6640864", "url": "https://help.openai.com/en/articles/6640864-how-do-i-change-my-name-for-my-openai-account"} diff --git a/examples/support_bot/data/article_6640875.json b/examples/support_bot/data/article_6640875.json index ff3e08ec..46537524 100644 --- a/examples/support_bot/data/article_6640875.json +++ b/examples/support_bot/data/article_6640875.json @@ -1 +1 @@ -{"text": "When using DALL\u00b7E in your work, it is important to be transparent about AI involvement and adhere to our [Content Policy](https://labs.openai.com/policies/content-policy) and [Terms of Use](https://labs.openai.com/policies/terms). \n\n\n\nPrimarily, **don't mislead your audience about AI involvement.**\n\n\n* When sharing your work, we encourage you to proactively disclose AI involvement in your work.\n* You may remove the DALL\u00b7E signature/watermark in the bottom right corner if you wish, but you may not mislead others about the nature of the work. For example, you may not tell people that the work was entirely human generated or that the work is an unaltered photograph of a real event.\n\nIf you'd like to cite DALL\u00b7E, we'd recommend including wording such as \"This image was created with the assistance of DALL\u00b7E 2\" or \"This image was generated with the assistance of AI.\"\n\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n", "title": "How should I credit DALL\u00b7E in my work?", "article_id": "6640875", "url": "https://help.openai.com/en/articles/6640875-how-should-i-credit-dall-e-in-my-work"} \ No newline at end of file +{"text": "When using DALL\u00b7E in your work, it is important to be transparent about AI involvement and adhere to our [Content Policy](https://labs.openai.com/policies/content-policy) and [Terms of Use](https://labs.openai.com/policies/terms). \n\n\n\nPrimarily, **don't mislead your audience about AI involvement.**\n\n\n* When sharing your work, we encourage you to proactively disclose AI involvement in your work.\n* You may remove the DALL\u00b7E signature/watermark in the bottom right corner if you wish, but you may not mislead others about the nature of the work. For example, you may not tell people that the work was entirely human generated or that the work is an unaltered photograph of a real event.\n\nIf you'd like to cite DALL\u00b7E, we'd recommend including wording such as \"This image was created with the assistance of DALL\u00b7E 2\" or \"This image was generated with the assistance of AI.\"\n\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n", "title": "How should I credit DALL\u00b7E in my work?", "article_id": "6640875", "url": "https://help.openai.com/en/articles/6640875-how-should-i-credit-dall-e-in-my-work"} diff --git a/examples/support_bot/data/article_6641048.json b/examples/support_bot/data/article_6641048.json index f48ea21d..e65debed 100644 --- a/examples/support_bot/data/article_6641048.json +++ b/examples/support_bot/data/article_6641048.json @@ -1 +1 @@ -{"text": "**Receipts for credit purchases made at labs.openai.com** are sent to the email address you used when making the purchase. You can also access invoices by clicking \"View payment history\" in your [Labs account settings](https://labs.openai.com/account).\n\n\n\n**Please note that [DALL\u00b7E API](https://help.openai.com/en/articles/6705023)** usage is offered on a pay-as-you-go basis and is billed separately from labs.openai.com. You'll be billed at the end of each calendar month for usage during that month. Invoices are typically issued within two weeks of the end of the billing cycle. For the latest information on pay-as-you-go pricing, please see: .\n\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n", "title": "Where can I find my invoice for DALL\u00b7E credit purchases?", "article_id": "6641048", "url": "https://help.openai.com/en/articles/6641048-where-can-i-find-my-invoice-for-dall-e-credit-purchases"} \ No newline at end of file +{"text": "**Receipts for credit purchases made at labs.openai.com** are sent to the email address you used when making the purchase. You can also access invoices by clicking \"View payment history\" in your [Labs account settings](https://labs.openai.com/account).\n\n\n\n**Please note that [DALL\u00b7E API](https://help.openai.com/en/articles/6705023)** usage is offered on a pay-as-you-go basis and is billed separately from labs.openai.com. You'll be billed at the end of each calendar month for usage during that month. Invoices are typically issued within two weeks of the end of the billing cycle. For the latest information on pay-as-you-go pricing, please see: .\n\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n", "title": "Where can I find my invoice for DALL\u00b7E credit purchases?", "article_id": "6641048", "url": "https://help.openai.com/en/articles/6641048-where-can-i-find-my-invoice-for-dall-e-credit-purchases"} diff --git a/examples/support_bot/data/article_6643004.json b/examples/support_bot/data/article_6643004.json index a1ba59f0..f7d24a75 100644 --- a/examples/support_bot/data/article_6643004.json +++ b/examples/support_bot/data/article_6643004.json @@ -1 +1 @@ -{"text": "When you use your [fine-tuned model](https://platform.openai.com/docs/guides/fine-tuning) for the first time in a while, it might take a little while for it to load. This sometimes causes the first few requests to fail with a 429 code and an error message that reads \"the model is still being loaded\".\n\n\n\nThe amount of time it takes to load a model will depend on the shared traffic and the size of the model. A larger model like `gpt-4`, for example, might take up to a few minutes to load, while smaller models might load much faster.\n\n\n\nOnce the model is loaded, ChatCompletion requests should be much faster and you're less likely to experience timeouts. \n\n\n\nWe recommend handling these errors programmatically and implementing retry logic. The first few calls may fail while the model loads. Retry the first call with exponential backoff until it succeeds, then continue as normal (see the \"Retrying with exponential backoff\" section of this [notebook](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_handle_rate_limits.ipynb) for examples).\n\n", "title": "What is the \"model is still being loaded\" error?", "article_id": "6643004", "url": "https://help.openai.com/en/articles/6643004-what-is-the-model-is-still-being-loaded-error"} \ No newline at end of file +{"text": "When you use your [fine-tuned model](https://platform.openai.com/docs/guides/fine-tuning) for the first time in a while, it might take a little while for it to load. This sometimes causes the first few requests to fail with a 429 code and an error message that reads \"the model is still being loaded\".\n\n\n\nThe amount of time it takes to load a model will depend on the shared traffic and the size of the model. A larger model like `gpt-4`, for example, might take up to a few minutes to load, while smaller models might load much faster.\n\n\n\nOnce the model is loaded, ChatCompletion requests should be much faster and you're less likely to experience timeouts. \n\n\n\nWe recommend handling these errors programmatically and implementing retry logic. The first few calls may fail while the model loads. Retry the first call with exponential backoff until it succeeds, then continue as normal (see the \"Retrying with exponential backoff\" section of this [notebook](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_handle_rate_limits.ipynb) for examples).\n\n", "title": "What is the \"model is still being loaded\" error?", "article_id": "6643004", "url": "https://help.openai.com/en/articles/6643004-what-is-the-model-is-still-being-loaded-error"} diff --git a/examples/support_bot/data/article_6643036.json b/examples/support_bot/data/article_6643036.json index 755cdd51..33f955e4 100644 --- a/examples/support_bot/data/article_6643036.json +++ b/examples/support_bot/data/article_6643036.json @@ -1 +1 @@ -{"text": "**OpenAI API** - the [Sharing & Publication policy](https://openai.com/api/policies/sharing-publication/) outlines how users may share and publish content generated through their use of the API. \n \n**DALL\u00b7E** - see the [Content policy](https://labs.openai.com/policies/content-policy) for details on what images can be created and shared.\n\n", "title": "What are OpenAI's policies regarding sharing and publication of generated content?", "article_id": "6643036", "url": "https://help.openai.com/en/articles/6643036-what-are-openai-s-policies-regarding-sharing-and-publication-of-generated-content"} \ No newline at end of file +{"text": "**OpenAI API** - the [Sharing & Publication policy](https://openai.com/api/policies/sharing-publication/) outlines how users may share and publish content generated through their use of the API. \n \n**DALL\u00b7E** - see the [Content policy](https://labs.openai.com/policies/content-policy) for details on what images can be created and shared.\n\n", "title": "What are OpenAI's policies regarding sharing and publication of generated content?", "article_id": "6643036", "url": "https://help.openai.com/en/articles/6643036-what-are-openai-s-policies-regarding-sharing-and-publication-of-generated-content"} diff --git a/examples/support_bot/data/article_6643167.json b/examples/support_bot/data/article_6643167.json index 9bc87153..f4b49ae0 100644 --- a/examples/support_bot/data/article_6643167.json +++ b/examples/support_bot/data/article_6643167.json @@ -1 +1 @@ -{"text": "The [Embeddings](https://platform.openai.com/docs/guides/embeddings) and [Chat](https://platform.openai.com/docs/guides/chat) endpoints are a great combination to use when building a question-answering or chatbot application.\n\n\n\nHere's how you can get started: \n\n\n1. Gather all of the information you need for your knowledge base. Use our Embeddings endpoint to make document embeddings for each section.\n2. When a user asks a question, turn it into a query embedding and use it to find the most relevant sections from your knowledge base.\n3. Use the relevant context from your knowledge base to create a prompt for the Completions endpoint, which can generate an answer for your user.\n\nWe encourage you to take a look at our **[detailed notebook](https://github.com/openai/openai-cookbook/blob/main/examples/Question_answering_using_embeddings.ipynb)** that provides step-by-step instructions.\n\n\n\nIf you run into any issues or have questions, don't hesitate to join our \n\n\n[Community Forum](https://community.openai.com/) for help. \n\n\n\nWe're excited to see what you build!\n\n", "title": "How to Use OpenAI API for Q&A and Chatbot Apps", "article_id": "6643167", "url": "https://help.openai.com/en/articles/6643167-how-to-use-openai-api-for-q-a-and-chatbot-apps"} \ No newline at end of file +{"text": "The [Embeddings](https://platform.openai.com/docs/guides/embeddings) and [Chat](https://platform.openai.com/docs/guides/chat) endpoints are a great combination to use when building a question-answering or chatbot application.\n\n\n\nHere's how you can get started: \n\n\n1. Gather all of the information you need for your knowledge base. Use our Embeddings endpoint to make document embeddings for each section.\n2. When a user asks a question, turn it into a query embedding and use it to find the most relevant sections from your knowledge base.\n3. Use the relevant context from your knowledge base to create a prompt for the Completions endpoint, which can generate an answer for your user.\n\nWe encourage you to take a look at our **[detailed notebook](https://github.com/openai/openai-cookbook/blob/main/examples/Question_answering_using_embeddings.ipynb)** that provides step-by-step instructions.\n\n\n\nIf you run into any issues or have questions, don't hesitate to join our \n\n\n[Community Forum](https://community.openai.com/) for help. \n\n\n\nWe're excited to see what you build!\n\n", "title": "How to Use OpenAI API for Q&A and Chatbot Apps", "article_id": "6643167", "url": "https://help.openai.com/en/articles/6643167-how-to-use-openai-api-for-q-a-and-chatbot-apps"} diff --git a/examples/support_bot/data/article_6643200.json b/examples/support_bot/data/article_6643200.json index 96009f75..51a0b922 100644 --- a/examples/support_bot/data/article_6643200.json +++ b/examples/support_bot/data/article_6643200.json @@ -1 +1 @@ -{"text": "If the [`temperature`](https://platform.openai.com/docs/api-reference/chat/create#chat-create-temperature) parameter is set above 0, the model will likely produce different results each time - this is expected behavior. If you're seeing unexpected differences in the quality completions you receive from [Playground](https://platform.openai.com/playground) vs. the API with `temperature` set to 0, there are a few potential causes to consider. \n\n\n\nFirst, check that your prompt is exactly the same. Even slight differences, such as an extra space or newline character, can lead to different outputs. \n\n\n\nNext, ensure you're using the same parameters in both cases. For example, the `model` parameter set to `gpt-3.5-turbo` and `gpt-4` will produce different completions even with the same prompt, because `gpt-4` is a newer and more capable instruction-following [model](https://platform.openai.com/docs/models).\n\n\n\nIf you've double-checked all of these things and are still seeing discrepancies, ask for help on the [Community Forum](https://community.openai.com/), where users may have experienced similar issues or may be able to assist in troubleshooting your specific case.\n\n", "title": "Why am I getting different completions on Playground vs. the API?", "article_id": "6643200", "url": "https://help.openai.com/en/articles/6643200-why-am-i-getting-different-completions-on-playground-vs-the-api"} \ No newline at end of file +{"text": "If the [`temperature`](https://platform.openai.com/docs/api-reference/chat/create#chat-create-temperature) parameter is set above 0, the model will likely produce different results each time - this is expected behavior. If you're seeing unexpected differences in the quality completions you receive from [Playground](https://platform.openai.com/playground) vs. the API with `temperature` set to 0, there are a few potential causes to consider. \n\n\n\nFirst, check that your prompt is exactly the same. Even slight differences, such as an extra space or newline character, can lead to different outputs. \n\n\n\nNext, ensure you're using the same parameters in both cases. For example, the `model` parameter set to `gpt-3.5-turbo` and `gpt-4` will produce different completions even with the same prompt, because `gpt-4` is a newer and more capable instruction-following [model](https://platform.openai.com/docs/models).\n\n\n\nIf you've double-checked all of these things and are still seeing discrepancies, ask for help on the [Community Forum](https://community.openai.com/), where users may have experienced similar issues or may be able to assist in troubleshooting your specific case.\n\n", "title": "Why am I getting different completions on Playground vs. the API?", "article_id": "6643200", "url": "https://help.openai.com/en/articles/6643200-why-am-i-getting-different-completions-on-playground-vs-the-api"} diff --git a/examples/support_bot/data/article_6643435.json b/examples/support_bot/data/article_6643435.json index b9ad1f4f..10acf0e1 100644 --- a/examples/support_bot/data/article_6643435.json +++ b/examples/support_bot/data/article_6643435.json @@ -1 +1 @@ -{"text": "**As an \"Explore\" free trial API user,** you receive an initial credit of $5 that expires after three months if this is your first OpenAI account. [Upgrading to the pay-as-you-go plan](https://beta.openai.com/account/billing) will increase your usage limit to $120/month.\n\n\n\n**If you're a current API customer looking to increase your usage limit beyond your existing tier**, please review your **[Usage Limits page](https://platform.openai.com/account/limits)** for information on advancing to the next tier. Should your needs exceed what's available in the 'Increasing your limits' tier or you have an unique use case, click on 'Need help?' to submit a request for a higher limit. Our team will assess your request and respond as soon as we can.\n\n", "title": "How do I get more tokens or increase my monthly usage limits?", "article_id": "6643435", "url": "https://help.openai.com/en/articles/6643435-how-do-i-get-more-tokens-or-increase-my-monthly-usage-limits"} \ No newline at end of file +{"text": "**As an \"Explore\" free trial API user,** you receive an initial credit of $5 that expires after three months if this is your first OpenAI account. [Upgrading to the pay-as-you-go plan](https://beta.openai.com/account/billing) will increase your usage limit to $120/month.\n\n\n\n**If you're a current API customer looking to increase your usage limit beyond your existing tier**, please review your **[Usage Limits page](https://platform.openai.com/account/limits)** for information on advancing to the next tier. Should your needs exceed what's available in the 'Increasing your limits' tier or you have an unique use case, click on 'Need help?' to submit a request for a higher limit. Our team will assess your request and respond as soon as we can.\n\n", "title": "How do I get more tokens or increase my monthly usage limits?", "article_id": "6643435", "url": "https://help.openai.com/en/articles/6643435-how-do-i-get-more-tokens-or-increase-my-monthly-usage-limits"} diff --git a/examples/support_bot/data/article_6653653.json b/examples/support_bot/data/article_6653653.json index b4a7439e..0f5228ba 100644 --- a/examples/support_bot/data/article_6653653.json +++ b/examples/support_bot/data/article_6653653.json @@ -1 +1 @@ -{"text": "If you are interested in finding and reporting security vulnerabilities in OpenAI's services, please read and follow our [Coordinated Vulnerability Disclosure Policy](https://openai.com/security/disclosure/).\n\n\n\nThis policy explains how to:\n\n\n* Request authorization for testing\n* Identify what types of testing are in-scope and out-of-scope\n* Communicate with us securely\n\nWe appreciate your efforts to help us improve our security and protect our users and technology.\n\n", "title": "How to Report Security Vulnerabilities to OpenAI", "article_id": "6653653", "url": "https://help.openai.com/en/articles/6653653-how-to-report-security-vulnerabilities-to-openai"} \ No newline at end of file +{"text": "If you are interested in finding and reporting security vulnerabilities in OpenAI's services, please read and follow our [Coordinated Vulnerability Disclosure Policy](https://openai.com/security/disclosure/).\n\n\n\nThis policy explains how to:\n\n\n* Request authorization for testing\n* Identify what types of testing are in-scope and out-of-scope\n* Communicate with us securely\n\nWe appreciate your efforts to help us improve our security and protect our users and technology.\n\n", "title": "How to Report Security Vulnerabilities to OpenAI", "article_id": "6653653", "url": "https://help.openai.com/en/articles/6653653-how-to-report-security-vulnerabilities-to-openai"} diff --git a/examples/support_bot/data/article_6654000.json b/examples/support_bot/data/article_6654000.json index 7784b22a..765e4ef7 100644 --- a/examples/support_bot/data/article_6654000.json +++ b/examples/support_bot/data/article_6654000.json @@ -1 +1 @@ -{"text": "\n\n\ud83d\udca1 `If you're just getting started with OpenAI API, we recommend reading the [Introduction](https://beta.openai.com/docs/introduction/introduction) and [Quickstart](https://beta.openai.com/docs/quickstart) tutorials first.`\n\n\n\n**How prompt engineering works**\n================================\n\n\nDue to the way the instruction-following [models](https://beta.openai.com/docs/models) are trained or the data they are trained on, there are specific prompt formats that work particularly well and align better with the tasks at hand. Below we present a number of prompt formats we find work reliably well, but feel free to explore different formats, which may fit your task best.\n\n\n\n\n**Rules of Thumb and Examples**\n===============================\n\n\n**Note**: the \"*{text input here}*\" is a placeholder for actual text/context \n\n\n\n\n**1.** Use the latest model\n----------------------------\n\n\nFor best results, we generally recommend using the latest, most capable models. As of November 2022, the best options are the **\u201ctext-davinci-003\u201d** [model](https://beta.openai.com/docs/models) for text generation, and the **\u201ccode-davinci-002\u201d** model for code generation.\n\n\n\n\n**2. Put instructions at the beginning of the prompt and use ### or \"\"\" to separate the instruction and context**\n-----------------------------------------------------------------------------------------------------------------\n\n\nLess effective \u274c:\n\n\n\n```\nSummarize the text below as a bullet point list of the most important points. \n \n{text input here}\n```\n\n\nBetter \u2705:\n\n\n\n```\nSummarize the text below as a bullet point list of the most important points. \n \nText: \"\"\" \n{text input here} \n\"\"\"\n```\n\n\n\n\n**3. Be specific, descriptive and as detailed as possible about the desired context, outcome, length, format, style, etc**\n---------------------------------------------------------------------------------------------------------------------------\n\n\nBe specific about the context, outcome, length, format, style, etc \n\n\n\nLess effective \u274c:\n\n\n\n```\nWrite a poem about OpenAI. \n```\n\n\nBetter \u2705:\n\n\n\n```\nWrite a short inspiring poem about OpenAI, focusing on the recent DALL-E product launch (DALL-E is a text to image ML model) in the style of a {famous poet}\n```\n\n\n\n**4. Articulate the desired output format through examples ([example 1](https://beta.openai.com/playground/p/DoMbgEMmkXJ5xOyunwFZDHdg), [example 2](https://beta.openai.com/playground/p/3U5Wx7RTIdNNC9Fg8fc44omi)).**\n----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n\n\nLess effective \u274c:\n\n\n\n```\nExtract the entities mentioned in the text below. Extract the following 4 entity types: company names, people names, specific topics and themes. \n \nText: {text}\n```\n\nShow, and tell - the models respond better when shown specific format requirements. This also makes it easier to programmatically parse out multiple outputs reliably.\n\n\n\nBetter \u2705:\n\n\n\n```\nExtract the important entities mentioned in the text below. First extract all company names, then extract all people names, then extract specific topics which fit the content and finally extract general overarching themes \n \nDesired format: \nCompany names: \nPeople names: -||- \nSpecific topics: -||- \nGeneral themes: -||- \n \nText: {text}\n```\n\n\n\n**5. Start with zero-shot, then few-shot ([example](https://beta.openai.com/playground/p/Ts5kvNWlp7wtdgWEkIAbP1hJ)), neither of them worked, then fine-tune**\n-------------------------------------------------------------------------------------------------------------------------------------------------------------\n\n\n\u2705 Zero-shot \n\n\n\n```\nExtract keywords from the below text. \n \nText: {text} \n \nKeywords:\n```\n\n\n\u2705 Few-shot - provide a couple of examples\n\n\n\n```\nExtract keywords from the corresponding texts below. \n \nText 1: Stripe provides APIs that web developers can use to integrate payment processing into their websites and mobile applications. \nKeywords 1: Stripe, payment processing, APIs, web developers, websites, mobile applications \n## \nText 2: OpenAI has trained cutting-edge language models that are very good at understanding and generating text. Our API provides access to these models and can be used to solve virtually any task that involves processing language. \nKeywords 2: OpenAI, language models, text processing, API. \n## \nText 3: {text} \nKeywords 3:\n```\n\n\n\u2705Fine-tune: see fine-tune best practices [here](https://docs.google.com/document/d/1h-GTjNDDKPKU_Rsd0t1lXCAnHltaXTAzQ8K2HRhQf9U/edit#).\n\n\n\n\n**6. Reduce \u201cfluffy\u201d and imprecise descriptions**\n-------------------------------------------------\n\n\nLess effective \u274c:\n\n\n\n```\nThe description for this product should be fairly short, a few sentences only, and not too much more.\n```\n\n\nBetter \u2705:\n\n\n\n```\nUse a 3 to 5 sentence paragraph to describe this product.\n```\n\n\n\n**7. Instead of just saying what not to do, say what to do instead**\n--------------------------------------------------------------------\n\n\nLess effective \u274c:\n\n\n\n```\nThe following is a conversation between an Agent and a Customer. DO NOT ASK USERNAME OR PASSWORD. DO NOT REPEAT. \n \nCustomer: I can\u2019t log in to my account. \nAgent:\n```\n\n\nBetter \u2705:\n\n\n\n```\nThe following is a conversation between an Agent and a Customer. The agent will attempt to diagnose the problem and suggest a solution, whilst refraining from asking any questions related to PII. Instead of asking for PII, such as username or password, refer the user to the help article www.samplewebsite.com/help/faq \n \nCustomer: I can\u2019t log in to my account. \nAgent:\n```\n\n\n\n**8. Code Generation Specific - Use \u201cleading words\u201d to nudge the model toward a particular pattern**\n----------------------------------------------------------------------------------------------------\n\n\nLess effective \u274c:\n\n\n\n```\n# Write a simple python function that \n# 1. Ask me for a number in mile \n# 2. It converts miles to kilometers\n```\n\n\nIn this code example below, adding \u201c*import*\u201d hints to the model that it should start writing in Python. (Similarly \u201cSELECT\u201d is a good hint for the start of a SQL statement.) \n\n\n\nBetter \u2705:\n\n\n\n```\n# Write a simple python function that \n# 1. Ask me for a number in mile \n# 2. It converts miles to kilometers \n \nimport\n```\n\n\n\n\n**Parameters**\n===============\n\n\nGenerally, we find that **`model`** and **`temperature`** are the most commonly used parameters to alter the model output.\n\n\n1. **`model` -** Higher performance [models](https://beta.openai.com/docs/models) are more expensive and have higher latency.\n2. **`temperature` -** A measure of how often the model outputs a less likely token. The higher the `temperature`, the more random (and usually creative) the output. This, however, is not the same as \u201ctruthfulness\u201d. For most factual use cases such as data extraction, and truthful Q&A, the `temperature` of 0 is best.\n3. **`max_tokens`** (**maximum length)** - Does not control the length of the output, but a hard cutoff limit for token generation. Ideally you won\u2019t hit this limit often, as your model will stop either when it thinks it\u2019s finished, or when it hits a stop sequence you defined.\n4. **`stop` (stop sequences)** - A set of characters (tokens) that, when generated, will cause the text generation to stop.\n\nFor other parameter descriptions see the [API reference](https://beta.openai.com/docs/api-reference/completions/create).\n\n\n\n\n**Additional Resources**\n========================\n\n\nIf you're interested in additional resources, we recommend:\n\n\n* Guides\n\n\n\t+ [Text completion](https://beta.openai.com/docs/guides/completion/text-completion) - learn how to generate or edit text using our models\n\t+ [Code completion](https://beta.openai.com/docs/guides/code/code-completion-private-beta) - explore prompt engineering for Codex\n\t+ [Fine-tuning](https://beta.openai.com/docs/guides/fine-tuning/fine-tuning) - Learn how to train a custom model for your use case\n\t+ [Embeddings](https://beta.openai.com/docs/guides/embeddings/embeddings) - learn how to search, classify, and compare text\n\t+ [Moderation](https://beta.openai.com/docs/guides/moderation/moderation)\n* [OpenAI cookbook repo](https://github.com/openai/openai-cookbook/tree/main/examples) - contains example code and prompts for accomplishing common tasks with the API, including Question-answering with Embeddings\n* [Community Forum](https://community.openai.com/)\n\n\n\n\n", "title": "Best practices for prompt engineering with OpenAI API", "article_id": "6654000", "url": "https://help.openai.com/en/articles/6654000-best-practices-for-prompt-engineering-with-openai-api"} \ No newline at end of file +{"text": "\n\n\ud83d\udca1 `If you're just getting started with OpenAI API, we recommend reading the [Introduction](https://beta.openai.com/docs/introduction/introduction) and [Quickstart](https://beta.openai.com/docs/quickstart) tutorials first.`\n\n\n\n**How prompt engineering works**\n================================\n\n\nDue to the way the instruction-following [models](https://beta.openai.com/docs/models) are trained or the data they are trained on, there are specific prompt formats that work particularly well and align better with the tasks at hand. Below we present a number of prompt formats we find work reliably well, but feel free to explore different formats, which may fit your task best.\n\n\n\n\n**Rules of Thumb and Examples**\n===============================\n\n\n**Note**: the \"*{text input here}*\" is a placeholder for actual text/context \n\n\n\n\n**1.** Use the latest model\n----------------------------\n\n\nFor best results, we generally recommend using the latest, most capable models. As of November 2022, the best options are the **\u201ctext-davinci-003\u201d** [model](https://beta.openai.com/docs/models) for text generation, and the **\u201ccode-davinci-002\u201d** model for code generation.\n\n\n\n\n**2. Put instructions at the beginning of the prompt and use ### or \"\"\" to separate the instruction and context**\n-----------------------------------------------------------------------------------------------------------------\n\n\nLess effective \u274c:\n\n\n\n```\nSummarize the text below as a bullet point list of the most important points. \n \n{text input here}\n```\n\n\nBetter \u2705:\n\n\n\n```\nSummarize the text below as a bullet point list of the most important points. \n \nText: \"\"\" \n{text input here} \n\"\"\"\n```\n\n\n\n\n**3. Be specific, descriptive and as detailed as possible about the desired context, outcome, length, format, style, etc**\n---------------------------------------------------------------------------------------------------------------------------\n\n\nBe specific about the context, outcome, length, format, style, etc \n\n\n\nLess effective \u274c:\n\n\n\n```\nWrite a poem about OpenAI. \n```\n\n\nBetter \u2705:\n\n\n\n```\nWrite a short inspiring poem about OpenAI, focusing on the recent DALL-E product launch (DALL-E is a text to image ML model) in the style of a {famous poet}\n```\n\n\n\n**4. Articulate the desired output format through examples ([example 1](https://beta.openai.com/playground/p/DoMbgEMmkXJ5xOyunwFZDHdg), [example 2](https://beta.openai.com/playground/p/3U5Wx7RTIdNNC9Fg8fc44omi)).**\n----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n\n\nLess effective \u274c:\n\n\n\n```\nExtract the entities mentioned in the text below. Extract the following 4 entity types: company names, people names, specific topics and themes. \n \nText: {text}\n```\n\nShow, and tell - the models respond better when shown specific format requirements. This also makes it easier to programmatically parse out multiple outputs reliably.\n\n\n\nBetter \u2705:\n\n\n\n```\nExtract the important entities mentioned in the text below. First extract all company names, then extract all people names, then extract specific topics which fit the content and finally extract general overarching themes \n \nDesired format: \nCompany names: \nPeople names: -||- \nSpecific topics: -||- \nGeneral themes: -||- \n \nText: {text}\n```\n\n\n\n**5. Start with zero-shot, then few-shot ([example](https://beta.openai.com/playground/p/Ts5kvNWlp7wtdgWEkIAbP1hJ)), neither of them worked, then fine-tune**\n-------------------------------------------------------------------------------------------------------------------------------------------------------------\n\n\n\u2705 Zero-shot \n\n\n\n```\nExtract keywords from the below text. \n \nText: {text} \n \nKeywords:\n```\n\n\n\u2705 Few-shot - provide a couple of examples\n\n\n\n```\nExtract keywords from the corresponding texts below. \n \nText 1: Stripe provides APIs that web developers can use to integrate payment processing into their websites and mobile applications. \nKeywords 1: Stripe, payment processing, APIs, web developers, websites, mobile applications \n## \nText 2: OpenAI has trained cutting-edge language models that are very good at understanding and generating text. Our API provides access to these models and can be used to solve virtually any task that involves processing language. \nKeywords 2: OpenAI, language models, text processing, API. \n## \nText 3: {text} \nKeywords 3:\n```\n\n\n\u2705Fine-tune: see fine-tune best practices [here](https://docs.google.com/document/d/1h-GTjNDDKPKU_Rsd0t1lXCAnHltaXTAzQ8K2HRhQf9U/edit#).\n\n\n\n\n**6. Reduce \u201cfluffy\u201d and imprecise descriptions**\n-------------------------------------------------\n\n\nLess effective \u274c:\n\n\n\n```\nThe description for this product should be fairly short, a few sentences only, and not too much more.\n```\n\n\nBetter \u2705:\n\n\n\n```\nUse a 3 to 5 sentence paragraph to describe this product.\n```\n\n\n\n**7. Instead of just saying what not to do, say what to do instead**\n--------------------------------------------------------------------\n\n\nLess effective \u274c:\n\n\n\n```\nThe following is a conversation between an Agent and a Customer. DO NOT ASK USERNAME OR PASSWORD. DO NOT REPEAT. \n \nCustomer: I can\u2019t log in to my account. \nAgent:\n```\n\n\nBetter \u2705:\n\n\n\n```\nThe following is a conversation between an Agent and a Customer. The agent will attempt to diagnose the problem and suggest a solution, whilst refraining from asking any questions related to PII. Instead of asking for PII, such as username or password, refer the user to the help article www.samplewebsite.com/help/faq \n \nCustomer: I can\u2019t log in to my account. \nAgent:\n```\n\n\n\n**8. Code Generation Specific - Use \u201cleading words\u201d to nudge the model toward a particular pattern**\n----------------------------------------------------------------------------------------------------\n\n\nLess effective \u274c:\n\n\n\n```\n# Write a simple python function that \n# 1. Ask me for a number in mile \n# 2. It converts miles to kilometers\n```\n\n\nIn this code example below, adding \u201c*import*\u201d hints to the model that it should start writing in Python. (Similarly \u201cSELECT\u201d is a good hint for the start of a SQL statement.) \n\n\n\nBetter \u2705:\n\n\n\n```\n# Write a simple python function that \n# 1. Ask me for a number in mile \n# 2. It converts miles to kilometers \n \nimport\n```\n\n\n\n\n**Parameters**\n===============\n\n\nGenerally, we find that **`model`** and **`temperature`** are the most commonly used parameters to alter the model output.\n\n\n1. **`model` -** Higher performance [models](https://beta.openai.com/docs/models) are more expensive and have higher latency.\n2. **`temperature` -** A measure of how often the model outputs a less likely token. The higher the `temperature`, the more random (and usually creative) the output. This, however, is not the same as \u201ctruthfulness\u201d. For most factual use cases such as data extraction, and truthful Q&A, the `temperature` of 0 is best.\n3. **`max_tokens`** (**maximum length)** - Does not control the length of the output, but a hard cutoff limit for token generation. Ideally you won\u2019t hit this limit often, as your model will stop either when it thinks it\u2019s finished, or when it hits a stop sequence you defined.\n4. **`stop` (stop sequences)** - A set of characters (tokens) that, when generated, will cause the text generation to stop.\n\nFor other parameter descriptions see the [API reference](https://beta.openai.com/docs/api-reference/completions/create).\n\n\n\n\n**Additional Resources**\n========================\n\n\nIf you're interested in additional resources, we recommend:\n\n\n* Guides\n\n\n\t+ [Text completion](https://beta.openai.com/docs/guides/completion/text-completion) - learn how to generate or edit text using our models\n\t+ [Code completion](https://beta.openai.com/docs/guides/code/code-completion-private-beta) - explore prompt engineering for Codex\n\t+ [Fine-tuning](https://beta.openai.com/docs/guides/fine-tuning/fine-tuning) - Learn how to train a custom model for your use case\n\t+ [Embeddings](https://beta.openai.com/docs/guides/embeddings/embeddings) - learn how to search, classify, and compare text\n\t+ [Moderation](https://beta.openai.com/docs/guides/moderation/moderation)\n* [OpenAI cookbook repo](https://github.com/openai/openai-cookbook/tree/main/examples) - contains example code and prompts for accomplishing common tasks with the API, including Question-answering with Embeddings\n* [Community Forum](https://community.openai.com/)\n\n\n\n\n", "title": "Best practices for prompt engineering with OpenAI API", "article_id": "6654000", "url": "https://help.openai.com/en/articles/6654000-best-practices-for-prompt-engineering-with-openai-api"} diff --git a/examples/support_bot/data/article_6654303.json b/examples/support_bot/data/article_6654303.json index dcdae034..4395a331 100644 --- a/examples/support_bot/data/article_6654303.json +++ b/examples/support_bot/data/article_6654303.json @@ -1 +1 @@ -{"text": "\n**If you can\u2019t log in, after having successfully logged in before\u2026**\n--------------------------------------------------------------------\n\n\n* Refresh your browser\u2019s cache and cookies. We recommend using a desktop device to [log in](https://labs.openai.com/auth/login).\n* Ensure that you are using the correct authentication method. For example, if you signed up using \u2018Continue with Google\u2019, try using that method to [log in](https://chat.openai.com/auth/login) too.\n\n\n**If you see 'There is already a user with email ...' or 'Wrong authentication method'...**\n\n\n* You will see this error if you attempt to login in using a different authentication method from what you originally used to register your account. Your account can only be authenticated if you log in with the auth method that was used during initial registration. For example, if you registered using Google sign-in, please continue using the same method.\n* If you're unsure which method you originally used for signing up please try [signing in](https://labs.openai.com/auth/login) with each of the following methods from a non-Firefox incognito window:\n\n\n\t+ Username + Password\n\t+ \"Continue with Google\" button\n\t+ \"Continue with Microsoft\" button\n\n\n**If you are trying to sign up, and you see \u2018This user already exists\u2019...**\n\n\n* This likely means you already began the [sign up](https://labs.openai.com/auth/login) process, but did not complete it. Try to [login](https://labs.openai.com/auth/login) instead.\n\n\n**If you received a Welcome email, but no verification email\u2026**\n\n\n* Register at \n\n**\ufeffIn the event you still receive \"Something went wrong\" or \"Oops...\"** **errors please try the following:**\n\n\n1. Refresh your cache and cookies, then attempt the login with your chosen authentication method.\n2. Try an incognito browser window to complete sign in\n3. Try logging in from a different browser/computer to see if the issue still persists, as a security add-in or extension can occasionally cause this type of error.\n4. Try another network (wired connection, home WiFi, work WiFi, library/cafe WiFi and/or cellular network).\n", "title": "Why can't I log in to Labs / DALL\u2022E?", "article_id": "6654303", "url": "https://help.openai.com/en/articles/6654303-why-can-t-i-log-in-to-labs-dall-e"} \ No newline at end of file +{"text": "\n**If you can\u2019t log in, after having successfully logged in before\u2026**\n--------------------------------------------------------------------\n\n\n* Refresh your browser\u2019s cache and cookies. We recommend using a desktop device to [log in](https://labs.openai.com/auth/login).\n* Ensure that you are using the correct authentication method. For example, if you signed up using \u2018Continue with Google\u2019, try using that method to [log in](https://chat.openai.com/auth/login) too.\n\n\n**If you see 'There is already a user with email ...' or 'Wrong authentication method'...**\n\n\n* You will see this error if you attempt to login in using a different authentication method from what you originally used to register your account. Your account can only be authenticated if you log in with the auth method that was used during initial registration. For example, if you registered using Google sign-in, please continue using the same method.\n* If you're unsure which method you originally used for signing up please try [signing in](https://labs.openai.com/auth/login) with each of the following methods from a non-Firefox incognito window:\n\n\n\t+ Username + Password\n\t+ \"Continue with Google\" button\n\t+ \"Continue with Microsoft\" button\n\n\n**If you are trying to sign up, and you see \u2018This user already exists\u2019...**\n\n\n* This likely means you already began the [sign up](https://labs.openai.com/auth/login) process, but did not complete it. Try to [login](https://labs.openai.com/auth/login) instead.\n\n\n**If you received a Welcome email, but no verification email\u2026**\n\n\n* Register at \n\n**\ufeffIn the event you still receive \"Something went wrong\" or \"Oops...\"** **errors please try the following:**\n\n\n1. Refresh your cache and cookies, then attempt the login with your chosen authentication method.\n2. Try an incognito browser window to complete sign in\n3. Try logging in from a different browser/computer to see if the issue still persists, as a security add-in or extension can occasionally cause this type of error.\n4. Try another network (wired connection, home WiFi, work WiFi, library/cafe WiFi and/or cellular network).\n", "title": "Why can't I log in to Labs / DALL\u2022E?", "article_id": "6654303", "url": "https://help.openai.com/en/articles/6654303-why-can-t-i-log-in-to-labs-dall-e"} diff --git a/examples/support_bot/data/article_6681258.json b/examples/support_bot/data/article_6681258.json index 2c8faa41..5deb06ae 100644 --- a/examples/support_bot/data/article_6681258.json +++ b/examples/support_bot/data/article_6681258.json @@ -1 +1 @@ -{"text": "**Have you ever tried to solve for x using the OpenAI playground?**\n-------------------------------------------------------------------\n\n\nFor example, solve for x:\n\n\n3 x + 4 = 66\n\n\nFirst you'd isolate terms with *x* to the left hand side like so:\n\n\n3 x + (4 - 4) = 66 - 4\n\n\nthen:\n\n\n3 x = 62\n\n\nto get the result:\n\n\nx = 62 / 3\n\n\n\n... simple, right? Unfortunately, you won\u2019t always get the same result from the [Playground](https://beta.openai.com/playground).\n\n\n\n**Our language models currently struggle with math**\n----------------------------------------------------\n\n\nThe models are not yet capable at performing consistently when asked to solve math problems. In other words if you were to try this example in our Playground using text-davinci-002 you will likely get inconsistent answers when performing math. With some generations you will get the correct answer, however we do not recommend you depend on the GPT models for math tasks.\n\n\n\n**What you can do to improve output consistency in our Playground**\n-------------------------------------------------------------------\n\n\n**Disclaimer**: Even implementing everything below there is only so far we can push the current model.\n\n\n1. The GPT models are great at recognizing patterns, but without enough data they\u2019ll try their best to interpret and recreate a pattern that seems most probable. With minimal data it\u2019s likely to produce a wide variety of potential outputs.\n2. A prompt designed like a homework assignment, will generally have clear instructions on the task and expected output, and may include an example task to further establish the expectations around the task and output format. The text-davinci-002 model does best with an instruction, so the request should be presented in a format that starts with an instruction. Without this the model may not understand your expectations and it will be a bit confused.\n\n**Using the \"solve for x where 3x + 4 = 66\" example:**\n------------------------------------------------------\n\n\nTo improve this [prompt](https://beta.openai.com/playground/p/undsPkd4LAdmFC4SILzvnJ6e) we can add the following:\n\n\n1. Start with an instruction like, \u201cGiven the algebraic equation below, solve for the provided variable\u201d, then test to see the results.\n2. Append to the instruction a description of the expected output, \u201cProvide the answer in the format of \u2018x=\u2019\u201c, then test once more\n3. If results are still inconsistent, append an example problem to the instructions. This example will help establish the pattern that you want the model to recognize and follow, \u201cProblem: 3x+4=66, solve for x. Answer: x=\u201d\n4. The final result will be a [prompt](https://beta.openai.com/playground/p/I4yzqABsUqjQASw6CwM1OftR) that looks like this:\n\n\n```\nGiven the algebraic equation below, solve for the provided variable. Provide the answer in the format of \u2018x=. \nProblem1: y-1=0, solve for y \nAnswer1: y=1 \n--- \nProblem2: 3x+4=66, solve for x. \nAnswer2: x=\n```\n\n\n**Overall recommendation for math problems**\n\n\nWe are aware our currently available models are not yet capable at performing consistently when asked to solve math problems. Consider relying on tools like for now when doing math such as algebraic equations.\n\n", "title": "Doing Math in the Playground", "article_id": "6681258", "url": "https://help.openai.com/en/articles/6681258-doing-math-in-the-playground"} \ No newline at end of file +{"text": "**Have you ever tried to solve for x using the OpenAI playground?**\n-------------------------------------------------------------------\n\n\nFor example, solve for x:\n\n\n3 x + 4 = 66\n\n\nFirst you'd isolate terms with *x* to the left hand side like so:\n\n\n3 x + (4 - 4) = 66 - 4\n\n\nthen:\n\n\n3 x = 62\n\n\nto get the result:\n\n\nx = 62 / 3\n\n\n\n... simple, right? Unfortunately, you won\u2019t always get the same result from the [Playground](https://beta.openai.com/playground).\n\n\n\n**Our language models currently struggle with math**\n----------------------------------------------------\n\n\nThe models are not yet capable at performing consistently when asked to solve math problems. In other words if you were to try this example in our Playground using text-davinci-002 you will likely get inconsistent answers when performing math. With some generations you will get the correct answer, however we do not recommend you depend on the GPT models for math tasks.\n\n\n\n**What you can do to improve output consistency in our Playground**\n-------------------------------------------------------------------\n\n\n**Disclaimer**: Even implementing everything below there is only so far we can push the current model.\n\n\n1. The GPT models are great at recognizing patterns, but without enough data they\u2019ll try their best to interpret and recreate a pattern that seems most probable. With minimal data it\u2019s likely to produce a wide variety of potential outputs.\n2. A prompt designed like a homework assignment, will generally have clear instructions on the task and expected output, and may include an example task to further establish the expectations around the task and output format. The text-davinci-002 model does best with an instruction, so the request should be presented in a format that starts with an instruction. Without this the model may not understand your expectations and it will be a bit confused.\n\n**Using the \"solve for x where 3x + 4 = 66\" example:**\n------------------------------------------------------\n\n\nTo improve this [prompt](https://beta.openai.com/playground/p/undsPkd4LAdmFC4SILzvnJ6e) we can add the following:\n\n\n1. Start with an instruction like, \u201cGiven the algebraic equation below, solve for the provided variable\u201d, then test to see the results.\n2. Append to the instruction a description of the expected output, \u201cProvide the answer in the format of \u2018x=\u2019\u201c, then test once more\n3. If results are still inconsistent, append an example problem to the instructions. This example will help establish the pattern that you want the model to recognize and follow, \u201cProblem: 3x+4=66, solve for x. Answer: x=\u201d\n4. The final result will be a [prompt](https://beta.openai.com/playground/p/I4yzqABsUqjQASw6CwM1OftR) that looks like this:\n\n\n```\nGiven the algebraic equation below, solve for the provided variable. Provide the answer in the format of \u2018x=. \nProblem1: y-1=0, solve for y \nAnswer1: y=1 \n--- \nProblem2: 3x+4=66, solve for x. \nAnswer2: x=\n```\n\n\n**Overall recommendation for math problems**\n\n\nWe are aware our currently available models are not yet capable at performing consistently when asked to solve math problems. Consider relying on tools like for now when doing math such as algebraic equations.\n\n", "title": "Doing Math in the Playground", "article_id": "6681258", "url": "https://help.openai.com/en/articles/6681258-doing-math-in-the-playground"} diff --git a/examples/support_bot/data/article_6684216.json b/examples/support_bot/data/article_6684216.json index 76764e7a..48ef412e 100644 --- a/examples/support_bot/data/article_6684216.json +++ b/examples/support_bot/data/article_6684216.json @@ -1 +1 @@ -{"text": "OpenAI maintains a [Community Libraries](https://beta.openai.com/docs/libraries/community-libraries) page where we list API clients that developers can use to access the OpenAI API.\n\n\n\nIf you've built an open source library that you'd like added to this page \u2013 thank you! We love to see developers build additional API tooling for other developers. We also want to make sure we are steering developers to good solutions that will make them successful long term, so we have a few criteria that we require before listing libraries on our website.\n\n\n\nPlease make sure you meet the criteria listed below, and then fill our our [Community Libraries request form](https://share.hsforms.com/1y0Ixew-rQOOZisFfnhszVA4sk30).\n\n\n1. **Standard open source license** \nTo be listed, we require that community libraries use a [permissive open-source license](https://choosealicense.com/) such as MIT. This allows our customers to more easily fork libraries if necessary in the event that the owners stop maintaining it or adding features.\n2. **Load API keys through environment variables** \nCode samples in the README must encourage the use of environment variables to load the OpenAI API key, instead of hardcoding it in the source code.\n3. **Correct, high quality code that accurately reflects the API** \nCode should be easy to read/follow, and should generally adhere to our [OpenAPI spec](https://github.com/openai/openai-openapi/blob/master/openapi.yaml) \u2013 new libraries should **not** include endpoints marked as `deprecated: true` in this spec.\n4. **State that it\u2019s an unofficial library** \nPlease state somewhere near the top of your README that it\u2019s an \u201cunofficial\" or \"community-maintained\u201d library.\n5. **Commit to maintaining the library** \nThis primarily means addressing issues and reviewing+merging pull requests. It can also be a good idea to set up Github Issue & PR templates like we have in our [official node library](https://github.com/openai/openai-node/tree/master/.github/ISSUE_TEMPLATE). \n\u200b\n", "title": "Adding your API client to the Community Libraries page", "article_id": "6684216", "url": "https://help.openai.com/en/articles/6684216-adding-your-api-client-to-the-community-libraries-page"} \ No newline at end of file +{"text": "OpenAI maintains a [Community Libraries](https://beta.openai.com/docs/libraries/community-libraries) page where we list API clients that developers can use to access the OpenAI API.\n\n\n\nIf you've built an open source library that you'd like added to this page \u2013 thank you! We love to see developers build additional API tooling for other developers. We also want to make sure we are steering developers to good solutions that will make them successful long term, so we have a few criteria that we require before listing libraries on our website.\n\n\n\nPlease make sure you meet the criteria listed below, and then fill our our [Community Libraries request form](https://share.hsforms.com/1y0Ixew-rQOOZisFfnhszVA4sk30).\n\n\n1. **Standard open source license** \nTo be listed, we require that community libraries use a [permissive open-source license](https://choosealicense.com/) such as MIT. This allows our customers to more easily fork libraries if necessary in the event that the owners stop maintaining it or adding features.\n2. **Load API keys through environment variables** \nCode samples in the README must encourage the use of environment variables to load the OpenAI API key, instead of hardcoding it in the source code.\n3. **Correct, high quality code that accurately reflects the API** \nCode should be easy to read/follow, and should generally adhere to our [OpenAPI spec](https://github.com/openai/openai-openapi/blob/master/openapi.yaml) \u2013 new libraries should **not** include endpoints marked as `deprecated: true` in this spec.\n4. **State that it\u2019s an unofficial library** \nPlease state somewhere near the top of your README that it\u2019s an \u201cunofficial\" or \"community-maintained\u201d library.\n5. **Commit to maintaining the library** \nThis primarily means addressing issues and reviewing+merging pull requests. It can also be a good idea to set up Github Issue & PR templates like we have in our [official node library](https://github.com/openai/openai-node/tree/master/.github/ISSUE_TEMPLATE). \n\u200b\n", "title": "Adding your API client to the Community Libraries page", "article_id": "6684216", "url": "https://help.openai.com/en/articles/6684216-adding-your-api-client-to-the-community-libraries-page"} diff --git a/examples/support_bot/data/article_6696591.json b/examples/support_bot/data/article_6696591.json index 13321beb..eade8dfe 100644 --- a/examples/support_bot/data/article_6696591.json +++ b/examples/support_bot/data/article_6696591.json @@ -1 +1 @@ -{"text": "The default rate limit for the DALL\u00b7E API depends which model you are using (DALL\u00b7E 2 vs DALL\u00b7E 3) along with your usage tier. For example, with DALL\u00b7E 3 and usage tier 3, you can generate 7 images per minute. \n\n\n\nLearn more in our [rate limits guide](https://platform.openai.com/docs/guides/rate-limits/usage-tiers). You can also check the specific limits for your account in your [limits page](https://platform.openai.com/account/limits).\n\n\n\n\n", "title": "What's the rate limit for the DALL\u00b7E API?", "article_id": "6696591", "url": "https://help.openai.com/en/articles/6696591-what-s-the-rate-limit-for-the-dall-e-api"} \ No newline at end of file +{"text": "The default rate limit for the DALL\u00b7E API depends which model you are using (DALL\u00b7E 2 vs DALL\u00b7E 3) along with your usage tier. For example, with DALL\u00b7E 3 and usage tier 3, you can generate 7 images per minute. \n\n\n\nLearn more in our [rate limits guide](https://platform.openai.com/docs/guides/rate-limits/usage-tiers). You can also check the specific limits for your account in your [limits page](https://platform.openai.com/account/limits).\n\n\n\n\n", "title": "What's the rate limit for the DALL\u00b7E API?", "article_id": "6696591", "url": "https://help.openai.com/en/articles/6696591-what-s-the-rate-limit-for-the-dall-e-api"} diff --git a/examples/support_bot/data/article_6705023.json b/examples/support_bot/data/article_6705023.json index c0d6c5b1..3e19ee54 100644 --- a/examples/support_bot/data/article_6705023.json +++ b/examples/support_bot/data/article_6705023.json @@ -1 +1 @@ -{"text": "**1. What is the DALL\u00b7E API and how can I access it?**\n\n\nThe DALL\u00b7E API allows you to integrate state of the art image generation capabilities directly into your product. To get started, visit our [developer guide](https://beta.openai.com/docs/guides/images).\n\n\n\n**2. How do I pay for the DALL\u00b7E API?**\n\n\nThe API usage is offered on a pay-as-you-go basis and is billed separately from labs.openai.com. You can find pricing information on our [pricing page](https://openai.com/api/pricing).\n\n\n\nFor large volume discounts (>$5k/month), please [contact sales](https://openai.com/contact-sales/).\n\n\n\n**3. Can I use my OpenAI API trial credits ($5) or labs.openai.com credits on the DALL\u00b7E API?**\n\n\nYou can use the OpenAI API free trial credits ($5) to make DALL\u00b7E API requests.\n\n\n\nDALL\u00b7E API is billed separately from labs.openai.com. Credits granted/purchased on\n\n\nlabs.openai.com do not apply to DALL\u00b7E API.\n\n\n\nFor the latest information on pricing, please see our [pricing page](https://openai.com/api/pricing).\n\n\n\n**4. Are there any API usage limits that I should be aware of?**\n\n\nThe DALL**\u00b7**E API shares the usage limits with other OpenAI API services, which you can find in your [Limits settings](https://platform.openai.com/account/limits). \n\n\n\nAdditionally, org-level rate limits enforce a cap on the number of images you can generate per minute. To learn more, we encourage you to read our help article, \"What's [the rate limit for the DALL\u00b7E API?](https://help.openai.com/en/articles/6696591)\", which provides additional detail.\n\n\n\n**5. Are there any restrictions on the type of content I can generate?**\n\n\nYes - please read our [content policy](https://labs.openai.com/policies/content-policy) to learn what's not allowed on the DALL\u00b7E API.\n\n\n\n**6. Can I sell the images I generate with the API? Can I use it in my application?**\n\n\nSubject to the [Content Policy](https://labs.openai.com/policies/content-policy) and [Terms](https://openai.com/api/policies/terms/), you own the images you create with DALL\u00b7E, including the right to reprint, sell, and merchandise - regardless of whether an image was generated through a free or paid credit.\n\n\n\n**7. What do I need to do before I start serving API outputs to my users?**\n\n\nBefore you launch your product, please make sure you're in compliance with our [use case policy](https://beta.openai.com/docs/usage-policies/use-case-policy) and include [end-user IDs](https://beta.openai.com/docs/usage-policies/end-user-ids) with requests.\n\n\n\n**8. How are images returned by the endpoint?**\n\n\nThe API can output images as URLs (response\\_format =url) or b64\\_json. Our [developer guide](https://beta.openai.com/docs/guides/images) includes more details.\n\n\n\n**9, Which version of DALL\u00b7E is available via the API?**\n\n\nThe API uses the latest version of DALL\u00b7E 2.\n\n\n\n**10. Are the Edit function and Variations features available in the API?**\n\n\nYes - for more detailed instructions, please see our [developer guide](https://beta.openai.com/docs/guides/images).\n\n\n\n**11. Does it support outpainting?**\n\n\nYes! There are many ways to use the /edits endpoint, including inpainting and outpainting. You can try it out firsthand in the [DALL\u00b7E Editor](https://labs.openai.com/editor).\n\n\n\n**12. How can I save output images as files?**\n\n\nThe API can output images as URLs. You'll need to convert these to the format you need. Our [developer guide](https://beta.openai.com/docs/guides/images) includes more details.\n\n\n\n**13. How long do the generated URLs persist?**\n\n\nThe URLs from the API will remain valid for one hour.\n\n\n\n**14. I'm stuck. How do I get help?**\n\n\nFor general help, you can consult our [developer guide](https://beta.openai.com/docs/guides/images) and [help center](https://help.openai.com/en/), or ask questions on our [Community forum](https://community.openai.com/).\n\n", "title": "DALL\u00b7E API FAQ", "article_id": "6705023", "url": "https://help.openai.com/en/articles/6705023-dall-e-api-faq"} \ No newline at end of file +{"text": "**1. What is the DALL\u00b7E API and how can I access it?**\n\n\nThe DALL\u00b7E API allows you to integrate state of the art image generation capabilities directly into your product. To get started, visit our [developer guide](https://beta.openai.com/docs/guides/images).\n\n\n\n**2. How do I pay for the DALL\u00b7E API?**\n\n\nThe API usage is offered on a pay-as-you-go basis and is billed separately from labs.openai.com. You can find pricing information on our [pricing page](https://openai.com/api/pricing).\n\n\n\nFor large volume discounts (>$5k/month), please [contact sales](https://openai.com/contact-sales/).\n\n\n\n**3. Can I use my OpenAI API trial credits ($5) or labs.openai.com credits on the DALL\u00b7E API?**\n\n\nYou can use the OpenAI API free trial credits ($5) to make DALL\u00b7E API requests.\n\n\n\nDALL\u00b7E API is billed separately from labs.openai.com. Credits granted/purchased on\n\n\nlabs.openai.com do not apply to DALL\u00b7E API.\n\n\n\nFor the latest information on pricing, please see our [pricing page](https://openai.com/api/pricing).\n\n\n\n**4. Are there any API usage limits that I should be aware of?**\n\n\nThe DALL**\u00b7**E API shares the usage limits with other OpenAI API services, which you can find in your [Limits settings](https://platform.openai.com/account/limits). \n\n\n\nAdditionally, org-level rate limits enforce a cap on the number of images you can generate per minute. To learn more, we encourage you to read our help article, \"What's [the rate limit for the DALL\u00b7E API?](https://help.openai.com/en/articles/6696591)\", which provides additional detail.\n\n\n\n**5. Are there any restrictions on the type of content I can generate?**\n\n\nYes - please read our [content policy](https://labs.openai.com/policies/content-policy) to learn what's not allowed on the DALL\u00b7E API.\n\n\n\n**6. Can I sell the images I generate with the API? Can I use it in my application?**\n\n\nSubject to the [Content Policy](https://labs.openai.com/policies/content-policy) and [Terms](https://openai.com/api/policies/terms/), you own the images you create with DALL\u00b7E, including the right to reprint, sell, and merchandise - regardless of whether an image was generated through a free or paid credit.\n\n\n\n**7. What do I need to do before I start serving API outputs to my users?**\n\n\nBefore you launch your product, please make sure you're in compliance with our [use case policy](https://beta.openai.com/docs/usage-policies/use-case-policy) and include [end-user IDs](https://beta.openai.com/docs/usage-policies/end-user-ids) with requests.\n\n\n\n**8. How are images returned by the endpoint?**\n\n\nThe API can output images as URLs (response\\_format =url) or b64\\_json. Our [developer guide](https://beta.openai.com/docs/guides/images) includes more details.\n\n\n\n**9, Which version of DALL\u00b7E is available via the API?**\n\n\nThe API uses the latest version of DALL\u00b7E 2.\n\n\n\n**10. Are the Edit function and Variations features available in the API?**\n\n\nYes - for more detailed instructions, please see our [developer guide](https://beta.openai.com/docs/guides/images).\n\n\n\n**11. Does it support outpainting?**\n\n\nYes! There are many ways to use the /edits endpoint, including inpainting and outpainting. You can try it out firsthand in the [DALL\u00b7E Editor](https://labs.openai.com/editor).\n\n\n\n**12. How can I save output images as files?**\n\n\nThe API can output images as URLs. You'll need to convert these to the format you need. Our [developer guide](https://beta.openai.com/docs/guides/images) includes more details.\n\n\n\n**13. How long do the generated URLs persist?**\n\n\nThe URLs from the API will remain valid for one hour.\n\n\n\n**14. I'm stuck. How do I get help?**\n\n\nFor general help, you can consult our [developer guide](https://beta.openai.com/docs/guides/images) and [help center](https://help.openai.com/en/), or ask questions on our [Community forum](https://community.openai.com/).\n\n", "title": "DALL\u00b7E API FAQ", "article_id": "6705023", "url": "https://help.openai.com/en/articles/6705023-dall-e-api-faq"} diff --git a/examples/support_bot/data/article_6742369.json b/examples/support_bot/data/article_6742369.json index 1dc1048b..ed0ba76d 100644 --- a/examples/support_bot/data/article_6742369.json +++ b/examples/support_bot/data/article_6742369.json @@ -1 +1 @@ -{"text": "While the OpenAI website is only available in English, you can use our models in other languages as well. The models are optimized for use in English, but many of them are robust enough to generate good results for a variety of languages.\n\n\n\nWhen thinking about how to adapt our models to different languages, we recommend starting with one of our pre-made prompts, such as this [English to French](https://beta.openai.com/examples/default-translate) prompt example. By replacing the English input and French output with the language you'd like to use, you can create a new prompt customized to your language.\n\n\n\nIf you write your prompt to in Spanish, you're more likely to receive a response in Spanish. We'd recommend experimenting to see what you can achieve with the models!\n\n", "title": "How do I use the OpenAI API in different languages?", "article_id": "6742369", "url": "https://help.openai.com/en/articles/6742369-how-do-i-use-the-openai-api-in-different-languages"} \ No newline at end of file +{"text": "While the OpenAI website is only available in English, you can use our models in other languages as well. The models are optimized for use in English, but many of them are robust enough to generate good results for a variety of languages.\n\n\n\nWhen thinking about how to adapt our models to different languages, we recommend starting with one of our pre-made prompts, such as this [English to French](https://beta.openai.com/examples/default-translate) prompt example. By replacing the English input and French output with the language you'd like to use, you can create a new prompt customized to your language.\n\n\n\nIf you write your prompt to in Spanish, you're more likely to receive a response in Spanish. We'd recommend experimenting to see what you can achieve with the models!\n\n", "title": "How do I use the OpenAI API in different languages?", "article_id": "6742369", "url": "https://help.openai.com/en/articles/6742369-how-do-i-use-the-openai-api-in-different-languages"} diff --git a/examples/support_bot/data/article_6781152.json b/examples/support_bot/data/article_6781152.json index 356ddf6c..6f68483a 100644 --- a/examples/support_bot/data/article_6781152.json +++ b/examples/support_bot/data/article_6781152.json @@ -1 +1 @@ -{"text": "If you want to download the images you generated with DALL\u00b7E, you might be wondering how to do it in bulk. Unfortunately, there is no option to download multiple images at once from the website. However, you can still download your images individually by following these steps: \n\n\n1. Click on the image you want to save. This will open the image in a larger view, with some options to edit it, share it, or create variations.\n2. To download the image, simply click on the download icon in the top right corner of the image. This looks like a downward arrow with a horizontal line under it.\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n\n \n\u200b\n\n", "title": "How can I bulk download my generations?", "article_id": "6781152", "url": "https://help.openai.com/en/articles/6781152-how-can-i-bulk-download-my-generations"} \ No newline at end of file +{"text": "If you want to download the images you generated with DALL\u00b7E, you might be wondering how to do it in bulk. Unfortunately, there is no option to download multiple images at once from the website. However, you can still download your images individually by following these steps: \n\n\n1. Click on the image you want to save. This will open the image in a larger view, with some options to edit it, share it, or create variations.\n2. To download the image, simply click on the download icon in the top right corner of the image. This looks like a downward arrow with a horizontal line under it.\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n\n \n\u200b\n\n", "title": "How can I bulk download my generations?", "article_id": "6781152", "url": "https://help.openai.com/en/articles/6781152-how-can-i-bulk-download-my-generations"} diff --git a/examples/support_bot/data/article_6781222.json b/examples/support_bot/data/article_6781222.json index fe78a6d7..6f0fcc50 100644 --- a/examples/support_bot/data/article_6781222.json +++ b/examples/support_bot/data/article_6781222.json @@ -1 +1 @@ -{"text": "If you want to save your outpainting as a single image, you need to download it at the time of creation. Once you exit outpainting mode, you will not be able to access the full image again (unless you stitch the generation frames together manually). This is because generation frames are stored individually, without the rest of the larger composition.\n\n\n\nIf you want download your outpainting as a single image whilst creating, just click the download icon in the top-right hand corner. This looks like a downward arrow with a horizontal line under it.\n\n\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n\n", "title": "How can I download my outpainting?", "article_id": "6781222", "url": "https://help.openai.com/en/articles/6781222-how-can-i-download-my-outpainting"} \ No newline at end of file +{"text": "If you want to save your outpainting as a single image, you need to download it at the time of creation. Once you exit outpainting mode, you will not be able to access the full image again (unless you stitch the generation frames together manually). This is because generation frames are stored individually, without the rest of the larger composition.\n\n\n\nIf you want download your outpainting as a single image whilst creating, just click the download icon in the top-right hand corner. This looks like a downward arrow with a horizontal line under it.\n\n\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n\n", "title": "How can I download my outpainting?", "article_id": "6781222", "url": "https://help.openai.com/en/articles/6781222-how-can-i-download-my-outpainting"} diff --git a/examples/support_bot/data/article_6781228.json b/examples/support_bot/data/article_6781228.json index eb301480..fe7d57cb 100644 --- a/examples/support_bot/data/article_6781228.json +++ b/examples/support_bot/data/article_6781228.json @@ -1 +1 @@ -{"text": "You might be tempted to instruct DALL\u00b7E to generate text in your image, by giving it instructions like \"a blue sky with white clouds and the word hello in skywriting\". \n\n\n\nHowever, this is not a reliable or effective way to create text. DALL\u00b7E is not currently designed to produce text, but to generate realistic and artistic images based on your keywords or phrases. Right now, it does not have a specific understanding of writing, labels or any other common text and often produces distorted or unintelligible results.\n\n\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n\n\n", "title": "How can I generate text in my image?", "article_id": "6781228", "url": "https://help.openai.com/en/articles/6781228-how-can-i-generate-text-in-my-image"} \ No newline at end of file +{"text": "You might be tempted to instruct DALL\u00b7E to generate text in your image, by giving it instructions like \"a blue sky with white clouds and the word hello in skywriting\". \n\n\n\nHowever, this is not a reliable or effective way to create text. DALL\u00b7E is not currently designed to produce text, but to generate realistic and artistic images based on your keywords or phrases. Right now, it does not have a specific understanding of writing, labels or any other common text and often produces distorted or unintelligible results.\n\n\n\n\n\n```\nThis article was generated with the help of GPT-3.\n```\n\n\n", "title": "How can I generate text in my image?", "article_id": "6781228", "url": "https://help.openai.com/en/articles/6781228-how-can-i-generate-text-in-my-image"} diff --git a/examples/support_bot/data/article_6783457.json b/examples/support_bot/data/article_6783457.json index d61d2011..e7bc2143 100644 --- a/examples/support_bot/data/article_6783457.json +++ b/examples/support_bot/data/article_6783457.json @@ -1 +1 @@ -{"text": "1. **How much does it cost to use ChatGPT?**\n\n\n\t* The research preview of ChatGPT is free to use.\n2. **How does ChatGPT work?**\n\n\n\t* ChatGPT is fine-tuned from GPT-3.5, a language model trained to produce text. ChatGPT was optimized for dialogue by using Reinforcement Learning with Human Feedback (RLHF) \u2013 a method that uses human demonstrations and preference comparisons to guide the model toward desired behavior.\n3. **Why does the AI seem so real and lifelike?** \n\n\n\t* These models were trained on vast amounts of data from the internet written by humans, including conversations, so the responses it provides may sound human-like. It is important to keep in mind that this is a direct result of the system's design (i.e. maximizing the similarity between outputs and the dataset the models were trained on) and that such outputs may be inaccurate, untruthful, and otherwise misleading at times.\n4. **Can I trust that the AI is telling me the truth?**\n\n\n\t* ChatGPT is not connected to the internet, and it can occasionally produce incorrect answers. It has limited knowledge of world and events after 2021 and may also occasionally produce harmful instructions or biased content.\n\t\n\t\n\t\n\tWe'd recommend checking whether responses from the model are accurate or not. If you find an answer is incorrect, please provide that feedback by using the \"Thumbs Down\" button.\n5. **Who can view my conversations?**\n\n\n\t* As part of our commitment to safe and responsible AI, we review conversations to improve our systems and to ensure the content complies with our policies and safety requirements.\n6. **Will you use my conversations for training?**\n\n\n\t* Yes. Your conversations may be reviewed by our AI trainers to improve our systems.\n7. **Can you delete my data?**\n\n\n\t* Yes, please follow the [data deletion process](https://help.openai.com/en/articles/6378407-how-can-i-delete-my-account).\n8. **Can you delete specific prompts?**\n\n\n\t* No, we are not able to delete specific prompts from your history. Please don't share any sensitive information in your conversations.\n9. **Can I see my history of threads? How can I save a conversation I\u2019ve had?**\n\n\n\t* Yes, you can now view and continue your past conversations.\n10. **Where do you save my personal and conversation data?**\n\n\n\t* For more information on how we handle data, please see our [Privacy Policy](https://openai.com/privacy/) and [Terms of Use](https://openai.com/api/policies/terms/).\n11. **How can I implement this? Is there any implementation guide for this?**\n\n\n\t* Developers can [now](https://openai.com/blog/introducing-chatgpt-and-whisper-apis) integrate ChatGPT into their applications and products through our API. Users can expect continuous model improvements and the option to choose dedicated capacity for deeper control over the models. To learn more, please check out the documentation [here](https://platform.openai.com/docs/api-reference/chat).\n12. **Do I need a new account if I already have a Labs or Playground account?**\n\n\n\t* If you have an existing account at [labs.openai.com](https://www.google.com/url?q=http://labs.openai.com&sa=D&source=docs&ust=1669833084818742&usg=AOvVaw3xrSlGIVLLVKjnchqinjLs) or [beta.openai.com](https://www.google.com/url?q=http://beta.openai.com&sa=D&source=docs&ust=1669833084818875&usg=AOvVaw11EJaho-h4CU4I-OMT7x3j), then you can login directly at [chat.openai.com](https://www.google.com/url?q=http://chat.openai.com&sa=D&source=docs&ust=1669833084818926&usg=AOvVaw13rLwSrAYiV5hOL5oPsYDq) using the same login information. If you don't have an account, you'll need to sign-up for a new account at [chat.openai.com](https://www.google.com/url?q=http://chat.openai.com&sa=D&source=docs&ust=1669833084818980&usg=AOvVaw3_WRKLYk-Z3bm-D1EABgkJ).\n13. **Why did ChatGPT give me an answer that\u2019s not related to my question?**\n\n\n\t* ChatGPT will occasionally make up facts or \u201challucinate\u201d outputs. If you find an answer is unrelated, please provide that feedback by using the \"Thumbs Down\" button\n14. **Can I use output from ChatGPT for commercial uses?**\n\n\n\t* Subject to the [Content Policy](https://labs.openai.com/policies/content-policy) and [Terms](https://openai.com/api/policies/terms/), you own the output you create with ChatGPT, including the right to reprint, sell, and merchandise \u2013 regardless of whether output was generated through a free or paid plan.\n15. **I accidentally provided incorrect information during sign-up and now I'm unable to complete the process. How can I fix this issue?**\n\n\n\t* Please reach out to our support team by initiating a new conversation using the on-site chat tool at help.openai.com. We'll be happy to help!\n", "title": "What is ChatGPT?", "article_id": "6783457", "url": "https://help.openai.com/en/articles/6783457-what-is-chatgpt"} \ No newline at end of file +{"text": "1. **How much does it cost to use ChatGPT?**\n\n\n\t* The research preview of ChatGPT is free to use.\n2. **How does ChatGPT work?**\n\n\n\t* ChatGPT is fine-tuned from GPT-3.5, a language model trained to produce text. ChatGPT was optimized for dialogue by using Reinforcement Learning with Human Feedback (RLHF) \u2013 a method that uses human demonstrations and preference comparisons to guide the model toward desired behavior.\n3. **Why does the AI seem so real and lifelike?** \n\n\n\t* These models were trained on vast amounts of data from the internet written by humans, including conversations, so the responses it provides may sound human-like. It is important to keep in mind that this is a direct result of the system's design (i.e. maximizing the similarity between outputs and the dataset the models were trained on) and that such outputs may be inaccurate, untruthful, and otherwise misleading at times.\n4. **Can I trust that the AI is telling me the truth?**\n\n\n\t* ChatGPT is not connected to the internet, and it can occasionally produce incorrect answers. It has limited knowledge of world and events after 2021 and may also occasionally produce harmful instructions or biased content.\n\t\n\t\n\t\n\tWe'd recommend checking whether responses from the model are accurate or not. If you find an answer is incorrect, please provide that feedback by using the \"Thumbs Down\" button.\n5. **Who can view my conversations?**\n\n\n\t* As part of our commitment to safe and responsible AI, we review conversations to improve our systems and to ensure the content complies with our policies and safety requirements.\n6. **Will you use my conversations for training?**\n\n\n\t* Yes. Your conversations may be reviewed by our AI trainers to improve our systems.\n7. **Can you delete my data?**\n\n\n\t* Yes, please follow the [data deletion process](https://help.openai.com/en/articles/6378407-how-can-i-delete-my-account).\n8. **Can you delete specific prompts?**\n\n\n\t* No, we are not able to delete specific prompts from your history. Please don't share any sensitive information in your conversations.\n9. **Can I see my history of threads? How can I save a conversation I\u2019ve had?**\n\n\n\t* Yes, you can now view and continue your past conversations.\n10. **Where do you save my personal and conversation data?**\n\n\n\t* For more information on how we handle data, please see our [Privacy Policy](https://openai.com/privacy/) and [Terms of Use](https://openai.com/api/policies/terms/).\n11. **How can I implement this? Is there any implementation guide for this?**\n\n\n\t* Developers can [now](https://openai.com/blog/introducing-chatgpt-and-whisper-apis) integrate ChatGPT into their applications and products through our API. Users can expect continuous model improvements and the option to choose dedicated capacity for deeper control over the models. To learn more, please check out the documentation [here](https://platform.openai.com/docs/api-reference/chat).\n12. **Do I need a new account if I already have a Labs or Playground account?**\n\n\n\t* If you have an existing account at [labs.openai.com](https://www.google.com/url?q=http://labs.openai.com&sa=D&source=docs&ust=1669833084818742&usg=AOvVaw3xrSlGIVLLVKjnchqinjLs) or [beta.openai.com](https://www.google.com/url?q=http://beta.openai.com&sa=D&source=docs&ust=1669833084818875&usg=AOvVaw11EJaho-h4CU4I-OMT7x3j), then you can login directly at [chat.openai.com](https://www.google.com/url?q=http://chat.openai.com&sa=D&source=docs&ust=1669833084818926&usg=AOvVaw13rLwSrAYiV5hOL5oPsYDq) using the same login information. If you don't have an account, you'll need to sign-up for a new account at [chat.openai.com](https://www.google.com/url?q=http://chat.openai.com&sa=D&source=docs&ust=1669833084818980&usg=AOvVaw3_WRKLYk-Z3bm-D1EABgkJ).\n13. **Why did ChatGPT give me an answer that\u2019s not related to my question?**\n\n\n\t* ChatGPT will occasionally make up facts or \u201challucinate\u201d outputs. If you find an answer is unrelated, please provide that feedback by using the \"Thumbs Down\" button\n14. **Can I use output from ChatGPT for commercial uses?**\n\n\n\t* Subject to the [Content Policy](https://labs.openai.com/policies/content-policy) and [Terms](https://openai.com/api/policies/terms/), you own the output you create with ChatGPT, including the right to reprint, sell, and merchandise \u2013 regardless of whether output was generated through a free or paid plan.\n15. **I accidentally provided incorrect information during sign-up and now I'm unable to complete the process. How can I fix this issue?**\n\n\n\t* Please reach out to our support team by initiating a new conversation using the on-site chat tool at help.openai.com. We'll be happy to help!\n", "title": "What is ChatGPT?", "article_id": "6783457", "url": "https://help.openai.com/en/articles/6783457-what-is-chatgpt"} diff --git a/examples/support_bot/data/article_6824809.json b/examples/support_bot/data/article_6824809.json index c9111049..593c7a3a 100644 --- a/examples/support_bot/data/article_6824809.json +++ b/examples/support_bot/data/article_6824809.json @@ -1 +1 @@ -{"text": "How can I tell how many tokens a string will have before I try to embed it?\n===========================================================================\n\n\nFor V2 embedding models, as of Dec 2022, there is not yet a way to split a string into tokens. The only way to get total token counts is to submit an API request.\n\n\n* If the request succeeds, you can extract the number of tokens from the response: `response[\u201cusage\u201d][\u201ctotal\\_tokens\u201d]`\n* If the request fails for having too many tokens, you can extract the number of tokens from the error message: `This model's maximum context length is 8191 tokens, however you requested 10000 tokens (10000 in your prompt; 0 for the completion). Please reduce your prompt; or completion length.`\n\n\nFor V1 embedding models, which are based on GPT-2/GPT-3 tokenization, you can count tokens in a few ways:\n\n\n* For one-off checks, the [OpenAI tokenizer](https://beta.openai.com/tokenizer) page is convenient\n* In Python, [transformers.GPT2TokenizerFast](https://huggingface.co/docs/transformers/model_doc/gpt2#transformers.GPT2TokenizerFast) (the GPT-2 tokenizer is the same as GPT-3)\n* In JavaScript, [gpt-3-encoder](https://www.npmjs.com/package/gpt-3-encoder)\n\n\nHow can I retrieve K nearest embedding vectors quickly?\n=======================================================\n\n\nFor searching over many vectors quickly, we recommend using a vector database.\n\n\n\nVector database options include:\n\n\n* [Pinecone](https://www.pinecone.io/), a fully managed vector database\n* [Weaviate](https://weaviate.io/), an open-source vector search engine\n* [Faiss](https://engineering.fb.com/2017/03/29/data-infrastructure/faiss-a-library-for-efficient-similarity-search/), a vector search algorithm by Facebook\n\nWhich distance function should I use?\n=====================================\n\n\nWe recommend [cosine similarity](https://en.wikipedia.org/wiki/Cosine_similarity). The choice of distance function typically doesn\u2019t matter much.\n\n\n\nOpenAI embeddings are normalized to length 1, which means that:\n\n\n* Cosine similarity can be computed slightly faster using just a dot product\n* Cosine similarity and Euclidean distance will result in the identical rankings\n", "title": "Embeddings - Frequently Asked Questions", "article_id": "6824809", "url": "https://help.openai.com/en/articles/6824809-embeddings-frequently-asked-questions"} \ No newline at end of file +{"text": "How can I tell how many tokens a string will have before I try to embed it?\n===========================================================================\n\n\nFor V2 embedding models, as of Dec 2022, there is not yet a way to split a string into tokens. The only way to get total token counts is to submit an API request.\n\n\n* If the request succeeds, you can extract the number of tokens from the response: `response[\u201cusage\u201d][\u201ctotal\\_tokens\u201d]`\n* If the request fails for having too many tokens, you can extract the number of tokens from the error message: `This model's maximum context length is 8191 tokens, however you requested 10000 tokens (10000 in your prompt; 0 for the completion). Please reduce your prompt; or completion length.`\n\n\nFor V1 embedding models, which are based on GPT-2/GPT-3 tokenization, you can count tokens in a few ways:\n\n\n* For one-off checks, the [OpenAI tokenizer](https://beta.openai.com/tokenizer) page is convenient\n* In Python, [transformers.GPT2TokenizerFast](https://huggingface.co/docs/transformers/model_doc/gpt2#transformers.GPT2TokenizerFast) (the GPT-2 tokenizer is the same as GPT-3)\n* In JavaScript, [gpt-3-encoder](https://www.npmjs.com/package/gpt-3-encoder)\n\n\nHow can I retrieve K nearest embedding vectors quickly?\n=======================================================\n\n\nFor searching over many vectors quickly, we recommend using a vector database.\n\n\n\nVector database options include:\n\n\n* [Pinecone](https://www.pinecone.io/), a fully managed vector database\n* [Weaviate](https://weaviate.io/), an open-source vector search engine\n* [Faiss](https://engineering.fb.com/2017/03/29/data-infrastructure/faiss-a-library-for-efficient-similarity-search/), a vector search algorithm by Facebook\n\nWhich distance function should I use?\n=====================================\n\n\nWe recommend [cosine similarity](https://en.wikipedia.org/wiki/Cosine_similarity). The choice of distance function typically doesn\u2019t matter much.\n\n\n\nOpenAI embeddings are normalized to length 1, which means that:\n\n\n* Cosine similarity can be computed slightly faster using just a dot product\n* Cosine similarity and Euclidean distance will result in the identical rankings\n", "title": "Embeddings - Frequently Asked Questions", "article_id": "6824809", "url": "https://help.openai.com/en/articles/6824809-embeddings-frequently-asked-questions"} diff --git a/examples/support_bot/data/article_6837156.json b/examples/support_bot/data/article_6837156.json index dc1e627c..8b7bff2c 100644 --- a/examples/support_bot/data/article_6837156.json +++ b/examples/support_bot/data/article_6837156.json @@ -1 +1 @@ -{"text": "For details on our data policy, please see our [Terms of Use](https://openai.com/terms/) and [Privacy Policy](https://openai.com/privacy/).\n\n", "title": "Terms of Use", "article_id": "6837156", "url": "https://help.openai.com/en/articles/6837156-terms-of-use"} \ No newline at end of file +{"text": "For details on our data policy, please see our [Terms of Use](https://openai.com/terms/) and [Privacy Policy](https://openai.com/privacy/).\n\n", "title": "Terms of Use", "article_id": "6837156", "url": "https://help.openai.com/en/articles/6837156-terms-of-use"} diff --git a/examples/support_bot/data/article_6843909.json b/examples/support_bot/data/article_6843909.json index 03863b2b..24775020 100644 --- a/examples/support_bot/data/article_6843909.json +++ b/examples/support_bot/data/article_6843909.json @@ -1 +1 @@ -{"text": "### Please read our **[rate limit documentation](https://beta.openai.com/docs/guides/rate-limits)** in its entirety.\n\n\nIf you would like to increase your rate limits, please note that you can do so by [increasing your usage tier](https://platform.openai.com/docs/guides/rate-limits/usage-tiers). You can view your current rate limits, your current usage tier, and how to raise your usage tier/limits in the [Limits section](https://platform.openai.com/account/limits) of your account settings.\n\n", "title": "Rate Limits and 429: 'Too Many Requests' Errors", "article_id": "6843909", "url": "https://help.openai.com/en/articles/6843909-rate-limits-and-429-too-many-requests-errors"} \ No newline at end of file +{"text": "### Please read our **[rate limit documentation](https://beta.openai.com/docs/guides/rate-limits)** in its entirety.\n\n\nIf you would like to increase your rate limits, please note that you can do so by [increasing your usage tier](https://platform.openai.com/docs/guides/rate-limits/usage-tiers). You can view your current rate limits, your current usage tier, and how to raise your usage tier/limits in the [Limits section](https://platform.openai.com/account/limits) of your account settings.\n\n", "title": "Rate Limits and 429: 'Too Many Requests' Errors", "article_id": "6843909", "url": "https://help.openai.com/en/articles/6843909-rate-limits-and-429-too-many-requests-errors"} diff --git a/examples/support_bot/data/article_6843914.json b/examples/support_bot/data/article_6843914.json index 96d63621..40986a68 100644 --- a/examples/support_bot/data/article_6843914.json +++ b/examples/support_bot/data/article_6843914.json @@ -1 +1 @@ -{"text": "Here's an [article](https://help.openai.com/en/articles/6783457-chatgpt-faq) answering frequently asked questions about ChatGPT.\n\n", "title": "ChatGPT general questions", "article_id": "6843914", "url": "https://help.openai.com/en/articles/6843914-chatgpt-general-questions"} \ No newline at end of file +{"text": "Here's an [article](https://help.openai.com/en/articles/6783457-chatgpt-faq) answering frequently asked questions about ChatGPT.\n\n", "title": "ChatGPT general questions", "article_id": "6843914", "url": "https://help.openai.com/en/articles/6843914-chatgpt-general-questions"} diff --git a/examples/support_bot/data/article_6882433.json b/examples/support_bot/data/article_6882433.json index c7a191a7..d5f69a88 100644 --- a/examples/support_bot/data/article_6882433.json +++ b/examples/support_bot/data/article_6882433.json @@ -1 +1 @@ -{"text": "When you get the error message:\n\n\n\n\n```\nIncorrect API key provided: API_KEY*********************************ZXY. You can find your API key at https://beta.openai.com\n```\n\n\nHere are a few simple steps you can take to resolve this issue.\n\n\n\nStep 1: Clear your browser's cache\n\n\nThe first step is to clear your browser's cache. Sometimes, your browser may hold onto an outdated version of your API key, which can cause this error message to appear. To clear your browser's cache, follow the instructions for your specific browser:\n\n\n* For Google Chrome, click on the three dots in the top-right corner of the browser and select \"History.\" Then, click on \"Clear browsing data\" and select \"Cookies and other site data\" and \"Cached images and files.\"\n* For Firefox, click on the three lines in the top-right corner of the browser and select \"Options.\" Then, click on \"Privacy & Security\" and scroll down to \"Cookies and Site Data.\" Click on \"Clear Data\" and select \"Cookies and Site Data\" and \"Cached Web Content.\"\n* For Safari, click on \"Safari\" in the top menu bar and select \"Preferences.\" Then, click on the \"Privacy\" tab and click on \"Manage Website Data.\" Select \"Remove All\" to clear your browser's cache.\n\nStep 2: Retry your request\n\n\nAfter clearing your browser's cache, try your request again. If the error message still appears, then move to the next step.\n\n\n\nStep 3: Check your API key\n\n\nCheck your API key at **[https://beta.openai.com](https://beta.openai.com/)** and verify it with the API key shown in the error message. Sometimes, the error message may include an old or incorrect API key that you no longer use. Double-check that you are using the correct API key for the request you're making.\n\n\n\nStep 4: Verify that you're not using two different API keys\n\n\nAnother possibility is that you may have accidentally used two different API keys. Make sure that you are using the same API key throughout your application or script and not switching between different keys.\n\n\n\nIf you still need help please reach out to our support team, and they will assist you with resolving the issue.\n\n\n \n\u200b\n\n\n\n", "title": "Incorrect API key provided", "article_id": "6882433", "url": "https://help.openai.com/en/articles/6882433-incorrect-api-key-provided"} \ No newline at end of file +{"text": "When you get the error message:\n\n\n\n\n```\nIncorrect API key provided: API_KEY*********************************ZXY. You can find your API key at https://beta.openai.com\n```\n\n\nHere are a few simple steps you can take to resolve this issue.\n\n\n\nStep 1: Clear your browser's cache\n\n\nThe first step is to clear your browser's cache. Sometimes, your browser may hold onto an outdated version of your API key, which can cause this error message to appear. To clear your browser's cache, follow the instructions for your specific browser:\n\n\n* For Google Chrome, click on the three dots in the top-right corner of the browser and select \"History.\" Then, click on \"Clear browsing data\" and select \"Cookies and other site data\" and \"Cached images and files.\"\n* For Firefox, click on the three lines in the top-right corner of the browser and select \"Options.\" Then, click on \"Privacy & Security\" and scroll down to \"Cookies and Site Data.\" Click on \"Clear Data\" and select \"Cookies and Site Data\" and \"Cached Web Content.\"\n* For Safari, click on \"Safari\" in the top menu bar and select \"Preferences.\" Then, click on the \"Privacy\" tab and click on \"Manage Website Data.\" Select \"Remove All\" to clear your browser's cache.\n\nStep 2: Retry your request\n\n\nAfter clearing your browser's cache, try your request again. If the error message still appears, then move to the next step.\n\n\n\nStep 3: Check your API key\n\n\nCheck your API key at **[https://beta.openai.com](https://beta.openai.com/)** and verify it with the API key shown in the error message. Sometimes, the error message may include an old or incorrect API key that you no longer use. Double-check that you are using the correct API key for the request you're making.\n\n\n\nStep 4: Verify that you're not using two different API keys\n\n\nAnother possibility is that you may have accidentally used two different API keys. Make sure that you are using the same API key throughout your application or script and not switching between different keys.\n\n\n\nIf you still need help please reach out to our support team, and they will assist you with resolving the issue.\n\n\n \n\u200b\n\n\n\n", "title": "Incorrect API key provided", "article_id": "6882433", "url": "https://help.openai.com/en/articles/6882433-incorrect-api-key-provided"} diff --git a/examples/support_bot/data/article_6891753.json b/examples/support_bot/data/article_6891753.json index 8e7b98ef..25acbeea 100644 --- a/examples/support_bot/data/article_6891753.json +++ b/examples/support_bot/data/article_6891753.json @@ -1 +1 @@ -{"text": "Every organization is bound by rate limits which determine how many requests can be sent per second. This rate limit has been hit by the request.\n\n\n\nRate limits can be quantized, meaning they are enforced over shorter periods of time (e.g. 60,000 requests/minute may be enforced as 1,000 requests/second). Sending short bursts of requests or contexts (prompts+max\\_tokens) that are too long can lead to rate limit errors, even when you are technically below the rate limit per minute.\n\n\n\n**How can I fix it?**\n\n\n* Include [exponential back-off](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_handle_rate_limits.ipynb) logic in your code. This will catch and retry failed requests.\n* For token limits\n\n\n\t+ Reduce the [max\\_tokens](https://beta.openai.com/docs/api-reference/completions/create#completions/create-max_tokens) to match the size of your completions. Usage needs are estimated from this value, so reducing it will decrease the chance that you unexpectedly receive a rate limit error. For example, if your prompt creates completions around 400 tokens, the max\\_tokens value should be around the same size.\n\t+ [Optimize your prompts](https://github.com/openai/openai-cookbook/tree/main#more-prompt-advice). You can do this by making your instructions shorter, removing extra words, and getting rid of extra examples. You might need to work on your prompt and test it after these changes to make sure it still works well. The added benefit of a shorter prompt is reduced cost to you. If you need help, let us know.\n* If none of the previous steps work and you are consistently hitting a Rate Limit Error, you can increase your rate limits by [increasing your usage tier](https://platform.openai.com/docs/guides/rate-limits/usage-tiers). You can view your current rate limits, your current usage tier, and how to raise your usage tier/limits in the [Limits section](https://platform.openai.com/account/limits) of your account settings.\n\nIf you'd like to know more, please check out our updated guidance [here](https://beta.openai.com/docs/guides/rate-limits).\n\n", "title": "Rate Limit Advice", "article_id": "6891753", "url": "https://help.openai.com/en/articles/6891753-rate-limit-advice"} \ No newline at end of file +{"text": "Every organization is bound by rate limits which determine how many requests can be sent per second. This rate limit has been hit by the request.\n\n\n\nRate limits can be quantized, meaning they are enforced over shorter periods of time (e.g. 60,000 requests/minute may be enforced as 1,000 requests/second). Sending short bursts of requests or contexts (prompts+max\\_tokens) that are too long can lead to rate limit errors, even when you are technically below the rate limit per minute.\n\n\n\n**How can I fix it?**\n\n\n* Include [exponential back-off](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_handle_rate_limits.ipynb) logic in your code. This will catch and retry failed requests.\n* For token limits\n\n\n\t+ Reduce the [max\\_tokens](https://beta.openai.com/docs/api-reference/completions/create#completions/create-max_tokens) to match the size of your completions. Usage needs are estimated from this value, so reducing it will decrease the chance that you unexpectedly receive a rate limit error. For example, if your prompt creates completions around 400 tokens, the max\\_tokens value should be around the same size.\n\t+ [Optimize your prompts](https://github.com/openai/openai-cookbook/tree/main#more-prompt-advice). You can do this by making your instructions shorter, removing extra words, and getting rid of extra examples. You might need to work on your prompt and test it after these changes to make sure it still works well. The added benefit of a shorter prompt is reduced cost to you. If you need help, let us know.\n* If none of the previous steps work and you are consistently hitting a Rate Limit Error, you can increase your rate limits by [increasing your usage tier](https://platform.openai.com/docs/guides/rate-limits/usage-tiers). You can view your current rate limits, your current usage tier, and how to raise your usage tier/limits in the [Limits section](https://platform.openai.com/account/limits) of your account settings.\n\nIf you'd like to know more, please check out our updated guidance [here](https://beta.openai.com/docs/guides/rate-limits).\n\n", "title": "Rate Limit Advice", "article_id": "6891753", "url": "https://help.openai.com/en/articles/6891753-rate-limit-advice"} diff --git a/examples/support_bot/data/article_6891767.json b/examples/support_bot/data/article_6891767.json index b0e69e98..e79a697b 100644 --- a/examples/support_bot/data/article_6891767.json +++ b/examples/support_bot/data/article_6891767.json @@ -1 +1 @@ -{"text": "This error message indicates that your authentication credentials are invalid. This could happen for several reasons, such as:\n\n\n\n- You are using a revoked API key.\n\n\n- You are using a different API key than one under the requesting organization.\n\n\n- You are using an API key that does not have the required permissions for the endpoint you are calling.\n\n\n\nTo resolve this error, please follow these steps:\n\n\n\n- Check that you are using the correct API key and organization ID in your request header. You can find your API key and organization ID in your account settings [here](https://platform.openai.com/account/api-keys).\n\n\n- If you are unsure whether your API key is valid, you can generate a new one here. Make sure to replace your old API key with the new one in your requests and follow our [best practices](https://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety).\n\n", "title": "Error Code 401 - Invalid Authentication", "article_id": "6891767", "url": "https://help.openai.com/en/articles/6891767-error-code-401-invalid-authentication"} \ No newline at end of file +{"text": "This error message indicates that your authentication credentials are invalid. This could happen for several reasons, such as:\n\n\n\n- You are using a revoked API key.\n\n\n- You are using a different API key than one under the requesting organization.\n\n\n- You are using an API key that does not have the required permissions for the endpoint you are calling.\n\n\n\nTo resolve this error, please follow these steps:\n\n\n\n- Check that you are using the correct API key and organization ID in your request header. You can find your API key and organization ID in your account settings [here](https://platform.openai.com/account/api-keys).\n\n\n- If you are unsure whether your API key is valid, you can generate a new one here. Make sure to replace your old API key with the new one in your requests and follow our [best practices](https://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety).\n\n", "title": "Error Code 401 - Invalid Authentication", "article_id": "6891767", "url": "https://help.openai.com/en/articles/6891767-error-code-401-invalid-authentication"} diff --git a/examples/support_bot/data/article_6891781.json b/examples/support_bot/data/article_6891781.json index ca9264d1..50c53871 100644 --- a/examples/support_bot/data/article_6891781.json +++ b/examples/support_bot/data/article_6891781.json @@ -1 +1 @@ -{"text": "This error message indicates that the API key you are using in your request is not correct. This could happen for several reasons, such as:\n\n\n\n- You are using a typo or an extra space in your API key.\n\n\n- You are using an API key that belongs to a different organization.\n\n\n- You are using an API key that has been deleted or deactivated\n\n\n- Your API key might be cached.\n\n\n\nTo resolve this error, please follow these steps:\n\n\n\n- Try clearing your browser's cache and cookies then try again.\n\n\n- Check that you are using the correct API key in your request header. Follow the instructions in our [Authentication](https://platform.openai.com/docs/api-reference/authentication) section to ensure your key is correctly formatted (i.e. 'Bearer ') \n\n\n- If you are unsure whether your API key is correct, you can generate a new one [here](https://platform.openai.com/account/api-keys). Make sure to replace your old API key in your codebase and follow our [best practices](https://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety).\n\n", "title": "Error Code 401 - Incorrect API key provided", "article_id": "6891781", "url": "https://help.openai.com/en/articles/6891781-error-code-401-incorrect-api-key-provided"} \ No newline at end of file +{"text": "This error message indicates that the API key you are using in your request is not correct. This could happen for several reasons, such as:\n\n\n\n- You are using a typo or an extra space in your API key.\n\n\n- You are using an API key that belongs to a different organization.\n\n\n- You are using an API key that has been deleted or deactivated\n\n\n- Your API key might be cached.\n\n\n\nTo resolve this error, please follow these steps:\n\n\n\n- Try clearing your browser's cache and cookies then try again.\n\n\n- Check that you are using the correct API key in your request header. Follow the instructions in our [Authentication](https://platform.openai.com/docs/api-reference/authentication) section to ensure your key is correctly formatted (i.e. 'Bearer ') \n\n\n- If you are unsure whether your API key is correct, you can generate a new one [here](https://platform.openai.com/account/api-keys). Make sure to replace your old API key in your codebase and follow our [best practices](https://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety).\n\n", "title": "Error Code 401 - Incorrect API key provided", "article_id": "6891781", "url": "https://help.openai.com/en/articles/6891781-error-code-401-incorrect-api-key-provided"} diff --git a/examples/support_bot/data/article_6891827.json b/examples/support_bot/data/article_6891827.json index 5ef9ba25..447e03b0 100644 --- a/examples/support_bot/data/article_6891827.json +++ b/examples/support_bot/data/article_6891827.json @@ -1 +1 @@ -{"text": "This error message indicates that your account is not part of an organization. This could happen for several reasons, such as:\n\n\n\n- You have left or been removed from your previous organization.\n\n\n- Your organization has been deleted.\n\n\n\nTo resolve this error, please follow these steps:\n\n\n\n- If you have left or been removed from your previous organization, you can either request a new organization or get invited to an existing one.\n\n\n- To request a new organization, reach out to us via help.openai.com\n\n\n- Existing organization owners can invite you to join their organization via the [Members Panel](https://beta.openai.com/account/members).\n\n", "title": "Error Code 404 - You must be a member of an organization to use the API", "article_id": "6891827", "url": "https://help.openai.com/en/articles/6891827-error-code-404-you-must-be-a-member-of-an-organization-to-use-the-api"} \ No newline at end of file +{"text": "This error message indicates that your account is not part of an organization. This could happen for several reasons, such as:\n\n\n\n- You have left or been removed from your previous organization.\n\n\n- Your organization has been deleted.\n\n\n\nTo resolve this error, please follow these steps:\n\n\n\n- If you have left or been removed from your previous organization, you can either request a new organization or get invited to an existing one.\n\n\n- To request a new organization, reach out to us via help.openai.com\n\n\n- Existing organization owners can invite you to join their organization via the [Members Panel](https://beta.openai.com/account/members).\n\n", "title": "Error Code 404 - You must be a member of an organization to use the API", "article_id": "6891827", "url": "https://help.openai.com/en/articles/6891827-error-code-404-you-must-be-a-member-of-an-organization-to-use-the-api"} diff --git a/examples/support_bot/data/article_6891829.json b/examples/support_bot/data/article_6891829.json index 157e41e5..54dd43b4 100644 --- a/examples/support_bot/data/article_6891829.json +++ b/examples/support_bot/data/article_6891829.json @@ -1 +1 @@ -{"text": "This error message indicates that you have hit your assigned rate limit for the API. This means that you have submitted too many tokens or requests in a short period of time and have exceeded the number of requests allowed. This could happen for several reasons, such as:\n\n\n\n- You are using a loop or a script that makes frequent or concurrent requests.\n\n\n- You are sharing your API key with other users or applications.\n\n\n- You are using a free plan that has a low rate limit.\n\n\n\nTo resolve this error, please follow these steps:\n\n\n\n- Pace your requests and avoid making unnecessary or redundant calls.\n\n\n- If you are using a loop or a script, make sure to implement a backoff mechanism or a retry logic that respects the rate limit and the response headers. You can read more about our rate limiting policy and best practices [here](https://help.openai.com/en/articles/6891753-rate-limit-advice).\n\n\n- If you are sharing your organization with other users, note that limits are applied per organization and not per user. It is worth checking the usage of the rest of your team as this will contribute to this limit.\n\n\n- If you are using a free or low-tier plan, consider upgrading to a pay-as-you-go plan that offers a higher rate limit.\n\n\n- If you would like to increase your rate limits, please note that you can do so by [increasing your usage tier](https://platform.openai.com/docs/guides/rate-limits/usage-tiers). You can view your current rate limits, your current usage tier, and how to raise your usage tier/limits in the [Limits section](https://platform.openai.com/account/limits) of your account settings.\n\n", "title": "Error Code 429 - Rate limit reached for requests", "article_id": "6891829", "url": "https://help.openai.com/en/articles/6891829-error-code-429-rate-limit-reached-for-requests"} \ No newline at end of file +{"text": "This error message indicates that you have hit your assigned rate limit for the API. This means that you have submitted too many tokens or requests in a short period of time and have exceeded the number of requests allowed. This could happen for several reasons, such as:\n\n\n\n- You are using a loop or a script that makes frequent or concurrent requests.\n\n\n- You are sharing your API key with other users or applications.\n\n\n- You are using a free plan that has a low rate limit.\n\n\n\nTo resolve this error, please follow these steps:\n\n\n\n- Pace your requests and avoid making unnecessary or redundant calls.\n\n\n- If you are using a loop or a script, make sure to implement a backoff mechanism or a retry logic that respects the rate limit and the response headers. You can read more about our rate limiting policy and best practices [here](https://help.openai.com/en/articles/6891753-rate-limit-advice).\n\n\n- If you are sharing your organization with other users, note that limits are applied per organization and not per user. It is worth checking the usage of the rest of your team as this will contribute to this limit.\n\n\n- If you are using a free or low-tier plan, consider upgrading to a pay-as-you-go plan that offers a higher rate limit.\n\n\n- If you would like to increase your rate limits, please note that you can do so by [increasing your usage tier](https://platform.openai.com/docs/guides/rate-limits/usage-tiers). You can view your current rate limits, your current usage tier, and how to raise your usage tier/limits in the [Limits section](https://platform.openai.com/account/limits) of your account settings.\n\n", "title": "Error Code 429 - Rate limit reached for requests", "article_id": "6891829", "url": "https://help.openai.com/en/articles/6891829-error-code-429-rate-limit-reached-for-requests"} diff --git a/examples/support_bot/data/article_6891831.json b/examples/support_bot/data/article_6891831.json index a563d1ae..c47bfe4b 100644 --- a/examples/support_bot/data/article_6891831.json +++ b/examples/support_bot/data/article_6891831.json @@ -1 +1 @@ -{"text": "This error message indicates that you have hit your maximum monthly budget for the API. This means that you have consumed all the credits or units allocated to your plan and have reached the limit of your billing cycle. This could happen for several reasons, such as:\n\n\n* You are using a high-volume or complex service that consumes a lot of credits or units per request.\n* You are using a large or diverse data set that requires a lot of requests to process.\n* Your limit is set too low for your organization\u2019s usage.\n\nTo resolve this error, please follow these steps:\n\n\n* Check your usage limit and monthly budget in your account settings [here](https://platform.openai.com/account/limits). You can see how many tokens your requests have consumed [here](https://platform.openai.com/account/usage).\n* If you are using a free plan, consider upgrading to a pay-as-you-go plan that offers a higher quota.\n* If you need a usage limit increase, you can apply for one [here](https://platform.openai.com/account/limits) under Usage Limits section. We will review your request and get back to you as soon as possible.\n", "title": "Error Code 429 - You exceeded your current quota, please check your plan and billing details.", "article_id": "6891831", "url": "https://help.openai.com/en/articles/6891831-error-code-429-you-exceeded-your-current-quota-please-check-your-plan-and-billing-details"} \ No newline at end of file +{"text": "This error message indicates that you have hit your maximum monthly budget for the API. This means that you have consumed all the credits or units allocated to your plan and have reached the limit of your billing cycle. This could happen for several reasons, such as:\n\n\n* You are using a high-volume or complex service that consumes a lot of credits or units per request.\n* You are using a large or diverse data set that requires a lot of requests to process.\n* Your limit is set too low for your organization\u2019s usage.\n\nTo resolve this error, please follow these steps:\n\n\n* Check your usage limit and monthly budget in your account settings [here](https://platform.openai.com/account/limits). You can see how many tokens your requests have consumed [here](https://platform.openai.com/account/usage).\n* If you are using a free plan, consider upgrading to a pay-as-you-go plan that offers a higher quota.\n* If you need a usage limit increase, you can apply for one [here](https://platform.openai.com/account/limits) under Usage Limits section. We will review your request and get back to you as soon as possible.\n", "title": "Error Code 429 - You exceeded your current quota, please check your plan and billing details.", "article_id": "6891831", "url": "https://help.openai.com/en/articles/6891831-error-code-429-you-exceeded-your-current-quota-please-check-your-plan-and-billing-details"} diff --git a/examples/support_bot/data/article_6891834.json b/examples/support_bot/data/article_6891834.json index 28e1e0db..00c329a7 100644 --- a/examples/support_bot/data/article_6891834.json +++ b/examples/support_bot/data/article_6891834.json @@ -1 +1 @@ -{"text": "This error message indicates that our servers are experiencing high traffic and are unable to process your request at the moment. This could happen for several reasons, such as:\n\n\n\n- There is a sudden spike or surge in demand for our services.\n\n\n- There is scheduled or unscheduled maintenance or update on our servers.\n\n\n- There is an unexpected or unavoidable outage or incident on our servers.\n\n\n\nTo resolve this error, please follow these steps:\n\n\n\n- Retry your request after a brief wait. We recommend using an exponential backoff strategy or a retry logic that respects the response headers and the rate limit. You can read more about our best practices [here](https://help.openai.com/en/articles/6891753-rate-limit-advice).\n\n\n- Check our [status page](https://status.openai.com/) for any updates or announcements regarding our services and servers. \n\n\n- If you are still getting this error after a reasonable amount of time, please contact us for further assistance. We apologize for any inconvenience and appreciate your patience and understanding.\n\n", "title": "Error Code 429 - The engine is currently overloaded. Please try again later.", "article_id": "6891834", "url": "https://help.openai.com/en/articles/6891834-error-code-429-the-engine-is-currently-overloaded-please-try-again-later"} \ No newline at end of file +{"text": "This error message indicates that our servers are experiencing high traffic and are unable to process your request at the moment. This could happen for several reasons, such as:\n\n\n\n- There is a sudden spike or surge in demand for our services.\n\n\n- There is scheduled or unscheduled maintenance or update on our servers.\n\n\n- There is an unexpected or unavoidable outage or incident on our servers.\n\n\n\nTo resolve this error, please follow these steps:\n\n\n\n- Retry your request after a brief wait. We recommend using an exponential backoff strategy or a retry logic that respects the response headers and the rate limit. You can read more about our best practices [here](https://help.openai.com/en/articles/6891753-rate-limit-advice).\n\n\n- Check our [status page](https://status.openai.com/) for any updates or announcements regarding our services and servers. \n\n\n- If you are still getting this error after a reasonable amount of time, please contact us for further assistance. We apologize for any inconvenience and appreciate your patience and understanding.\n\n", "title": "Error Code 429 - The engine is currently overloaded. Please try again later.", "article_id": "6891834", "url": "https://help.openai.com/en/articles/6891834-error-code-429-the-engine-is-currently-overloaded-please-try-again-later"} diff --git a/examples/support_bot/data/article_6891839.json b/examples/support_bot/data/article_6891839.json index 0f4575d3..02cbe0a4 100644 --- a/examples/support_bot/data/article_6891839.json +++ b/examples/support_bot/data/article_6891839.json @@ -1 +1 @@ -{"text": "This section outlines the main error codes returned by the OpenAI API, including both the cause and how to resolve the error. \n\n\n\n**Status Code Summaries**\n-------------------------\n\n\n\n\n| | |\n| --- | --- |\n| [401](https://help.openai.com/en/articles/6891767-error-code-401-invalid-authentication) | **Cause:** Invalid Authentication\n**Solution:** Ensure the correct API key and requesting organization are being used. |\n| [404 - Incorrect API key provided](https://help.openai.com/en/articles/6891781-error-code-404-incorrect-api-key-provided) | **Cause:** The requesting API key is not correct. \n**Solution:** Ensure the API key used is correct or [generate a new API key](https://beta.openai.com/account/api-keys). |\n| [404 - You must be a member of an organization to use the API](https://help.openai.com/en/articles/6891827-error-code-404-you-must-be-a-member-of-an-organization-to-use-the-api) | **Cause** Your account is not part of an organization.\n**Solution** Contact us to get added to a new organization or ask your organization manager to invite you to an organization [here](https://beta.openai.com/account/members). |\n| [429 - Rate limit reached for requests](https://help.openai.com/en/articles/6891829-error-code-429-rate-limit-reached-for-requests) | **Cause** You have hit your assigned rate limit. \n**Solution** Pace your requests. Read more [here](https://help.openai.com/en/articles/6891753-rate-limit-advice). |\n| [429 - You exceeded your current quota, please check your plan and billing details.](https://help.openai.com/en/articles/6891831-error-code-429-you-exceeded-your-current-quota-please-check-your-plan-and-billing-details) | **Cause** For customers with prepaid billing, you have consumed all [credits in your account](https://platform.openai.com/account/billing). For customers with monthly billing, you have exceeded your [monthly budget](https://platform.openai.com/account/limits).\n**Solution** Buy additional credits or [increase your limits](https://platform.openai.com/account/limits). |\n| [429 - The engine is currently overloaded. Please try again later.](https://help.openai.com/en/articles/6891834-error-code-429-the-engine-is-currently-overloaded-please-try-again-later) | **Cause:** Our servers are experiencing high traffic.\n**Solution** Please retry your requests after a brief wait. |\n| 500 - The server had an error while processing your request. | **Cause** Issue on our servers.\n**Solution** Retry your request after a brief wait and contact us if the issue persists. Read [status page](https://status.openai.com/). |\n\n", "title": "API Error Code Guidance", "article_id": "6891839", "url": "https://help.openai.com/en/articles/6891839-api-error-code-guidance"} \ No newline at end of file +{"text": "This section outlines the main error codes returned by the OpenAI API, including both the cause and how to resolve the error. \n\n\n\n**Status Code Summaries**\n-------------------------\n\n\n\n\n| | |\n| --- | --- |\n| [401](https://help.openai.com/en/articles/6891767-error-code-401-invalid-authentication) | **Cause:** Invalid Authentication\n**Solution:** Ensure the correct API key and requesting organization are being used. |\n| [404 - Incorrect API key provided](https://help.openai.com/en/articles/6891781-error-code-404-incorrect-api-key-provided) | **Cause:** The requesting API key is not correct. \n**Solution:** Ensure the API key used is correct or [generate a new API key](https://beta.openai.com/account/api-keys). |\n| [404 - You must be a member of an organization to use the API](https://help.openai.com/en/articles/6891827-error-code-404-you-must-be-a-member-of-an-organization-to-use-the-api) | **Cause** Your account is not part of an organization.\n**Solution** Contact us to get added to a new organization or ask your organization manager to invite you to an organization [here](https://beta.openai.com/account/members). |\n| [429 - Rate limit reached for requests](https://help.openai.com/en/articles/6891829-error-code-429-rate-limit-reached-for-requests) | **Cause** You have hit your assigned rate limit. \n**Solution** Pace your requests. Read more [here](https://help.openai.com/en/articles/6891753-rate-limit-advice). |\n| [429 - You exceeded your current quota, please check your plan and billing details.](https://help.openai.com/en/articles/6891831-error-code-429-you-exceeded-your-current-quota-please-check-your-plan-and-billing-details) | **Cause** For customers with prepaid billing, you have consumed all [credits in your account](https://platform.openai.com/account/billing). For customers with monthly billing, you have exceeded your [monthly budget](https://platform.openai.com/account/limits).\n**Solution** Buy additional credits or [increase your limits](https://platform.openai.com/account/limits). |\n| [429 - The engine is currently overloaded. Please try again later.](https://help.openai.com/en/articles/6891834-error-code-429-the-engine-is-currently-overloaded-please-try-again-later) | **Cause:** Our servers are experiencing high traffic.\n**Solution** Please retry your requests after a brief wait. |\n| 500 - The server had an error while processing your request. | **Cause** Issue on our servers.\n**Solution** Retry your request after a brief wait and contact us if the issue persists. Read [status page](https://status.openai.com/). |\n\n", "title": "API Error Code Guidance", "article_id": "6891839", "url": "https://help.openai.com/en/articles/6891839-api-error-code-guidance"} diff --git a/examples/support_bot/data/article_6897179.json b/examples/support_bot/data/article_6897179.json index 4a472a50..50f7627a 100644 --- a/examples/support_bot/data/article_6897179.json +++ b/examples/support_bot/data/article_6897179.json @@ -1 +1 @@ -{"text": "An APIError indicates that something went wrong on our side when processing your request. This could be due to a temporary glitch, a bug, or a system outage.\n\n\n\nWe apologize for any inconvenience and we are working hard to resolve any issues as soon as possible. You can check our status page for more information [here](https://status.openai.com/).\n\n\n\nIf you encounter an APIError, please try the following steps:\n\n\n\n- Wait a few seconds and retry your request. Sometimes, the issue may be resolved quickly and your request may succeed on the second attempt.\n\n\n- Check our [status page](https://status.openai.com/) for any ongoing incidents or maintenance that may affect our services. If there is an active incident, please follow the updates and wait until it is resolved before retrying your request.\n\n\n- If the issue persists, contact our support team and provide them with the following information:\n\n\n- The model you were using\n\n\n- The error message and code you received\n\n\n- The request data and headers you sent\n\n\n- The timestamp and timezone of your request\n\n\n- Any other relevant details that may help us diagnose the issue\n\n\n\nOur support team will investigate the issue and get back to you as soon as possible.\n\n", "title": "APIError", "article_id": "6897179", "url": "https://help.openai.com/en/articles/6897179-apierror"} \ No newline at end of file +{"text": "An APIError indicates that something went wrong on our side when processing your request. This could be due to a temporary glitch, a bug, or a system outage.\n\n\n\nWe apologize for any inconvenience and we are working hard to resolve any issues as soon as possible. You can check our status page for more information [here](https://status.openai.com/).\n\n\n\nIf you encounter an APIError, please try the following steps:\n\n\n\n- Wait a few seconds and retry your request. Sometimes, the issue may be resolved quickly and your request may succeed on the second attempt.\n\n\n- Check our [status page](https://status.openai.com/) for any ongoing incidents or maintenance that may affect our services. If there is an active incident, please follow the updates and wait until it is resolved before retrying your request.\n\n\n- If the issue persists, contact our support team and provide them with the following information:\n\n\n- The model you were using\n\n\n- The error message and code you received\n\n\n- The request data and headers you sent\n\n\n- The timestamp and timezone of your request\n\n\n- Any other relevant details that may help us diagnose the issue\n\n\n\nOur support team will investigate the issue and get back to you as soon as possible.\n\n", "title": "APIError", "article_id": "6897179", "url": "https://help.openai.com/en/articles/6897179-apierror"} diff --git a/examples/support_bot/data/article_6897186.json b/examples/support_bot/data/article_6897186.json index af879079..c8260a57 100644 --- a/examples/support_bot/data/article_6897186.json +++ b/examples/support_bot/data/article_6897186.json @@ -1 +1 @@ -{"text": "A Timeout error indicates that your request took too long to complete and our server closed the connection. This could be due to a network issue, a heavy load on our services, or a complex request that requires more processing time.\n\n\n\nIf you encounter a Timeout error, please try the following steps:\n\n\n\n- Wait a few seconds and retry your request. Sometimes, the network congestion or the load on our services may be reduced and your request may succeed on the second attempt.\n\n\n- Check your network settings and make sure you have a stable and fast internet connection. You may need to switch to a different network, use a wired connection, or reduce the number of devices or applications using your bandwidth.\n\n\n- You may also need to adjust your timeout parameter to allow more time for your request to complete.\n\n\n- If the issue persists, contact our support team and provide them with the following information:\n\n\n- The model you were using\n\n\n- The error message and code you received\n\n\n- The request data and headers you sent\n\n\n- The timestamp and timezone of your request\n\n\n- Any other relevant details that may help us diagnose the issue\n\n\n\nOur support team will investigate the issue and get back to you as soon as possible.\n\n", "title": "Timeout", "article_id": "6897186", "url": "https://help.openai.com/en/articles/6897186-timeout"} \ No newline at end of file +{"text": "A Timeout error indicates that your request took too long to complete and our server closed the connection. This could be due to a network issue, a heavy load on our services, or a complex request that requires more processing time.\n\n\n\nIf you encounter a Timeout error, please try the following steps:\n\n\n\n- Wait a few seconds and retry your request. Sometimes, the network congestion or the load on our services may be reduced and your request may succeed on the second attempt.\n\n\n- Check your network settings and make sure you have a stable and fast internet connection. You may need to switch to a different network, use a wired connection, or reduce the number of devices or applications using your bandwidth.\n\n\n- You may also need to adjust your timeout parameter to allow more time for your request to complete.\n\n\n- If the issue persists, contact our support team and provide them with the following information:\n\n\n- The model you were using\n\n\n- The error message and code you received\n\n\n- The request data and headers you sent\n\n\n- The timestamp and timezone of your request\n\n\n- Any other relevant details that may help us diagnose the issue\n\n\n\nOur support team will investigate the issue and get back to you as soon as possible.\n\n", "title": "Timeout", "article_id": "6897186", "url": "https://help.openai.com/en/articles/6897186-timeout"} diff --git a/examples/support_bot/data/article_6897191.json b/examples/support_bot/data/article_6897191.json index 8839b36d..8e6886e8 100644 --- a/examples/support_bot/data/article_6897191.json +++ b/examples/support_bot/data/article_6897191.json @@ -1 +1 @@ -{"text": "An APIConnectionError indicates that your request could not reach our servers or establish a secure connection. This could be due to a network issue, a proxy configuration, an SSL certificate, or a firewall rule.\n\n\n\nIf you encounter an APIConnectionError, please try the following steps:\n\n\n\n- Check your network settings and make sure you have a stable and fast internet connection. You may need to switch to a different network, use a wired connection, or reduce the number of devices or applications using your bandwidth.\n\n\n- Check your proxy configuration and make sure it is compatible with our services. You may need to update your proxy settings, use a different proxy, or bypass the proxy altogether.\n\n\n- Check your SSL certificates and make sure they are valid and up-to-date. You may need to install or renew your certificates, use a different certificate authority, or disable SSL verification.\n\n\n- Check your firewall rules and make sure they are not blocking or filtering our services. You may need to modify your firewall settings.\n\n\n- If the issue persists, contact our support team and provide them with the following information:\n\n\n- The model you were using\n\n\n- The error message and code you received\n\n\n- The request data and headers you sent\n\n\n- The timestamp and timezone of your request\n\n\n- Any other relevant details that may help us diagnose the issue\n\n\n\n", "title": "APIConnectionError", "article_id": "6897191", "url": "https://help.openai.com/en/articles/6897191-apiconnectionerror"} \ No newline at end of file +{"text": "An APIConnectionError indicates that your request could not reach our servers or establish a secure connection. This could be due to a network issue, a proxy configuration, an SSL certificate, or a firewall rule.\n\n\n\nIf you encounter an APIConnectionError, please try the following steps:\n\n\n\n- Check your network settings and make sure you have a stable and fast internet connection. You may need to switch to a different network, use a wired connection, or reduce the number of devices or applications using your bandwidth.\n\n\n- Check your proxy configuration and make sure it is compatible with our services. You may need to update your proxy settings, use a different proxy, or bypass the proxy altogether.\n\n\n- Check your SSL certificates and make sure they are valid and up-to-date. You may need to install or renew your certificates, use a different certificate authority, or disable SSL verification.\n\n\n- Check your firewall rules and make sure they are not blocking or filtering our services. You may need to modify your firewall settings.\n\n\n- If the issue persists, contact our support team and provide them with the following information:\n\n\n- The model you were using\n\n\n- The error message and code you received\n\n\n- The request data and headers you sent\n\n\n- The timestamp and timezone of your request\n\n\n- Any other relevant details that may help us diagnose the issue\n\n\n\n", "title": "APIConnectionError", "article_id": "6897191", "url": "https://help.openai.com/en/articles/6897191-apiconnectionerror"} diff --git a/examples/support_bot/data/article_6897194.json b/examples/support_bot/data/article_6897194.json index fcb92fe0..e1dcd95f 100644 --- a/examples/support_bot/data/article_6897194.json +++ b/examples/support_bot/data/article_6897194.json @@ -1 +1 @@ -{"text": "An InvalidRequestError indicates that your request was malformed or missing some required parameters, such as a token or an input. This could be due to a typo, a formatting error, or a logic error in your code.\n\n\n\nIf you encounter an InvalidRequestError, please try the following steps:\n\n\n\n- Read the error message carefully and identify the specific error made. The error message should advise you on what parameter was invalid or missing, and what value or format was expected.\n\n\n- Check the documentation for the specific API method you were calling and make sure you are sending valid and complete parameters. You may need to review the parameter names, types, values, and formats, and ensure they match the documentation.\n\n\n- Check the encoding, format, or size of your request data and make sure they are compatible with our services. You may need to encode your data in UTF-8, format your data in JSON, or compress your data if it is too large.\n\n\n- Test your request using a tool like Postman or curl and make sure it works as expected. You may need to debug your code and fix any errors or inconsistencies in your request logic.\n\n\n- Contact our support team and provide them with:\n\n\n- The model you were using\n\n\n- The error message and code you received\n\n\n- The request data and headers you sent\n\n\n- The timestamp and timezone of your request\n\n\n- Any other relevant details that may help us diagnose the issue \n\n\n\nOur support team will investigate the issue and get back to you as soon as possible.\n\n", "title": "InvalidRequestError", "article_id": "6897194", "url": "https://help.openai.com/en/articles/6897194-invalidrequesterror"} \ No newline at end of file +{"text": "An InvalidRequestError indicates that your request was malformed or missing some required parameters, such as a token or an input. This could be due to a typo, a formatting error, or a logic error in your code.\n\n\n\nIf you encounter an InvalidRequestError, please try the following steps:\n\n\n\n- Read the error message carefully and identify the specific error made. The error message should advise you on what parameter was invalid or missing, and what value or format was expected.\n\n\n- Check the documentation for the specific API method you were calling and make sure you are sending valid and complete parameters. You may need to review the parameter names, types, values, and formats, and ensure they match the documentation.\n\n\n- Check the encoding, format, or size of your request data and make sure they are compatible with our services. You may need to encode your data in UTF-8, format your data in JSON, or compress your data if it is too large.\n\n\n- Test your request using a tool like Postman or curl and make sure it works as expected. You may need to debug your code and fix any errors or inconsistencies in your request logic.\n\n\n- Contact our support team and provide them with:\n\n\n- The model you were using\n\n\n- The error message and code you received\n\n\n- The request data and headers you sent\n\n\n- The timestamp and timezone of your request\n\n\n- Any other relevant details that may help us diagnose the issue \n\n\n\nOur support team will investigate the issue and get back to you as soon as possible.\n\n", "title": "InvalidRequestError", "article_id": "6897194", "url": "https://help.openai.com/en/articles/6897194-invalidrequesterror"} diff --git a/examples/support_bot/data/article_6897198.json b/examples/support_bot/data/article_6897198.json index 64912fd5..3ed46d02 100644 --- a/examples/support_bot/data/article_6897198.json +++ b/examples/support_bot/data/article_6897198.json @@ -1 +1 @@ -{"text": "An AuthenticationError indicates that your API key or token was invalid, expired, or revoked. This could be due to a typo, a formatting error, or a security breach.\n\n\n\nIf you encounter an AuthenticationError, please try the following steps:\n\n\n\n- Check your API key or token and make sure it is correct and active. You may need to generate a new key from the API Key dashboard, ensure there are no extra spaces or characters, or use a different key or token if you have multiple ones.\n\n\n- Ensure that you have followed the correct [formatting](https://beta.openai.com/docs/api-reference/authentication).\n\n", "title": "AuthenticationError", "article_id": "6897198", "url": "https://help.openai.com/en/articles/6897198-authenticationerror"} \ No newline at end of file +{"text": "An AuthenticationError indicates that your API key or token was invalid, expired, or revoked. This could be due to a typo, a formatting error, or a security breach.\n\n\n\nIf you encounter an AuthenticationError, please try the following steps:\n\n\n\n- Check your API key or token and make sure it is correct and active. You may need to generate a new key from the API Key dashboard, ensure there are no extra spaces or characters, or use a different key or token if you have multiple ones.\n\n\n- Ensure that you have followed the correct [formatting](https://beta.openai.com/docs/api-reference/authentication).\n\n", "title": "AuthenticationError", "article_id": "6897198", "url": "https://help.openai.com/en/articles/6897198-authenticationerror"} diff --git a/examples/support_bot/data/article_6897199.json b/examples/support_bot/data/article_6897199.json index 5d5fd1e4..0080da19 100644 --- a/examples/support_bot/data/article_6897199.json +++ b/examples/support_bot/data/article_6897199.json @@ -1 +1 @@ -{"text": "A PermissionError indicates that your API key or token does not have the required scope or role to perform the requested action. This could be due to a misconfiguration, a limitation, or a policy change.\n\n\n\nIf you encounter a PermissionError, please contact our support team and provide them with the the following information:\n\n\n- The model you were using\n\n\n- The error message and code you received\n\n\n- The request data and headers you sent\n\n\n- The timestamp and timezone of your request\n\n\n- Any other relevant details that may help us diagnose the issue\n\n\nOur support team will investigate the issue and get back to you as soon as possible.\n\n", "title": "PermissionError", "article_id": "6897199", "url": "https://help.openai.com/en/articles/6897199-permissionerror"} \ No newline at end of file +{"text": "A PermissionError indicates that your API key or token does not have the required scope or role to perform the requested action. This could be due to a misconfiguration, a limitation, or a policy change.\n\n\n\nIf you encounter a PermissionError, please contact our support team and provide them with the the following information:\n\n\n- The model you were using\n\n\n- The error message and code you received\n\n\n- The request data and headers you sent\n\n\n- The timestamp and timezone of your request\n\n\n- Any other relevant details that may help us diagnose the issue\n\n\nOur support team will investigate the issue and get back to you as soon as possible.\n\n", "title": "PermissionError", "article_id": "6897199", "url": "https://help.openai.com/en/articles/6897199-permissionerror"} diff --git a/examples/support_bot/data/article_6897202.json b/examples/support_bot/data/article_6897202.json index 60ddb447..e77e37cf 100644 --- a/examples/support_bot/data/article_6897202.json +++ b/examples/support_bot/data/article_6897202.json @@ -1 +1 @@ -{"text": "A RateLimitError indicates that you have hit your assigned rate limit. This means that you have sent too many tokens or requests in a given period of time, and our services have temporarily blocked you from sending more.\n\n\n\nWe impose rate limits to ensure fair and efficient use of our resources and to prevent abuse or overload of our services.\n\n\n\nIf you encounter a RateLimitError, please try the following steps:\n\n\n\n- Wait until your rate limit resets (one minute) and retry your request. The error message should give you a sense of your usage rate and permitted usage. \n\n\n- Send fewer tokens or requests or slow down. You may need to reduce the frequency or volume of your requests, batch your tokens, or implement exponential backoff. You can read our rate limit guidance [here](https://help.openai.com/en/articles/6891753-rate-limit-advice).\n\n\n- You can also check your usage statistics from your account dashboard.\n\n\n", "title": "RateLimitError", "article_id": "6897202", "url": "https://help.openai.com/en/articles/6897202-ratelimiterror"} \ No newline at end of file +{"text": "A RateLimitError indicates that you have hit your assigned rate limit. This means that you have sent too many tokens or requests in a given period of time, and our services have temporarily blocked you from sending more.\n\n\n\nWe impose rate limits to ensure fair and efficient use of our resources and to prevent abuse or overload of our services.\n\n\n\nIf you encounter a RateLimitError, please try the following steps:\n\n\n\n- Wait until your rate limit resets (one minute) and retry your request. The error message should give you a sense of your usage rate and permitted usage. \n\n\n- Send fewer tokens or requests or slow down. You may need to reduce the frequency or volume of your requests, batch your tokens, or implement exponential backoff. You can read our rate limit guidance [here](https://help.openai.com/en/articles/6891753-rate-limit-advice).\n\n\n- You can also check your usage statistics from your account dashboard.\n\n\n", "title": "RateLimitError", "article_id": "6897202", "url": "https://help.openai.com/en/articles/6897202-ratelimiterror"} diff --git a/examples/support_bot/data/article_6897204.json b/examples/support_bot/data/article_6897204.json index 16c42916..2d65cd2b 100644 --- a/examples/support_bot/data/article_6897204.json +++ b/examples/support_bot/data/article_6897204.json @@ -1 +1 @@ -{"text": "A ServiceUnavailableError indicates that our servers are temporarily unable to handle your request. This could be due to a planned or unplanned maintenance, a system upgrade, or a server failure. These errors can also be returned during periods of high traffic.\n\n\n\nWe apologize for any inconvenience and we are working hard to restore our services as soon as possible.\n\n\n\nIf you encounter a ServiceUnavailableError, please try the following steps:\n\n\n\n- Wait a few minutes and retry your request. Sometimes, the issue may be resolved quickly and your request may succeed on the next attempt.\n\n\n- Check our status page for any ongoing incidents or maintenance that may affect our services. If there is an active incident, please follow the updates and wait until it is resolved before retrying your request.\n\n\n- If the issue persists, contact our support team and provide them with the following information:\n\n\n- The model you were using\n\n\n- The error message and code you received\n\n\n- The request data and headers you sent\n\n\n- The timestamp and timezone of your request\n\n\n- Any other relevant details that may help us diagnose the issue\n\n\nOur support team will investigate the issue and get back to you as soon as possible.\n\n", "title": "ServiceUnavailableError", "article_id": "6897204", "url": "https://help.openai.com/en/articles/6897204-serviceunavailableerror"} \ No newline at end of file +{"text": "A ServiceUnavailableError indicates that our servers are temporarily unable to handle your request. This could be due to a planned or unplanned maintenance, a system upgrade, or a server failure. These errors can also be returned during periods of high traffic.\n\n\n\nWe apologize for any inconvenience and we are working hard to restore our services as soon as possible.\n\n\n\nIf you encounter a ServiceUnavailableError, please try the following steps:\n\n\n\n- Wait a few minutes and retry your request. Sometimes, the issue may be resolved quickly and your request may succeed on the next attempt.\n\n\n- Check our status page for any ongoing incidents or maintenance that may affect our services. If there is an active incident, please follow the updates and wait until it is resolved before retrying your request.\n\n\n- If the issue persists, contact our support team and provide them with the following information:\n\n\n- The model you were using\n\n\n- The error message and code you received\n\n\n- The request data and headers you sent\n\n\n- The timestamp and timezone of your request\n\n\n- Any other relevant details that may help us diagnose the issue\n\n\nOur support team will investigate the issue and get back to you as soon as possible.\n\n", "title": "ServiceUnavailableError", "article_id": "6897204", "url": "https://help.openai.com/en/articles/6897204-serviceunavailableerror"} diff --git a/examples/support_bot/data/article_6897213.json b/examples/support_bot/data/article_6897213.json index a1540b5d..36083076 100644 --- a/examples/support_bot/data/article_6897213.json +++ b/examples/support_bot/data/article_6897213.json @@ -1 +1 @@ -{"text": "This article outlines the error types returned when using the OpenAI Python Library. Read a summary of the cause and solution, or click the article for more.\n\n\n\n\n| | |\n| --- | --- |\n| [APIError](https://help.openai.com/en/articles/6897179-apierror) | **Cause** Issue on our side.\n**Solution** Retry your request after a brief wait and contact us if the issue persists. |\n| [Timeout](https://help.openai.com/en/articles/6897186-timeout) | **Cause** Request timed out.\n**Solution** Retry your request after a brief wait and contact us if the issue persists. |\n| [APIConnectionError](https://help.openai.com/en/articles/6897191-apiconnectionerror) | **Cause** Issue connecting to our services.\n**Solution** Check your network settings, proxy configuration, SSL certificates, or firewall rules. |\n| [InvalidRequestError](https://help.openai.com/en/articles/6897194-invalidrequesterror) | **Cause:** Your request was malformed or missing some required parameters, such as a token or an input.\n**Solution:** The error message should advise you on the specific error made. Check the documentation for the specific API method you are calling and make sure you are sending valid and complete parameters. You may also need to check the encoding, format, or size of your request data. |\n| [AuthenticationError](https://help.openai.com/en/articles/6897198-authenticationerror) | **Cause** Your API key or token was invalid, expired, or revoked.\n**Solution:** Check your API key or token and make sure it is correct and active. You may need to generate a new one from your account dashboard. |\n| [PermissionError](https://help.openai.com/en/articles/6897199-permissionerror)\n | **Cause** Your API key or token does not have the required scope or role to perform the requested action.\n**Solution** Make sure your API key has the appropriate permissions for the action or model accessed. |\n| [RateLimitError](https://help.openai.com/en/articles/6897202-ratelimiterror)\n | **Cause** You have hit your assigned rate limit. \n**Solution** Pace your requests. Read more [here](https://help.openai.com/en/articles/6891753-rate-limit-advice). |\n| [ServiceUnavailableError](https://help.openai.com/en/articles/6897204-serviceunavailableerror) | **Cause** Issue on our servers.\n**Solution** Retry your request after a brief wait and contact us if the issue persists. |\n\nWe advise you to programmatically handle errors returned by the API. To do so, you may wish to use a code snippet like below:\n\n\n\n\n```\ntry: \n #Make your OpenAI API request here \n response = openai.Completion.create(model=\"text-davinci-003\", \n prompt=\"Hello world\") \nexcept openai.error.Timeout as e: \n #Handle timeout error, e.g. retry or log \n print(f\"OpenAI API request timed out: {e}\") \n pass \nexcept openai.error.APIError as e: \n #Handle API error, e.g. retry or log \n print(f\"OpenAI API returned an API Error: {e}\") \n pass \nexcept openai.error.APIConnectionError as e: \n #Handle connection error, e.g. check network or log \n print(f\"OpenAI API request failed to connect: {e}\") \n pass \nexcept openai.error.InvalidRequestError as e: \n #Handle invalid request error, e.g. validate parameters or log \n print(f\"OpenAI API request was invalid: {e}\") \n pass \nexcept openai.error.AuthenticationError as e: \n #Handle authentication error, e.g. check credentials or log \n print(f\"OpenAI API request was not authorized: {e}\") \n pass \nexcept openai.error.PermissionError as e: \n #Handle permission error, e.g. check scope or log \n print(f\"OpenAI API request was not permitted: {e}\") \n pass \nexcept openai.error.RateLimitError as e: \n #Handle rate limit error, e.g. wait or log \n print(f\"OpenAI API request exceeded rate limit: {e}\") \n pass\n```\n\n", "title": "OpenAI Library Error Types Guidance", "article_id": "6897213", "url": "https://help.openai.com/en/articles/6897213-openai-library-error-types-guidance"} \ No newline at end of file +{"text": "This article outlines the error types returned when using the OpenAI Python Library. Read a summary of the cause and solution, or click the article for more.\n\n\n\n\n| | |\n| --- | --- |\n| [APIError](https://help.openai.com/en/articles/6897179-apierror) | **Cause** Issue on our side.\n**Solution** Retry your request after a brief wait and contact us if the issue persists. |\n| [Timeout](https://help.openai.com/en/articles/6897186-timeout) | **Cause** Request timed out.\n**Solution** Retry your request after a brief wait and contact us if the issue persists. |\n| [APIConnectionError](https://help.openai.com/en/articles/6897191-apiconnectionerror) | **Cause** Issue connecting to our services.\n**Solution** Check your network settings, proxy configuration, SSL certificates, or firewall rules. |\n| [InvalidRequestError](https://help.openai.com/en/articles/6897194-invalidrequesterror) | **Cause:** Your request was malformed or missing some required parameters, such as a token or an input.\n**Solution:** The error message should advise you on the specific error made. Check the documentation for the specific API method you are calling and make sure you are sending valid and complete parameters. You may also need to check the encoding, format, or size of your request data. |\n| [AuthenticationError](https://help.openai.com/en/articles/6897198-authenticationerror) | **Cause** Your API key or token was invalid, expired, or revoked.\n**Solution:** Check your API key or token and make sure it is correct and active. You may need to generate a new one from your account dashboard. |\n| [PermissionError](https://help.openai.com/en/articles/6897199-permissionerror)\n | **Cause** Your API key or token does not have the required scope or role to perform the requested action.\n**Solution** Make sure your API key has the appropriate permissions for the action or model accessed. |\n| [RateLimitError](https://help.openai.com/en/articles/6897202-ratelimiterror)\n | **Cause** You have hit your assigned rate limit. \n**Solution** Pace your requests. Read more [here](https://help.openai.com/en/articles/6891753-rate-limit-advice). |\n| [ServiceUnavailableError](https://help.openai.com/en/articles/6897204-serviceunavailableerror) | **Cause** Issue on our servers.\n**Solution** Retry your request after a brief wait and contact us if the issue persists. |\n\nWe advise you to programmatically handle errors returned by the API. To do so, you may wish to use a code snippet like below:\n\n\n\n\n```\ntry: \n #Make your OpenAI API request here \n response = openai.Completion.create(model=\"text-davinci-003\", \n prompt=\"Hello world\") \nexcept openai.error.Timeout as e: \n #Handle timeout error, e.g. retry or log \n print(f\"OpenAI API request timed out: {e}\") \n pass \nexcept openai.error.APIError as e: \n #Handle API error, e.g. retry or log \n print(f\"OpenAI API returned an API Error: {e}\") \n pass \nexcept openai.error.APIConnectionError as e: \n #Handle connection error, e.g. check network or log \n print(f\"OpenAI API request failed to connect: {e}\") \n pass \nexcept openai.error.InvalidRequestError as e: \n #Handle invalid request error, e.g. validate parameters or log \n print(f\"OpenAI API request was invalid: {e}\") \n pass \nexcept openai.error.AuthenticationError as e: \n #Handle authentication error, e.g. check credentials or log \n print(f\"OpenAI API request was not authorized: {e}\") \n pass \nexcept openai.error.PermissionError as e: \n #Handle permission error, e.g. check scope or log \n print(f\"OpenAI API request was not permitted: {e}\") \n pass \nexcept openai.error.RateLimitError as e: \n #Handle rate limit error, e.g. wait or log \n print(f\"OpenAI API request exceeded rate limit: {e}\") \n pass\n```\n\n", "title": "OpenAI Library Error Types Guidance", "article_id": "6897213", "url": "https://help.openai.com/en/articles/6897213-openai-library-error-types-guidance"} diff --git a/examples/support_bot/data/article_6901266.json b/examples/support_bot/data/article_6901266.json index bece5eab..cd90fd07 100644 --- a/examples/support_bot/data/article_6901266.json +++ b/examples/support_bot/data/article_6901266.json @@ -1 +1 @@ -{"text": "The latency of a completion request is mostly influenced by two factors: the model and the number of tokens generated. Please read our updated documentation for [guidance on improving latencies.](https://beta.openai.com/docs/guides/production-best-practices/improving-latencies) \n\n", "title": "Guidance on improving latencies", "article_id": "6901266", "url": "https://help.openai.com/en/articles/6901266-guidance-on-improving-latencies"} \ No newline at end of file +{"text": "The latency of a completion request is mostly influenced by two factors: the model and the number of tokens generated. Please read our updated documentation for [guidance on improving latencies.](https://beta.openai.com/docs/guides/production-best-practices/improving-latencies) \n\n", "title": "Guidance on improving latencies", "article_id": "6901266", "url": "https://help.openai.com/en/articles/6901266-guidance-on-improving-latencies"} diff --git a/examples/support_bot/data/article_6950777.json b/examples/support_bot/data/article_6950777.json index 57406f07..c5e5fa5e 100644 --- a/examples/support_bot/data/article_6950777.json +++ b/examples/support_bot/data/article_6950777.json @@ -1 +1 @@ -{"text": "1. **What is ChatGPT Plus?**\n\n\n\t1. ChatGPT Plus is a subscription plan for ChatGPT. It offers availability even when demand is high, faster response speed, and priority access to new features.\n2. **Is the free version still available?** \n\n\n\t1. Yes, free access to ChatGPT will still be provided. By offering this subscription pricing, we will be able to help support free access availability to as many people as possible. See our [general ChatGPT article](https://help.openai.com/en/articles/6783457-chatgpt-faq) for more information on our free offering.\n3. **How can I cancel my subscription?**\n\n\n\t1. You may cancel your subscription at any time. Click \u201cMy Account\u201d in the [sidebar](https://chat.openai.com/chat). Then click \u201cManage my subscription\u201d in the pop-up window. You\u2019ll be directed to a Stripe checkout page where you can select \u201cCancel Plan\u201d. Your cancellation will take effect the day after the next billing date. You can continue using our services until then. To avoid being charged for your next billing period, cancel your subscription at least 24 hours before your next billing date. Subscription fees are non-refundable.\n4. **What is the refund policy?**\n\n\n\t1. If you live in the EU, UK, or Turkey, you\u2019re eligible for a refund if you cancel your subscription within 14 days of purchase. Please send us a message via our chat widget in the bottom right of your screen in our [Help Center](https://help.openai.com/en/), select the \"Billing\" option and select \"I need a refund\".\n5. **How can I request a VAT tax refund?**\n\n\n\t1. Please send us a message via our chat widget in the bottom right of your screen in our [Help Center](https://help.openai.com/en/), select the \"Billing\" option and then select \"VAT exemption request\". Be sure to include your billing information (name, email, and billing address) so we can process your request faster.\n6. **My account got terminated. Can I get a refund?**\n\n\n\t1. If we terminate your account for violating our Terms of Use, you still owe any unpaid fees, and will not be given a refund for any remaining credit or prepaid service.\n7. **How can I opt out my data to improve model performance?**\n\n\n\t1. Please fill out [this form](https://docs.google.com/forms/d/e/1FAIpQLScrnC-_A7JFs4LbIuzevQ_78hVERlNqqCPCt3d8XqnKOfdRdQ/viewform). Additionally, you may request your account to be [deleted](https://help.openai.com/en/articles/6378407-how-can-i-delete-my-account) at any time.\n8. **Where can I find my invoice for ChatGPT Plus?**\n\n\n\t1. Receipts for credit purchases made are sent to the email address you used when making the purchase. You may also view your invoices from the sidebar by clicking \"My Account\" and then \"Manage my subscription\".\n9. **Are alternate payment options available?**\n\n\n\t1. At this time, we only accept payment via credit card.\n10. **I want to use ChatGPT Plus with sensitive data. Who can view my conversations?**\n\n\n\t1. As part of our commitment to safe and responsible AI, we may review conversations to improve our systems and to ensure the content complies with our policies and safety requirements. For more information on how we handle data, please see our [Privacy Policy](https://openai.com/privacy/) and [Terms of Use](https://openai.com/terms/).\n11. **Is the ChatGPT API included in the ChatGPT Plus subscription?**\n\n\n\t1. No, the ChatGPT API and ChatGPT Plus subscription are billed separately. The API has its own pricing, which can be found at . The ChatGPT Plus subscription covers usage on chat.openai.com only and costs $20/month.\n12. **I am using the free subscription of ChatGPT so does that mean I can use the ChatGPT API for free too?**\n\n\n\t1. No, API usage is it's own separate cost. The ChatGPT API is not available for free. See our [Pricing](https://openai.com/pricing) page for details.\n\n", "title": "What is ChatGPT Plus?", "article_id": "6950777", "url": "https://help.openai.com/en/articles/6950777-what-is-chatgpt-plus"} \ No newline at end of file +{"text": "1. **What is ChatGPT Plus?**\n\n\n\t1. ChatGPT Plus is a subscription plan for ChatGPT. It offers availability even when demand is high, faster response speed, and priority access to new features.\n2. **Is the free version still available?** \n\n\n\t1. Yes, free access to ChatGPT will still be provided. By offering this subscription pricing, we will be able to help support free access availability to as many people as possible. See our [general ChatGPT article](https://help.openai.com/en/articles/6783457-chatgpt-faq) for more information on our free offering.\n3. **How can I cancel my subscription?**\n\n\n\t1. You may cancel your subscription at any time. Click \u201cMy Account\u201d in the [sidebar](https://chat.openai.com/chat). Then click \u201cManage my subscription\u201d in the pop-up window. You\u2019ll be directed to a Stripe checkout page where you can select \u201cCancel Plan\u201d. Your cancellation will take effect the day after the next billing date. You can continue using our services until then. To avoid being charged for your next billing period, cancel your subscription at least 24 hours before your next billing date. Subscription fees are non-refundable.\n4. **What is the refund policy?**\n\n\n\t1. If you live in the EU, UK, or Turkey, you\u2019re eligible for a refund if you cancel your subscription within 14 days of purchase. Please send us a message via our chat widget in the bottom right of your screen in our [Help Center](https://help.openai.com/en/), select the \"Billing\" option and select \"I need a refund\".\n5. **How can I request a VAT tax refund?**\n\n\n\t1. Please send us a message via our chat widget in the bottom right of your screen in our [Help Center](https://help.openai.com/en/), select the \"Billing\" option and then select \"VAT exemption request\". Be sure to include your billing information (name, email, and billing address) so we can process your request faster.\n6. **My account got terminated. Can I get a refund?**\n\n\n\t1. If we terminate your account for violating our Terms of Use, you still owe any unpaid fees, and will not be given a refund for any remaining credit or prepaid service.\n7. **How can I opt out my data to improve model performance?**\n\n\n\t1. Please fill out [this form](https://docs.google.com/forms/d/e/1FAIpQLScrnC-_A7JFs4LbIuzevQ_78hVERlNqqCPCt3d8XqnKOfdRdQ/viewform). Additionally, you may request your account to be [deleted](https://help.openai.com/en/articles/6378407-how-can-i-delete-my-account) at any time.\n8. **Where can I find my invoice for ChatGPT Plus?**\n\n\n\t1. Receipts for credit purchases made are sent to the email address you used when making the purchase. You may also view your invoices from the sidebar by clicking \"My Account\" and then \"Manage my subscription\".\n9. **Are alternate payment options available?**\n\n\n\t1. At this time, we only accept payment via credit card.\n10. **I want to use ChatGPT Plus with sensitive data. Who can view my conversations?**\n\n\n\t1. As part of our commitment to safe and responsible AI, we may review conversations to improve our systems and to ensure the content complies with our policies and safety requirements. For more information on how we handle data, please see our [Privacy Policy](https://openai.com/privacy/) and [Terms of Use](https://openai.com/terms/).\n11. **Is the ChatGPT API included in the ChatGPT Plus subscription?**\n\n\n\t1. No, the ChatGPT API and ChatGPT Plus subscription are billed separately. The API has its own pricing, which can be found at . The ChatGPT Plus subscription covers usage on chat.openai.com only and costs $20/month.\n12. **I am using the free subscription of ChatGPT so does that mean I can use the ChatGPT API for free too?**\n\n\n\t1. No, API usage is it's own separate cost. The ChatGPT API is not available for free. See our [Pricing](https://openai.com/pricing) page for details.\n\n", "title": "What is ChatGPT Plus?", "article_id": "6950777", "url": "https://help.openai.com/en/articles/6950777-what-is-chatgpt-plus"} diff --git a/examples/support_bot/prep_data.py b/examples/support_bot/prep_data.py index 04a82795..21f75664 100644 --- a/examples/support_bot/prep_data.py +++ b/examples/support_bot/prep_data.py @@ -31,7 +31,8 @@ for x in article_list: for i, x in enumerate(articles): try: - embedding = client.embeddings.create(model=EMBEDDING_MODEL, input=x["text"]) + embedding = client.embeddings.create( + model=EMBEDDING_MODEL, input=x["text"]) articles[i].update({"embedding": embedding.data[0].embedding}) except Exception as e: print(x["title"]) @@ -48,7 +49,8 @@ vector_size article_df = pd.DataFrame(articles) article_df.head() -# Delete the collection if it exists, so we can rewrite it changes to articles were made +# Delete the collection if it exists, so we can rewrite it changes to +# articles were made if qdrant.get_collection(collection_name=collection_name): qdrant.delete_collection(collection_name=collection_name) diff --git a/examples/support_bot/requirements.txt b/examples/support_bot/requirements.txt index bea461b8..0bc396b4 100644 --- a/examples/support_bot/requirements.txt +++ b/examples/support_bot/requirements.txt @@ -1 +1 @@ -qdrant-client \ No newline at end of file +qdrant-client diff --git a/examples/weather_agent/agents.py b/examples/weather_agent/agents.py index dd6d75eb..149ae88c 100644 --- a/examples/weather_agent/agents.py +++ b/examples/weather_agent/agents.py @@ -5,7 +5,8 @@ from swarm import Agent def get_weather(location, time="now"): """Get the current weather in a given location. Location MUST be a city.""" - return json.dumps({"location": location, "temperature": "65", "time": time}) + return json.dumps( + {"location": location, "temperature": "65", "time": time}) def send_email(recipient, subject, body): diff --git a/pyproject.toml b/pyproject.toml index 7fd26b97..fed528d4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,3 @@ [build-system] requires = ["setuptools"] -build-backend = "setuptools.build_meta" \ No newline at end of file +build-backend = "setuptools.build_meta" diff --git a/swarm/__init__.py b/swarm/__init__.py index a47b6210..e459d86e 100644 --- a/swarm/__init__.py +++ b/swarm/__init__.py @@ -1,3 +1,4 @@ +"""A library to build Bug Bounty-level grade Cybersecurity AIs.""" from .core import Swarm from .types import Agent, Response diff --git a/swarm/core.py b/swarm/core.py index 93a6ed66..3de1bda4 100644 --- a/swarm/core.py +++ b/swarm/core.py @@ -1,11 +1,22 @@ +""" +Core module for the Swarm library. + +This module contains the main Swarm class which handles chat completions, +tool calls, and agent interactions. It provides both synchronous and +streaming interfaces for running conversations with AI agents. + +Imports are organized into standard library, third-party packages, +and local modules. +""" + # Standard library imports import copy import json from collections import defaultdict -from typing import List, Callable, Union +from typing import List # Package/library imports -from openai import OpenAI +from openai import OpenAI # pylint: disable=import-error # Local imports @@ -24,13 +35,17 @@ __CTX_VARS_NAME__ = "context_variables" class Swarm: - def __init__(self, client=None, base_url="http://localhost:8000/v1", api_key="alias"): + """ + Main class for the Swarm library. + """ + + def __init__(self, client=None, + base_url="http://localhost:8000/v1", api_key="alias"): if not client: - # client = OpenAI() client = OpenAI(base_url=base_url, api_key=api_key) self.client = client - def get_chat_completion( + def get_chat_completion( # pylint: disable=too-many-arguments self, agent: Agent, history: List, @@ -39,6 +54,10 @@ class Swarm: stream: bool, debug: bool, ) -> ChatCompletionMessage: + """ + Get a chat completion for the given agent, history, + and context variables. + """ context_variables = defaultdict(str, context_variables) instructions = ( agent.instructions(context_variables) @@ -71,6 +90,9 @@ class Swarm: return self.client.chat.completions.create(**create_params) def handle_function_result(self, result, debug) -> Result: + """ + Handle the result of a function call. + """ match result: case Result() as result: return result @@ -84,9 +106,9 @@ class Swarm: try: return Result(value=str(result)) except Exception as e: - error_message = f"Failed to cast response to string: {result}. Make sure agent functions return a string or Result object. Error: {str(e)}" + error_message = f"Failed to cast response to string: {result}. Make sure agent functions return a string or Result object. Error: {str(e)}" # noqa: E501 # pylint: disable=C0301 debug_print(debug, error_message) - raise TypeError(error_message) + raise TypeError(error_message) from e def handle_tool_calls( self, @@ -95,6 +117,9 @@ class Swarm: context_variables: dict, debug: bool, ) -> Response: + """ + Handle the tool calls for the given agent. + """ function_map = {f.__name__: f for f in functions} partial_response = Response( messages=[], agent=None, context_variables={}) @@ -138,7 +163,7 @@ class Swarm: return partial_response - def run_and_stream( + def run_and_stream( # pylint: disable=too-many-arguments,too-many-locals,dangerous-default-value # noqa: E501 self, agent: Agent, messages: List, @@ -148,6 +173,9 @@ class Swarm: max_turns: int = float("inf"), execute_tools: bool = True, ): + """ + Run the swarm and stream the results. + """ active_agent = agent context_variables = copy.deepcopy(context_variables) history = copy.deepcopy(messages) @@ -209,11 +237,12 @@ class Swarm: name=tool_call["function"]["name"], ) tool_call_object = ChatCompletionMessageToolCall( - id=tool_call["id"], function=function, type=tool_call["type"] + id=tool_call["id"], function=function, type=tool_call["type"] # noqa: E501 ) tool_calls.append(tool_call_object) - # handle function calls, updating context_variables, and switching agents + # handle function calls, updating context_variables, and switching + # agents partial_response = self.handle_tool_calls( tool_calls, active_agent.functions, context_variables, debug ) @@ -230,7 +259,7 @@ class Swarm: ) } - def run( + def run( # pylint: disable=too-many-arguments,dangerous-default-value self, agent: Agent, messages: List, @@ -241,6 +270,9 @@ class Swarm: max_turns: int = float("inf"), execute_tools: bool = True, ) -> Response: + """ + Run the swarm and return the final response. + """ if stream: return self.run_and_stream( agent=agent, @@ -278,9 +310,11 @@ class Swarm: debug_print(debug, "Ending turn.") break - # handle function calls, updating context_variables, and switching agents + # handle function calls, updating context_variables, and switching + # agents partial_response = self.handle_tool_calls( - message.tool_calls, active_agent.functions, context_variables, debug + message.tool_calls, active_agent.functions, + context_variables, debug ) history.extend(partial_response.messages) context_variables.update(partial_response.context_variables) diff --git a/swarm/repl/__init__.py b/swarm/repl/__init__.py index 2a1cb40c..9e9aa53c 100644 --- a/swarm/repl/__init__.py +++ b/swarm/repl/__init__.py @@ -1 +1,6 @@ -from .repl import run_demo_loop +""" +This module provides a REPL interface for testing and +interacting with Swarm agents. +""" + +from .repl import run_demo_loop # noqa: F401 diff --git a/swarm/repl/repl.py b/swarm/repl/repl.py index 50c3d0ee..2ea68817 100644 --- a/swarm/repl/repl.py +++ b/swarm/repl/repl.py @@ -1,9 +1,16 @@ +""" +This module provides a REPL interface for testing and +interacting with Swarm agents. +""" + import json - -from swarm import Swarm +from swarm import Swarm # pylint: disable=import-error -def process_and_print_streaming_response(response): +def process_and_print_streaming_response(response): # pylint: disable=inconsistent-return-statements # noqa: E501 + """ + Process and print streaming responses from Swarm. + """ content = "" last_sender = "" @@ -35,6 +42,9 @@ def process_and_print_streaming_response(response): def pretty_print_messages(messages) -> None: + """ + Pretty print messages from Swarm. + """ for message in messages: if message["role"] != "assistant": continue @@ -60,6 +70,9 @@ def pretty_print_messages(messages) -> None: def run_demo_loop( starting_agent, context_variables=None, stream=False, debug=False ) -> None: + """ + Run the demo loop for Swarm. + """ client = Swarm() print("Starting Swarm CLI 🐝") diff --git a/swarm/types.py b/swarm/types.py index 8e18e8ec..ae7265fe 100644 --- a/swarm/types.py +++ b/swarm/types.py @@ -1,17 +1,25 @@ -from openai.types.chat import ChatCompletionMessage -from openai.types.chat.chat_completion_message_tool_call import ( +""" +This module contains type definitions for the Swarm library. +""" + +from typing import List, Callable, Union, Optional +from openai.types.chat import ChatCompletionMessage # noqa: F401, E501 # pylint: disable=import-error, unused-import +from openai.types.chat.chat_completion_message_tool_call import ( # noqa: F401, E501 # pylint: disable=import-error, unused-import ChatCompletionMessageToolCall, Function, ) -from typing import List, Callable, Union, Optional # Third-party imports -from pydantic import BaseModel +from pydantic import BaseModel # pylint: disable=import-error AgentFunction = Callable[[], Union[str, "Agent", dict]] -class Agent(BaseModel): +class Agent(BaseModel): # pylint: disable=too-few-public-methods + """ + Represents an agent in the Swarm. + """ + name: str = "Agent" # model: str = "gpt-4o" model: str = "qwen2.5:14b" @@ -21,13 +29,17 @@ class Agent(BaseModel): parallel_tool_calls: bool = True -class Response(BaseModel): +class Response(BaseModel): # pylint: disable=too-few-public-methods + """ + Represents a response from the Swarm. + """ + messages: List = [] agent: Optional[Agent] = None context_variables: dict = {} -class Result(BaseModel): +class Result(BaseModel): # pylint: disable=too-few-public-methods """ Encapsulates the possible return values for an agent function. diff --git a/swarm/util.py b/swarm/util.py index 520c8da2..3bb939bc 100644 --- a/swarm/util.py +++ b/swarm/util.py @@ -1,8 +1,15 @@ +""" +This module contains utility functions for the Swarm library. +""" + import inspect from datetime import datetime def debug_print(debug: bool, *args: str) -> None: + """ + Print debug messages if debug mode is enabled. + """ if not debug: return timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S") @@ -11,6 +18,9 @@ def debug_print(debug: bool, *args: str) -> None: def merge_fields(target, source): + """ + Merge fields from source into target. + """ for key, value in source.items(): if isinstance(value, str): target[key] += value @@ -19,6 +29,9 @@ def merge_fields(target, source): def merge_chunk(final_response: dict, delta: dict) -> None: + """ + Merge fields from delta into final_response. + """ delta.pop("role", None) merge_fields(final_response, delta) @@ -55,7 +68,7 @@ def function_to_json(func) -> dict: except ValueError as e: raise ValueError( f"Failed to get signature for function {func.__name__}: {str(e)}" - ) + ) from e parameters = {} for param in signature.parameters.values(): @@ -63,14 +76,14 @@ def function_to_json(func) -> dict: param_type = type_map.get(param.annotation, "string") except KeyError as e: raise KeyError( - f"Unknown type annotation {param.annotation} for parameter {param.name}: {str(e)}" - ) + f"Unknown type annotation {param.annotation} for parameter {param.name}: {str(e)}" # noqa: E501 # pylint: disable=C0301 + ) from e parameters[param.name] = {"type": param_type} required = [ param.name for param in signature.parameters.values() - if param.default == inspect._empty + if param.default == inspect._empty # pylint: disable=protected-access ] return { diff --git a/tests/test_core.py b/tests/test_core.py index c4407294..cae991b8 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -11,7 +11,8 @@ DEFAULT_RESPONSE_CONTENT = "sample response content" def mock_openai_client(): m = MockOpenAIClient() m.set_response( - create_mock_response({"role": "assistant", "content": DEFAULT_RESPONSE_CONTENT}) + create_mock_response( + {"role": "assistant", "content": DEFAULT_RESPONSE_CONTENT}) ) return m @@ -49,7 +50,8 @@ def test_tool_call(mock_openai_client: MockOpenAIClient): create_mock_response( message={"role": "assistant", "content": ""}, function_calls=[ - {"name": "get_weather", "args": {"location": expected_location}} + {"name": "get_weather", + "args": {"location": expected_location}} ], ), create_mock_response( @@ -88,7 +90,8 @@ def test_execute_tools_false(mock_openai_client: MockOpenAIClient): create_mock_response( message={"role": "assistant", "content": ""}, function_calls=[ - {"name": "get_weather", "args": {"location": expected_location}} + {"name": "get_weather", + "args": {"location": expected_location}} ], ), create_mock_response( diff --git a/tests/test_runs/test_20240402-113647.json b/tests/test_runs/test_20240402-113647.json index 604a2afd..b020a09d 100644 --- a/tests/test_runs/test_20240402-113647.json +++ b/tests/test_runs/test_20240402-113647.json @@ -1 +1 @@ -[{"task_id": "02b37e8e-e436-445c-abdc-13e227616e07", "role": "user", "content": "If I have 5 ducks, and lose 2 of them. How many do I have left"}, {"task_id": "02b37e8e-e436-445c-abdc-13e227616e07", "role": "assistant", "content": "Response to user: 3 ducks"}] \ No newline at end of file +[{"task_id": "02b37e8e-e436-445c-abdc-13e227616e07", "role": "user", "content": "If I have 5 ducks, and lose 2 of them. How many do I have left"}, {"task_id": "02b37e8e-e436-445c-abdc-13e227616e07", "role": "assistant", "content": "Response to user: 3 ducks"}]