Reputation: 43
Every video I watch shows documentation when the user hovers over code, yet mine is nearly empty.
Example:
response = openai.Completion.create(engine="text-davinci-001", prompt=prompt, max_tokens=6)
If I hover over "create" it shows "create: Any" inside the pop-up window. This is much less descriptive than what I see in tutorials.
How do I access documentation on a given object from within VSCode?
I have tried installing/reinstalling Python, IntelliCode and Docs View from inside VSCode. IntelliCode does add links to GitHub but still no the standard documentation like I was expecting.
Upvotes: 0
Views: 1165
Reputation: 9417
What you want is called Intellisense which is provided by extension Python and Pylance.
So the first step is to ensure that you have installed these two extensions.
Because the Intellisense is obtained from the description file in the package, and your code does not have the statement to import the package, I guess you did not install the package or import it. You have to use command pip install openai
in the terminal and use the correct codes to get it:
import openai
response = openai.Completion.create(engine="text-davinci-001", prompt=prompt, max_tokens=6)
Upvotes: 1