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

README file added in both the examples. #291

Merged
merged 1 commit into from
Dec 4, 2023
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
12 changes: 12 additions & 0 deletions JS/edgechains/examples/hydeSearch/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## How to run hydeSearch Example:-
- Use the following command in the root directory to run this example:

`npm i`

`npm run build`

`npm start`

- You will see that server will running on port `3000`.

- Type `localhost:3000` in your favorite browser to use this example.
15 changes: 15 additions & 0 deletions JS/edgechains/examples/wikiExample/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## How to run WikiExample:-
- Use the following command in the root directory to run this example:

`npm i`

`npm run build`

`npm start`

- This example searches on Wikipedia on given input by you and then it will ask to GPT to summarize the result of Wikipedia in `30` bullet points.

- To use this example make a `POST` request call on `http://localhost:3000/wiki-summary`.
- Request body:

`{"input": "Your Search Topic"}`
12 changes: 12 additions & 0 deletions JS/edgechains/examples/wikiExample/src/WikiExample.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const wikiSummary = require('./WikiExample');


describe("Wiki Search", () => {
it("should return a response", async () => {
expect(
(
await wikiSummary('Barak Obama')
)
).toContain("Barak Obama");
}, 30000);
});
Loading