Skip to content
TheChatArchiveThe Chat Archive
NVIDIAUnspecified NVIDIA model (HelpSteer2)· NVIDIANVIDIA NVIDIA HelpSteer2

I am using OpenAI's text completion API. Is there any way can make API remember what…

  1. User

    I am using OpenAI's text completion API. Is there any way can make API remember what user said earlier like a conversation here?

  2. NVIDIA Assistant

    Sure, you can include a context field when making a request to the API. This field should be a string containing previously-generated text from the conversation, which will be used as context for the new request. For example, if you previously requested the text “What is the capital of France?” and the response was “Paris”, then you could use this context in a new request to ask “What is the capital of Germany?”, and the API will respond with “Berlin”.

  3. User

    Will context cost my token?

  4. NVIDIA Assistant

    Yes, including context will consume one token from your token limit. However, using context can be very helpful in reducing the total number of tokens consumed by a long conversation, since it allows you to ask follow-up questions without having to re-ask earlier questions.

  5. User

    Will context limit by 4096 token per request?

  6. NVIDIA Assistant

    Yes, context is limited to 4096 tokens per request. This means that if you want to use context in a large conversation, you will need to split the conversation into multiple requests, each of which uses context from the previous request.

  7. User

    If I want a model base on lots of text data as it's background knowledge. How can I use API service to do that?

  8. NVIDIA Assistant

    You can train your own custom model by sending large amounts of training data to the API. This data can be in the form of text, or in the form of prompt/completion pairs. After training your model on this data, you can then use the API to generate new text based on your model.

  9. User

    Does training data request prompt/completion format or it could be only text?

  10. NVIDIA Assistant

    The training data can be in either format. If you provide text, the API will automatically split it into prompts and completions. However, if you want to provide specific prompts and completions, you can use the prompt/completion format to control the training data more precisely.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.