Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Create Llama
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mirrored_repos
MachineLearning
run-llama
Create Llama
Commits
bae07b5c
Commit
bae07b5c
authored
1 year ago
by
thucpn
Committed by
Marcus Schiesser
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
fix: use public model only for nextjs
parent
a9608c92
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
templates/index.ts
+9
-6
9 additions, 6 deletions
templates/index.ts
with
9 additions
and
6 deletions
templates/index.ts
+
9
−
6
View file @
bae07b5c
...
...
@@ -23,14 +23,20 @@ const createEnvLocalFile = async (
openAiKey
?:
string
;
vectorDb
?:
TemplateVectorDB
;
model
?:
string
;
framework
?:
TemplateFramework
;
},
)
=>
{
const
envFileName
=
"
.env
"
;
let
content
=
""
;
const
model
=
opts
?.
model
||
"
gpt-3.5-turbo
"
;
content
+=
`NEXT_PUBLIC_MODEL=
${
model
}
\n`
;
content
+=
`MODEL=
${
model
}
\n`
;
if
(
opts
?.
framework
===
"
express
"
)
{
content
+=
`MODEL=
${
model
}
\n`
;
}
if
(
opts
?.
framework
===
"
nextjs
"
)
{
content
+=
`MODEL=
${
model
}
\nNEXT_PUBLIC_MODEL=
${
model
}
\n`
;
}
console
.
log
(
"
\n
Using OpenAI model:
"
,
model
,
"
\n
"
);
if
(
opts
?.
openAiKey
)
{
content
+=
`OPENAI_API_KEY=
${
opts
?.
openAiKey
}
\n`
;
...
...
@@ -211,10 +217,6 @@ const installTSTemplate = async ({
});
}
if
(
framework
===
"
nextjs
"
||
framework
===
"
express
"
)
{
console
.
log
(
"
\n
Using OpenAI model:
"
,
model
||
"
gpt-3.5-turbo
"
,
"
\n
"
);
}
/**
* Update the package.json scripts.
*/
...
...
@@ -376,6 +378,7 @@ export const installTemplate = async (
openAiKey
:
props
.
openAiKey
,
vectorDb
:
props
.
vectorDb
,
model
:
props
.
model
,
framework
:
props
.
framework
,
});
// Copy test pdf file
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment