Skip to content

Commit

Permalink
v 1.2.0 updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
TeerthaDeb committed Oct 21, 2024
1 parent 0bf10b2 commit e768d0b
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 13 deletions.
44 changes: 33 additions & 11 deletions JavaScript-API-Package/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,41 @@

A Node.js package to interact with Zetaforge APIs for executing pipelines and retrieving results.

## Installation
## Requirements

You can install this package via npm. Make sure you have Node.js installed on your machine.
- **Node.js**: Version 18 or higher is required to run the `zetaforge` package. You can download the latest version from the [Node.js official website](https://nodejs.org/).

## Usage

To get started with the `zetaforge` package, follow these steps:

### Step 1: Create a JavaScript file

Create a new JavaScript file (e.g., `index.js`) where you'll write your code to interact with the Zetaforge APIs.

### Step 2: Install the Zetaforge package

Open your terminal, navigate to your project directory, and run the following command to install the `zetaforge` package:

```bash
npm install zetaforge
```

## Usage
### Step 3: Update your package.json
To use ES modules, ensure that your package.json includes the following line:
```bash
"type": "module"
```

* If the 'package.json' file is not created, create it and then include:
```bash
{
"type": "module"
}
```
This setting allows you to use the import statement in your JavaScript files.

Here’s a basic example of how to use the `zetaforge` package to execute a pipeline and retrieve the results.
### Step 4:

```js
import Zetaforge from 'zetaforge';
Expand All @@ -22,9 +46,10 @@ const zetaforge = new Zetaforge('https://anvil.zetaforge.com:', 'YOUR_API_TOKEN'
const pipelineUuid = 'YOUR_PIPELINE_UUID';
const pipelineHash = 'YOUR_PIPELINE_HASH';
const inputs = {
"role": "\"You are a very mean spirited naturalist.\"",
"prompt": "\"Write an article about tigers\"",
"api_key": "\"YOUR API\""
"role": "\"GIVE IT A ROLE(like teacher, doctor, engineer or even plumber\"",
"prompt": "\"INSTRUCTIONS. SUCH AS : suggest me a place to visit in this summer\"",
"api_key": "\"YOUR API\"",
"SOME OTHER KEY" : "\"OTHER KEYS VALUE\""
};

async function executePipeline() {
Expand All @@ -36,7 +61,7 @@ async function executePipeline() {
}
}

executePipeline();
executePipeline(); // it will execute the pipeline....
```

## API
Expand All @@ -61,6 +86,3 @@ For any inquiries, support, or contributions related to this project, please con
**Zetane**
Email: [[email protected]]([email protected])
GitHub: [Zetane](https://github.com/zetane)


Feel free to reach out for any questions or issues you may have regarding the `zetaforge` package.
4 changes: 2 additions & 2 deletions JavaScript-API-Package/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "zetaforge",
"version": "1.0.0",
"description": "A Node.js package to interact with Zetaforge, enabling seamless execution of AI pipelines and retrieval of results via the Zetaforge API",
"version": "1.1.0",
"description": "A Node.js package to interact with Zetaforge APIs",
"main": "index.js",
"type": "module",
"scripts": {
Expand Down

0 comments on commit e768d0b

Please sign in to comment.