Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updating package name and the examples #365

Merged
merged 2 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions JS/edgechains/arakoodev/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "arakoodev",
"version": "1.0.10",
"name": "@arakoodev/edgechains.js",
"version": "0.1.23",
"main": "dist/index.js",
"files": [
"dist"
Expand Down
2 changes: 1 addition & 1 deletion JS/edgechains/examples/chat-with-llm/dist/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ArakooServer } from "arakoodev/arakooserver";
import { ArakooServer } from "@arakoodev/edgechains.js/arakooserver";
import Jsonnet from "@arakoodev/jsonnet";
//@ts-ignore
import createClient from "sync-rpc";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const path = require("path");
const { OpenAI } = require("arakoodev/openai");
const { OpenAI } = require("@arakoodev/edgechains.js/openai");
const zod_1 = require("zod");
const Jsonnet = require("@arakoodev/jsonnet");
const jsonnet = new Jsonnet();
Expand Down
41 changes: 21 additions & 20 deletions JS/edgechains/examples/chat-with-llm/package.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
{
"name": "chat-with-youtube-video",
"version": "1.0.0",
"description": "",
"main": "index.js",
"type": "module",
"keywords": [],
"author": "",
"scripts": {
"start": "tsc && node --experimental-wasm-modules ./dist/index.js"
},
"license": "ISC",
"dependencies": {
"@arakoodev/jsonnet": "^0.2.1",
"arakoodev": "^1.0.10",
"sync-rpc": "^1.3.6",
"zod": "^3.23.8"
},
"devDependencies": {
"@types/node": "^20.12.12"
}
"name": "ownChatGpt",
"version": "1.0.0",
"description": "",
"main": "index.js",
"type": "module",
"keywords": [],
"author": "",
"scripts": {
"start": "tsc && node --experimental-wasm-modules ./dist/index.js"
},
"license": "ISC",
"dependencies": {
"@arakoodev/edgechains.js": "^0.1.23",
"@arakoodev/jsonnet": "^0.2.1",
"sync-rpc": "^1.3.6",
"zod": "^3.23.8"
},
"devDependencies": {
"@types/node": "^20.12.12"
}
}

2 changes: 1 addition & 1 deletion JS/edgechains/examples/chat-with-llm/readme.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Video

```
https://drive.google.com/file/d/1y0tGZx9HnjZpWlMmJW-6Yt1fW9lXpxFD/view
https://youtu.be/fq3BpdduO2g
```

# Chat with LLM Example
Expand Down
11 changes: 7 additions & 4 deletions JS/edgechains/examples/chat-with-llm/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { ArakooServer } from "arakoodev/arakooserver";

import { ArakooServer } from "@arakoodev/edgechains.js/arakooserver";
import Jsonnet from "@arakoodev/jsonnet";
//@ts-ignore
import createClient from "sync-rpc";
import createClient from 'sync-rpc';

import { fileURLToPath } from "url";
import { fileURLToPath } from "url"
import path from "path";
const server = new ArakooServer();

Expand All @@ -22,4 +23,6 @@ app.post("/chat", async (c: any) => {
return c.json(JSON.parse(response));
});

