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
7b9c95a7
Commit
7b9c95a7
authored
1 year ago
by
Marcus Schiesser
Browse files
Options
Downloads
Patches
Plain Diff
fix: don't use frontend for backends of type non-streaming
parent
8ae5cb8b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
e2e/basic.spec.ts
+7
-3
7 additions, 3 deletions
e2e/basic.spec.ts
e2e/utils.ts
+0
-5
0 additions, 5 deletions
e2e/utils.ts
with
7 additions
and
8 deletions
e2e/basic.spec.ts
+
7
−
3
View file @
7b9c95a7
...
@@ -27,7 +27,9 @@ for (const templateType of templateTypes) {
...
@@ -27,7 +27,9 @@ for (const templateType of templateTypes) {
}
}
const
appType
:
AppType
=
const
appType
:
AppType
=
templateFramework
===
"
express
"
||
templateFramework
===
"
fastapi
"
templateFramework
===
"
express
"
||
templateFramework
===
"
fastapi
"
?
"
--frontend
"
?
templateType
===
"
simple
"
?
"
--no-frontend
"
// simple templates don't have frontends
:
"
--frontend
"
:
""
;
:
""
;
test
(
`try create-llama
${
templateType
}
${
templateFramework
}
${
templateEngine
}
${
templateUI
}
${
appType
}
`
,
async
({
test
(
`try create-llama
${
templateType
}
${
templateFramework
}
${
templateEngine
}
${
templateUI
}
${
appType
}
`
,
async
({
page
,
page
,
...
@@ -46,8 +48,10 @@ for (const templateType of templateTypes) {
...
@@ -46,8 +48,10 @@ for (const templateType of templateTypes) {
const
cps
=
await
runApp
(
cwd
,
name
,
appType
,
port
);
const
cps
=
await
runApp
(
cwd
,
name
,
appType
,
port
);
// test frontend
// test frontend
await
page
.
goto
(
`http://localhost:
${
port
}
`
);
if
(
appType
!==
"
--no-frontend
"
)
{
await
expect
(
page
.
getByText
(
"
Built by LlamaIndex
"
)).
toBeVisible
();
await
page
.
goto
(
`http://localhost:
${
port
}
`
);
await
expect
(
page
.
getByText
(
"
Built by LlamaIndex
"
)).
toBeVisible
();
}
// TODO: test backend using curl (would need OpenAI key)
// TODO: test backend using curl (would need OpenAI key)
// clean processes
// clean processes
cps
.
forEach
((
cp
)
=>
cp
.
kill
());
cps
.
forEach
((
cp
)
=>
cp
.
kill
());
...
...
This diff is collapsed.
Click to expand it.
e2e/utils.ts
+
0
−
5
View file @
7b9c95a7
...
@@ -17,11 +17,6 @@ export async function runApp(
...
@@ -17,11 +17,6 @@ export async function runApp(
try
{
try
{
switch
(
appType
)
{
switch
(
appType
)
{
case
"
--no-frontend
"
:
cps
.
push
(
await
createProcess
(
"
npm run dev
"
,
`
${
cwd
}
/
${
name
}
/backend`
,
port
),
);
break
;
case
"
--frontend
"
:
case
"
--frontend
"
:
cps
.
push
(
cps
.
push
(
await
createProcess
(
await
createProcess
(
...
...
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