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
dd6f84fd
Commit
dd6f84fd
authored
11 months ago
by
Marcus Schiesser
Browse files
Options
Downloads
Patches
Plain Diff
fix: don't copy data folder for example file
parent
99e758fc
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
helpers/datasources.ts
+5
-2
5 additions, 2 deletions
helpers/datasources.ts
helpers/index.ts
+2
-3
2 additions, 3 deletions
helpers/index.ts
helpers/types.ts
+1
-1
1 addition, 1 deletion
helpers/types.ts
with
8 additions
and
6 deletions
helpers/datasources.ts
+
5
−
2
View file @
dd6f84fd
import
path
from
"
path
"
;
import
{
templatesDir
}
from
"
./dir
"
;
import
{
TemplateDataSource
}
from
"
./types
"
;
import
{
TemplateDataSource
}
from
"
./types
"
;
// Example file has an empty config
export
const
EXAMPLE_FILE
:
TemplateDataSource
=
{
export
const
EXAMPLE_FILE
:
TemplateDataSource
=
{
type
:
"
file
"
,
type
:
"
file
"
,
config
:
{},
config
:
{
path
:
path
.
join
(
templatesDir
,
"
components
"
,
"
data
"
,
"
101.pdf
"
),
},
};
};
export
function
getDataSources
(
export
function
getDataSources
(
...
...
This diff is collapsed.
Click to expand it.
helpers/index.ts
+
2
−
3
View file @
dd6f84fd
...
@@ -4,7 +4,6 @@ import path from "path";
...
@@ -4,7 +4,6 @@ import path from "path";
import
{
cyan
}
from
"
picocolors
"
;
import
{
cyan
}
from
"
picocolors
"
;
import
fsExtra
from
"
fs-extra
"
;
import
fsExtra
from
"
fs-extra
"
;
import
{
templatesDir
}
from
"
./dir
"
;
import
{
createBackendEnvFile
,
createFrontendEnvFile
}
from
"
./env-variables
"
;
import
{
createBackendEnvFile
,
createFrontendEnvFile
}
from
"
./env-variables
"
;
import
{
PackageManager
}
from
"
./get-pkg-manager
"
;
import
{
PackageManager
}
from
"
./get-pkg-manager
"
;
import
{
installLlamapackProject
}
from
"
./llama-pack
"
;
import
{
installLlamapackProject
}
from
"
./llama-pack
"
;
...
@@ -79,8 +78,8 @@ const copyContextData = async (
...
@@ -79,8 +78,8 @@ const copyContextData = async (
for
(
const
dataSource
of
dataSources
)
{
for
(
const
dataSource
of
dataSources
)
{
const
dataSourceConfig
=
dataSource
?.
config
as
FileSourceConfig
;
const
dataSourceConfig
=
dataSource
?.
config
as
FileSourceConfig
;
// Copy local data
// Copy local data
const
dataPath
=
const
dataPath
=
dataSourceConfig
.
path
;
dataSourceConfig
.
path
??
path
.
join
(
templatesDir
,
"
components
"
,
"
data
"
);
const
destPath
=
path
.
join
(
root
,
"
data
"
,
path
.
basename
(
dataPath
));
const
destPath
=
path
.
join
(
root
,
"
data
"
,
path
.
basename
(
dataPath
));
console
.
log
(
"
Copying data from path:
"
,
dataPath
);
console
.
log
(
"
Copying data from path:
"
,
dataPath
);
await
fsExtra
.
copy
(
dataPath
,
destPath
);
await
fsExtra
.
copy
(
dataPath
,
destPath
);
...
...
This diff is collapsed.
Click to expand it.
helpers/types.ts
+
1
−
1
View file @
dd6f84fd
...
@@ -18,7 +18,7 @@ export type TemplateDataSourceType = "file" | "web";
...
@@ -18,7 +18,7 @@ export type TemplateDataSourceType = "file" | "web";
export
type
TemplateObservability
=
"
none
"
|
"
opentelemetry
"
;
export
type
TemplateObservability
=
"
none
"
|
"
opentelemetry
"
;
// Config for both file and folder
// Config for both file and folder
export
type
FileSourceConfig
=
{
export
type
FileSourceConfig
=
{
path
?
:
string
;
path
:
string
;
};
};
export
type
WebSourceConfig
=
{
export
type
WebSourceConfig
=
{
baseUrl
?:
string
;
baseUrl
?:
string
;
...
...
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