server.listen(3000);
server.listen(3000)


Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const path = require("path");
const { OpenAI } = require("arakoodev/openai");
const { OpenAI } = require("@arakoodev/edgechains.js/openai");
import { z } from "zod";
const Jsonnet = require("@arakoodev/jsonnet");
const jsonnet = new Jsonnet();
Expand Down
2 changes: 1 addition & 1 deletion JS/edgechains/examples/chat-with-pdf/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
"author": "",
"license": "ISC",
"dependencies": {
"@arakoodev/edgechains.js": "^0.1.23",
"@arakoodev/jsonnet": "^0.2.0",
"@babel/preset-env": "^7.24.4",
"arakoodev": "^1.0.10",
"cli-spinner": "^0.2.10",
"regenerator-runtime": "^0.14.1",
"zod": "^3.23.8"
Expand Down
2 changes: 1 addition & 1 deletion JS/edgechains/examples/chat-with-pdf/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import "dotenv/config";
import { ArakooServer } from "arakoodev/arakooserver";
import { ArakooServer } from "@arakoodev/edgechains.js/arakooserver";
import { ChatRouter } from "./routes/chat.js";
const server = new ArakooServer();

Expand Down
13 changes: 7 additions & 6 deletions JS/edgechains/examples/chat-with-pdf/src/routes/chat.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import path from "path";
import fs from "fs";
import { fileURLToPath } from "url";
import { OpenAI } from "arakoodev/openai";
import { Supabase } from "arakoodev/vector-db";
import { PdfLoader } from "arakoodev/document-loader";
import { TextSplitter } from "arakoodev/splitter";
import { ArakooServer } from "arakoodev/arakooserver";
import { Spinner } from "cli-spinner";
import { OpenAI } from "@arakoodev/edgechains.js/openai";
import { Supabase } from "@arakoodev/edgechains.js/vector-db";
import { PdfLoader } from "@arakoodev/edgechains.js/document-loader";
import { TextSplitter } from "@arakoodev/edgechains.js/splitter";
import { ArakooServer } from "@arakoodev/edgechains.js/arakooserver";
import { Spinner } from "cli-spinner"

import { z } from "zod";

const server = new ArakooServer();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ArakooServer } from "arakoodev/arakooserver";
import { ArakooServer } from "@arakoodev/edgechains.js/arakooserver";
import { fileURLToPath } from "url";
import Jsonnet from "@arakoodev/jsonnet";
import path from "path";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const { OpenAI } = require("arakoodev/openai");
const path = require("path");
const { OpenAI } = require("@arakoodev/edgechains.js/openai");
const path = require('path');
const Jsonnet = require("@arakoodev/jsonnet");
const jsonnet = new Jsonnet();
const secretsPath = path.join(__dirname, "../../jsonnet/secrets.jsonnet");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const { OpenAI } = require("arakoodev/openai");
const path = require("path");
const { OpenAI } = require("@arakoodev/edgechains.js/openai");
const path = require('path');
const Jsonnet = require("@arakoodev/jsonnet");
const jsonnet = new Jsonnet();
const secretsPath = path.join(__dirname, "../../jsonnet/secrets.jsonnet");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,22 @@
{
"name": "function-calling",
"version": "1.0.0",
"description": "",
"main": "index.js",
"type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "tsc && node --experimental-wasm-modules ./dist/index.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@arakoodev/jsonnet": "^0.2.1",
"@sendgrid/mail": "^8.1.3",
"arakoodev": "^1.0.9",
"axios": "^1.7.1",
"moment-timezone": "^0.5.45",
"openai": "^4.47.1",
"readline-sync": "^1.4.10",
"resend": "^3.2.0",
"sync-rpc": "^1.3.6"
},
"devDependencies": {
"@types/readline-sync": "^1.4.8"
}
"name": "function-calling",
"version": "1.0.0",
"description": "",
"main": "index.js",
"type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "tsc && node --experimental-wasm-modules ./dist/index.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@arakoodev/edgechains.js": "^0.1.23",
"@arakoodev/jsonnet": "^0.2.1",
"axios": "^1.7.1",
"moment-timezone": "^0.5.45",
"openai": "^4.47.1",
"sync-rpc": "^1.3.6"
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Video

```
https://drive.google.com/file/d/1amBXmUZVyWR6l-MaYuE9h6zAJyvIYNIp/view
https://youtu.be/oIsa24uPaQ4
```

## Installation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ArakooServer } from "arakoodev/arakooserver";
import { fileURLToPath } from "url";
import Jsonnet from "@arakoodev/jsonnet";
import path from "path";
import { ArakooServer } from "@arakoodev/edgechains.js/arakooserver";
import { fileURLToPath } from "url"
import Jsonnet from "@arakoodev/jsonnet"
import path from "path"

//@ts-ignore
import createClient from "sync-rpc";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { OpenAI } = require("arakoodev/openai");
const { OpenAI } = require("@arakoodev/edgechains.js/openai");

const path = require("path");
const Jsonnet = require("@arakoodev/jsonnet");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { OpenAI } = require("arakoodev/openai");
const { OpenAI } = require("@arakoodev/edgechains.js/openai");

