Comments (10)
@vladiliescu you are right. It was missing. However I retried with the following .env.local
OPENAI_AZURE_API_KEY=<key>
OPENAI_AZURE_API_HOST="https://<endpoint>.openai.azure.com/openai/deployments/<Model deployment name>"
OPENAI_AZURE_API_VERSION="2023-03-15-preview"
And got the same error:
My enviroment:
- codespace
- local installation
- Open incognito browser window http://localhost:3000/
from azure-chatbot-ui.
https://i.imgur.com/oZD4hzp.gif
You're right! I thought you make a chance so they remove the OpenAI key function on it! You can see in the link that I couldn't start the section at all.
from azure-chatbot-ui.
@leodambrosi you're missing the model deployment.
from azure-chatbot-ui.
Does calling the REST api from curl work for you? See here for instructions.
from azure-chatbot-ui.
I got the same issue! Even after adding .env.local file as you instructed but the chat section still cannot start.
The REST API work for me for sure
#Note: The openai-python library support for Azure OpenAI is in preview.
import os
import openai
openai.api_type = "azure"
openai.api_base = "https://XXXX.openai.azure.com/"
openai.api_version = "2023-03-15-preview"
openai.api_key = "XXXXXXXX"
response = openai.ChatCompletion.create(
engine="gpt4_32k",
messages = [
{"role":"system","content":"You are an AI assistant."},
{"role":"user","content":"tell me about yourself?"}
],
temperature=0.5,
#max_tokens=800,
top_p=0.95,
frequency_penalty=0,
presence_penalty=0,
stop=None)
print(response.choices[0])
but I don't setup GOOGLE_API_KEY and GOOGLE_CSE_ID. Can we remove it or we must have to set it up?
from azure-chatbot-ui.
To be honest I'm not sure what's going on with your setup. I've cloned the repo in a new location, configured it to use a GPT-32k deployment (env.local below), npm i
, npm run dev
and it works. Are you getting any errors in the console?
# Chatbot UI
DEFAULT_SYSTEM_PROMPT=You are ChatGPT, a large language model trained by OpenAI. Follow the user's instructions carefully. Respond using markdown.
OPENAI_AZURE_API_KEY=someazureaiapikey
OPENAI_AZURE_API_HOST="https://someresourcename.openai.azure.com/openai/deployments/somemodelname"
OPENAI_AZURE_API_VERSION="2023-03-15-preview"
# Google
GOOGLE_API_KEY=YOUR_API_KEY
GOOGLE_CSE_ID=YOUR_ENGINE_ID
I've also ignored GOOGLE_* settings, they don't seem to affect the bot working/not working.
from azure-chatbot-ui.
I don't know what the actual problem is but the interface still remains the same as the main repo which requires OpenAI API to access it not like the picture you post on your fork. There is no error on the console at all.
PS E:\azure-chatbot-ui> npm run dev
> [email protected] dev
> next dev
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info - Loaded env from E:\azure-chatbot-ui\.env.local
event - compiled client and server successfully in 2.1s (233 modules)
wait - compiling...
event - compiled successfully in 269 ms (194 modules)
wait - compiling / (client and server)...
event - compiled client and server successfully in 2.2s (5469 modules)
from azure-chatbot-ui.
I haven't posted any picture on my fork, the pic comes from the original repo. So, what happens when you click the new chat button? Why do you say it doesn't work?
from azure-chatbot-ui.
Unfortunately I don't have a way to reproduce this - if you want to investigate this further, you can take a look at the code in index.ts -- that's what I've updated to use Azure OpenAI -- and try debugging it to see what's going on.
from azure-chatbot-ui.
Does calling the REST api from curl work for you? See here for instructions.
Yes, it does work
from azure-chatbot-ui.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-chatbot-ui.