-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0bf10b2
commit e768d0b
Showing
2 changed files
with
35 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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'; | ||
|
@@ -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() { | ||
|
@@ -36,7 +61,7 @@ async function executePipeline() { | |
} | ||
} | ||
|
||
executePipeline(); | ||
executePipeline(); // it will execute the pipeline.... | ||
``` | ||
|
||
## API | ||
|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters