Skip to content

Basic Javascript Functions to interact with Structures and Threads in Griptape Cloud. Used as a basis for the Griptape Chrome Extension.

License

Notifications You must be signed in to change notification settings

ian-griptape-ai/griptape-basic-node-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Griptape Node App

This is a standalone Node.js application that interacts with the Griptape API to initiate a structure run, poll for its status, and print the results once the run is completed.

Project Structure

griptape-node-app
├── src
│   ├── app.js          # Entry point of the application
│   └── utils
│       └── api.js      # Functions for interacting with the Griptape API
│       └── threads.js  # Functions to interact with Conversation Threads via the Griptape API
├── package.json        # npm configuration file
├── env.example         # Example file containing environment variables for configuration
└── README.md           # Project documentation

Setup Instructions

  1. Clone the repository:

    git clone <repository-url>
    cd griptape-node-app
    
  2. Install dependencies:

    npm install
    
  3. Create a .env based on the example.env file in the root directory and add your Griptape API key and endpoint URLs:

    GRIPTAPE_API_URL=https://cloud.griptape.ai/api
    GRIPTAPE_API_KEY=your_Griptape_Cloud_api_key
    STRUCTURE_ID=the Structure ID of the Structure that you wish to invoke
    

Usage

To run the application, use the following command:

node src/app.js

Griptape API Integration

This application utilizes the Griptape API to perform the following actions:

  • Create a Structure Run: Initiates a structure run using the Griptape API.
  • Poll for Event Status: Continuously checks the status of the structure run until it is completed, then retrieves and prints the results.

License

This project is licensed under the MIT License.

About

Basic Javascript Functions to interact with Structures and Threads in Griptape Cloud. Used as a basis for the Griptape Chrome Extension.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published