Comments (3)
oh but it is
# echo $OPENAI_API_KEY
8***************************6
root@59eb15ce51c0:/app#
from pubsec-info-assistant.
app/backend/approaches/chatreadretrieveread.py:173:174
This fails with auth error:
chat_completion = openai.ChatCompletion.create(
deployment_id=self.chatgpt_deployment,
model=self.model_name,
messages=messages,
temperature=0.0,
# max_tokens=32, # setting it too low may cause malformed JSON
max_tokens=100,
n=1)
and needs this:
chat_completion = openai.ChatCompletion.create(
api_key=os.getenv("OPENAI_API_KEY"),
deployment_id=self.chatgpt_deployment,
model=self.model_name,
messages=messages,
temperature=0.0,
# max_tokens=32, # setting it too low may cause malformed JSON
max_tokens=100,
n=1)
not sure how it works for microsoft guys but it clearly doesn't work without it
from pubsec-info-assistant.
The openai class takes the key value on setup not on calls to ChatCompletion()...
In app/backend/app.py
you will find
# Used by the OpenAI SDK
openai.api_type = "azure"
openai.api_base = ENV["AZURE_OPENAI_ENDPOINT"]
if ENV["AZURE_OPENAI_AUTHORITY_HOST"] == "AzureUSGovernment":
AUTHORITY = AzureAuthorityHosts.AZURE_GOVERNMENT
else:
AUTHORITY = AzureAuthorityHosts.AZURE_PUBLIC_CLOUD
openai.api_version = "2023-12-01-preview"
openai.api_key = ENV["AZURE_OPENAI_SERVICE_KEY"]
from pubsec-info-assistant.
Related Issues (20)
- environ vars HOT 1
- .xlsx file extension not uploading HOT 3
- Image is taking up 13GB and doesn't even work HOT 2
- With GPT-4 less than 2mb PDF file Failing - InvalidRequestError maximum context length HOT 8
- Loading module from “http://127.0.0.1:9000/src/index.tsx” was blocked because of a disallowed MIME type (“application/octet-stream”). HOT 3
- embeddings HOT 1
- Not able to deploy the code HOT 2
- Unable to deploy - "No Language set, please check local.env.example for DEFAULT_LANGUAGE" HOT 1
- Upload of Json file hanging HOT 5
- Azure Gov Deployment: App Registration Redirect URI pointing to ".net" instead of ".us" HOT 1
- Gov deployment embedding error
- File still stuck on Queued HOT 2
- Information Assistant web app (rel 1.0) responses include unrelated content in thought process HOT 3
- Queued Error when uploading Json or CSV HOT 4
- Read Time Out after Batch Testing HOT 3
- separate admin and end user experience
- Deployment error for V1.1 : CredentialInvalidLifetimeAsPerAppPolicy: Credential lifetime exceeds the max value allowed as per assigned HOT 3
- Mobile ui
- Work & Work
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 pubsec-info-assistant.