Skip to content

Examples and guides for using the OpenAI API

removes deprecated Search function from deprecation code example (#130)

Ted Sanders1b21dcd6e9c9
diff --git a/transition_guides_for_deprecated_API_endpoints/search_functionality_example.py b/transition_guides_for_deprecated_API_endpoints/search_functionality_example.py
index 0760844a..6c9c9e97 100644
--- a/transition_guides_for_deprecated_API_endpoints/search_functionality_example.py
+++ b/transition_guides_for_deprecated_API_endpoints/search_functionality_example.py
@@ -7,8 +7,6 @@ tokenizer = GPT2TokenizerFast.from_pretrained("gpt2")
docs = ["test1", "asdklgjnasdv", "banana", "lord lollipop"]
query = "apple orang asdansbdausd"
-print(openai.Search.create(model="davinci", query=query, documents=docs))
-
def construct_context(query, document):
return "<|endoftext|>{document}\n\n---\n\nThe above passage is related to: {query}".format(