Can i give context to Completions API

I have PDF and I will convert it into text.

Then I want to provide this text as context to Completions API.

I have access to completions API from Azure OpenAI.

In documentation I could find how I can provide this text as context for Completions API. This is documentation I am going through Azure openAI Completions API

I know with Assistant API its possible, but is it possible just with Completions API ?

You can either put the content in your System Prompt, or even embed it into your initial chat post into the conversation, with something like,

Here is the information for you to 
use for answering questions: 
<context>...all of it...</context>

If you are strictly talking about “Completions” and not “Chat Completions” (where chat models are the newest ones that only accept information formatted into “messages”), then there are just a few AI model options, either gpt-3.5-turbo-instruct, which has some training, or davinci-002, which would require serious fine-tuning for a serious application.

In use of completions models, you have to form your own context, containers, and method to get the AI to produce information in the way you want, as the prompt input is bare text, with no automatic delineation of where an answer starts.

An example using the instruction-following skill of gpt-3.5-turbo-instruct

(the logprob of the answer being an 8 or 9 was near equal…)

In chat completions, typically you make the text file input part of the user question if “attached”, or it can be part of the main system message if it should be more part of behavior.