OpenAI Integration
A single line added to your code makes all the difference
Last updated
Was this helpful?
A single line added to your code makes all the difference
Last updated
Was this helpful?
All that needs to be done in order to add GPTboost functionality to your LLM app, is add one single line to your code: openai.api_base = "https://turbo.gptboost.ai/v1
. Next, per each request made to LLM specified, GPTBoost will collect all the essential data for you.
* Make sure to place the openai.api_base before the completion.
What happens behind the scenes is that GPTBoost and gathers all needed information from the prompts and completions. Now you can search, filter sort and analyze with ease from the beautiful GPTBoost interface.
IMPORTANT: Make sure you add the GPTboost base URL only to apps whose OpenAI API keys have been added to GPTboost. To log requests, GPTBoost serves as a proxy between your app and OpenAI. Hence, if you add the GPTBoost URL but do not have the OpenAI key added to your GPTBoost account, requests to OpenAI will not be authorized and stop processing!