azure-search-openai-demo icon indicating copy to clipboard operation
azure-search-openai-demo copied to clipboard

Using Public OpenAI API instead of Azure OpenAI service

Open ablockchainfan opened this issue 2 years ago • 2 comments

  • [x ] feature request

Minimal steps to reproduce

I still do not have the OpenAI Service enabled in my Azure account. I want to test this but changing the api to point to external OpenAI API via API Key.

Did anyone try this and have the code changes that will make this temporarily work, so I can test the functionality?

ablockchainfan avatar Apr 21 '23 19:04 ablockchainfan

I'm also looking for solution on this.

Right now the only failed deployment Is the GPT from Azure

I have a paid GPT API service from Open AI already. Would like to switch to using OpenAI GPT directly instead.

john012343210 avatar Apr 25 '23 08:04 john012343210

What steps did you take to try to get the repo to point at the public openai API?

aorlowskiddm avatar May 03 '23 21:05 aorlowskiddm

Easiest way would be to use the notebook https://github.com/Azure-Samples/azure-search-openai-demo/blob/main/notebooks/chat-read-retrieve-read.ipynb. Delete all openai. lines and only keep openai.key=<yourkey> with your OpenAI API key.´

Probably you need to tweak here and there like in the Completion function:

completion = openai.Completion.create(
        engine=AZURE_OPENAI_GPT_DEPLOYMENT, #this is not needed I guess with OpenAI or call it 'text-davinci-003'
        prompt=summary_prompt_template.format(summary="\n".join(history), question=user_input),
        temperature=0.7,
        max_tokens=32,
        stop=["\n"])

anderl80 avatar May 30 '23 19:05 anderl80

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this issue will be closed.

github-actions[bot] avatar Dec 28 '23 01:12 github-actions[bot]

This is now officially supported, closing.

pamelafox avatar Mar 12 '24 11:03 pamelafox