const path = require("path");
const Jsonnet = require("@arakoodev/jsonnet");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ArakooServer } from "arakoodev/arakooserver";
import { ArakooServer } from "@arakoodev/edgechains.js/arakooserver";
import Jsonnet from "@arakoodev/jsonnet";
//@ts-ignore
import createClient from "sync-rpc";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Object.defineProperty(exports, "__esModule", { value: true });
const zod_1 = require("zod");
const path = require("path");
const { OpenAI } = require("arakoodev/openai");
const { OpenAI } = require("@arakoodev/edgechains.js/openai");
const Jsonnet = require("@arakoodev/jsonnet");
const jsonnet = new Jsonnet();
const secretsPath = path.join(__dirname, "../../jsonnet/secrets.jsonnet");
Expand Down
41 changes: 21 additions & 20 deletions JS/edgechains/examples/language-translater/backend/package.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
{
"name": "language-translater",
"version": "1.0.0",
"description": "",
"main": "index.js",
"type": "module",
"keywords": [],
"author": "",
"scripts": {
"start": "tsc && node --experimental-wasm-modules ./dist/index.js"
},
"license": "ISC",
"dependencies": {
"@arakoodev/jsonnet": "^0.2.1",
"hono": "^4.3.7",
"sync-rpc": "^1.3.6",
"zod": "^3.23.8"
},
"devDependencies": {
"@types/cors": "^2.8.17"
}
"name": "language-translater",
"version": "1.0.0",
"description": "",
"main": "index.js",
"type": "module",
"keywords": [],
"author": "",
"scripts": {
"start": "tsc && node --experimental-wasm-modules ./dist/index.js"
},
"license": "ISC",
"dependencies": {
"@arakoodev/edgechains.js": "^0.1.23",
"@arakoodev/jsonnet": "^0.2.1",
"hono": "^4.3.7",
"sync-rpc": "^1.3.6",
"zod": "^3.23.8"
},
"devDependencies": {
"@types/cors": "^2.8.17"
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ArakooServer } from "arakoodev/arakooserver";
import { ArakooServer } from "@arakoodev/edgechains.js/arakooserver";
import Jsonnet from "@arakoodev/jsonnet";
//@ts-ignore
import createClient from "sync-rpc";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { z } from "zod";
const path = require("path");
const { OpenAI } = require("arakoodev/openai");
const { OpenAI } = require("@arakoodev/edgechains.js/openai");

const Jsonnet = require("@arakoodev/jsonnet");
const jsonnet = new Jsonnet();
Expand Down
2 changes: 1 addition & 1 deletion JS/edgechains/examples/language-translater/readme.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Video

```
https://drive.google.com/file/d/1QclGlD6mDEN9PMDEXAMkdZb0wY5uew8p/view
https://youtu.be/RTARGcRW_0I
```

# Project Name
Expand Down
2 changes: 1 addition & 1 deletion JS/edgechains/examples/react-chain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"author": "",
"license": "ISC",
"dependencies": {
"@arakoodev/edgechains.js": "^0.1.23",
"@arakoodev/jsonnet": "^0.2.1",
"arakoodev": "^1.0.10",
"sync-rpc": "^1.3.6"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion JS/edgechains/examples/react-chain/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ArakooServer } from "arakoodev/arakooserver";
import { ArakooServer } from "@arakoodev/edgechains.js/arakooserver";
import { ReactChainRouter } from "./routes/react-chain.js";

const server = new ArakooServer();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const path = require("path");
const { OpenAI } = require("arakoodev/openai");
const { OpenAI } = require("@arakoodev/edgechains.js/openai");

const Jsonnet = require("@arakoodev/jsonnet");
const jsonnet = new Jsonnet();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ArakooServer } from "arakoodev/arakooserver";
import { ArakooServer } from "@arakoodev/edgechains.js/arakooserver";
//@ts-ignore
import Jsonnet from "@arakoodev/jsonnet";
import { fileURLToPath } from "url";
Expand Down
2 changes: 1 addition & 1 deletion JS/edgechains/examples/summarize-page/dist/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ArakooServer } from "arakoodev/arakooserver";
import { ArakooServer } from "@arakoodev/edgechains.js/arakooserver";
import Jsonnet from "@arakoodev/jsonnet";
//@ts-ignore
import createClient from "sync-rpc";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const path = require("path");
const { OpenAI } = require("arakoodev/openai");
const { OpenAI } = require("@arakoodev/edgechains.js/openai");
const zod_1 = require("zod");
const Jsonnet = require("@arakoodev/jsonnet");
const jsonnet = new Jsonnet();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const { WebScraper } = require("arakoodev/scraper");
const { WebScraper } = require("@arakoodev/edgechains.js/scraper");
const scraper = new WebScraper();
function getPageContent() {
return (url) => {
Expand Down
Loading
Loading