Compare commits

..

4 Commits

Author SHA1 Message Date
github-actions[bot] 6e70e327d3 Release 0.3.16 (#440)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-21 11:41:02 +07:00
Huu Le 8b371d8347 chore: fix incompatible with pydantic (#442) 2024-11-21 11:38:52 +07:00
Huu Le 30fe269575 Update duckduckgo tool option (#439) 2024-11-20 17:26:42 +07:00
Marcus Schiesser 49c35b834b docs: improve python readme 2024-11-20 13:30:08 +07:00
15 changed files with 53 additions and 13 deletions
+8
View File
@@ -1,5 +1,13 @@
# create-llama
## 0.3.16
### Patch Changes
- 8b371d8: Set pydantic version to <2.10 to avoid incompatibility with llama-index.
- 30fe269: Deactive duckduckgo tool for TS
- 30fe269: Replace DuckDuckGo by Wikipedia tool for agentic template
## 0.3.15
### Patch Changes
+2 -2
View File
@@ -10,9 +10,9 @@ import { makeDir } from "./helpers/make-dir";
import terminalLink from "terminal-link";
import type { InstallTemplateArgs, TemplateObservability } from "./helpers";
import { installTemplate } from "./helpers";
import { writeDevcontainer } from "./helpers/devcontainer";
import { templatesDir } from "./helpers/dir";
import { toolsRequireConfig } from "./helpers/tools";
import { configVSCode } from "./helpers/vscode";
export type InstallAppArgs = Omit<
InstallTemplateArgs,
@@ -105,7 +105,7 @@ export async function createApp({
});
}
await writeDevcontainer(root, templatesDir, framework, frontend);
await configVSCode(root, templatesDir, framework);
process.chdir(root);
if (tryGitInit(root)) {
+3
View File
@@ -61,6 +61,9 @@ export const assetRelocator = (name: string) => {
case "README-template.md": {
return "README.md";
}
case "vscode_settings.json": {
return "settings.json";
}
default: {
return name;
}
+1 -1
View File
@@ -65,7 +65,7 @@ export const supportedTools: Tool[] = [
version: "^6.3.5",
},
],
supportedFrameworks: ["fastapi", "nextjs", "express"],
supportedFrameworks: ["fastapi"], // TODO: Re-enable this tool once the duck-duck-scrape TypeScript library works again
type: ToolType.LOCAL,
envVars: [
{
+23 -1
View File
@@ -1,5 +1,6 @@
import fs from "fs";
import path from "path";
import { assetRelocator, copy } from "./copy";
import { TemplateFramework } from "./types";
function renderDevcontainerContent(
@@ -29,7 +30,6 @@ export const writeDevcontainer = async (
root: string,
templatesDir: string,
framework: TemplateFramework,
frontend: boolean,
) => {
const devcontainerDir = path.join(root, ".devcontainer");
if (fs.existsSync(devcontainerDir)) {
@@ -46,3 +46,25 @@ export const writeDevcontainer = async (
devcontainerContent,
);
};
export const copyVSCodeSettings = async (
root: string,
templatesDir: string,
) => {
const vscodeDir = path.join(root, ".vscode");
await copy("vscode_settings.json", vscodeDir, {
cwd: templatesDir,
rename: assetRelocator,
});
};
export const configVSCode = async (
root: string,
templatesDir: string,
framework: TemplateFramework,
) => {
await writeDevcontainer(root, templatesDir, framework);
if (framework === "fastapi") {
await copyVSCodeSettings(root, templatesDir);
}
};
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "create-llama",
"version": "0.3.15",
"version": "0.3.16",
"description": "Create LlamaIndex-powered apps with one command",
"keywords": [
"rag",
+1 -1
View File
@@ -131,7 +131,7 @@ const convertAnswers = async (
> = {
rag: {
template: "streaming",
tools: getTools(["duckduckgo"]),
tools: getTools(["wikipedia.WikipediaToolSpec"]),
frontend: true,
dataSources: [EXAMPLE_FILE],
},
@@ -49,7 +49,7 @@ You can start editing the API by modifying `app/api/routers/chat.py` or `app/exa
Open [http://localhost:8000](http://localhost:8000) with your browser to start the app.
To start the app in **production**, run:
To start the app optimized for **production**, run:
```
poetry run prod
@@ -37,7 +37,7 @@ You can start editing the API by modifying `app/api/routers/chat.py` or `app/wor
Open [http://localhost:8000](http://localhost:8000) with your browser to start the app.
To start the app in **production**, run:
To start the app optimized for **production**, run:
```
poetry run prod
@@ -43,7 +43,7 @@ You can start editing the API by modifying `app/api/routers/chat.py` or `app/wor
Open [http://localhost:8000](http://localhost:8000) with your browser to start the app.
To start the app in **production**, run:
To start the app optimized for **production**, run:
```
poetry run prod
@@ -60,10 +60,12 @@ class NextQuestionSuggestion:
return None
@classmethod
def _extract_questions(cls, text: str) -> List[str]:
def _extract_questions(cls, text: str) -> List[str] | None:
content_match = re.search(r"```(.*?)```", text, re.DOTALL)
content = content_match.group(1) if content_match else ""
return content.strip().split("\n")
content = content_match.group(1) if content_match else None
if not content:
return None
return [q.strip() for q in content.split("\n") if q.strip()]
@classmethod
async def suggest_next_questions(
@@ -13,6 +13,7 @@ python = "^3.11,<4.0"
fastapi = "^0.109.1"
uvicorn = { extras = ["standard"], version = "^0.23.2" }
python-dotenv = "^1.0.0"
pydantic = "<2.10"
llama-index = "^0.11.1"
cachetools = "^5.3.3"
reflex = "^0.6.2.post1"
@@ -52,7 +52,7 @@ curl --location 'localhost:8000/api/chat/request' \
You can start editing the API endpoints by modifying `app/api/routers/chat.py`. The endpoints auto-update as you save the file. You can delete the endpoint you're not using.
To start the app in **production**, run:
To start the app optimized for **production**, run:
```
poetry run prod
@@ -16,6 +16,7 @@ python = ">=3.11,<3.14"
fastapi = "^0.109.1"
uvicorn = { extras = ["standard"], version = "^0.23.2" }
python-dotenv = "^1.0.0"
pydantic = "<2.10"
aiostream = "^0.5.2"
cachetools = "^5.3.3"
llama-index = "^0.11.17"
+3
View File
@@ -0,0 +1,3 @@
{
"python.envFile": ""
}