Skip to content

Commit

Permalink
Merge pull request #136 from MaxtuneLee/docs/demo-openai-header
Browse files Browse the repository at this point in the history
docs: add auth header when use openai model
  • Loading branch information
youngwinds authored Jul 22, 2024
2 parents 050f3bf + 69f0cf7 commit 954aa34
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@visactor/vmind",
"comment": "send authorization header when use openai models",
"type": "none"
}
],
"packageName": "@visactor/vmind"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@visactor/vmind",
"comment": "set all headers in all cases",
"type": "none"
}
],
"packageName": "@visactor/vmind"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@visactor/vmind",
"comment": "add bearer header in smart insight page",
"type": "none"
}
],
"packageName": "@visactor/vmind"
}
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ export function DataInput(props: IPropsType) {
cache,
showThoughts: showThoughts,
headers: {
//must has Authorization: `Bearer ${openAIKey}` if use openai api
Authorization: `Bearer ${apiKey}`,
'api-key': apiKey
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export function DataInput(props: IPropsType) {
cache,
showThoughts: showThoughts,
headers: {
Authorization: `Bearer ${apiKey}`,
'api-key': apiKey
}
});
Expand Down

0 comments on commit 954aa34

Please sign in to comment.