#Any way to use davinci-002 with suffix?
1 messages · Page 1 of 1 (latest)
Hi @lofty mantle. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
Hello,
Based on the information provided in the extracts, it appears that the suffix feature should now be available for use with the davinci-002 model. This was confirmed in a Github issue (https://github.com/openai/openai-python/issues/619) where a collaborator mentioned that the feature should be turned on.
Here's an example of how you might use the suffix feature with the davinci-002 model, based on a forum post (https://community.openai.com/t/503331):
from openai import OpenAI
client = OpenAI()
prompt = "def say_hello("
suffix = """):
print('hi', name)"""
response = client.completions.create(
model="davinci-002",
prompt=prompt,
suffix=suffix,
max_tokens=10
)
print(response.choices[0].text)
In this example, the suffix is the text that comes after the insertion point. If you're still encountering issues, it might be worth checking if there have been any recent changes or updates that could be affecting this feature.
I hope this helps! Let me know if you have any other questions.
Best,
kapa.ai
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@lofty mantle kapa.ai is still learning and improving, please let us know how it did by reacting below
@balmy ice yea but does it specifically work (suffix) with davinci-002 model? getting error like noted
Let me check the knowledge base for you. One moment! :books:
I'm sorry for any confusion, but based on the information provided in the extracts, it's not explicitly stated whether the suffix feature works specifically with the davinci-002 model. The Github issue (https://github.com/openai/openai-python/issues/619) mentioned that the suffix feature should be turned on, but it didn't specify for which models.