npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@openchatai/copilot-flows-editor

v1.6.0

Published

OpenChat Flow Builder for openCopilot

Downloads

4

Readme

Flows Editor

By default, OpenCopilot attempts to map the user's request to an endpoint automatically, and this works well for most simple use cases. However, if your backend contains flows that are not straightforward or intuitive, you may need to define these flows using OpenCopilot's definitions.

What is a Flow?

A flow consists of a series of steps, where each step represents an API call to your backend. Each flow has a name and description to guide the copilot in determining when to invoke it based on the user's request.

For example, imagine that your system includes an "add to cart" functionality, which involves calling multiple endpoints. You may want your copilot to handle user requests that require this functionality. To achieve this, you need to define a flow using OpenCopilot's flow definitions.

example-flow

In this example:

  1. The user requested the copilot to add 3 sunglasses to the cart.

  2. OpenCopilot automatically mapped the user request to the pre-defined "create cart" flow, passing the necessary parameters based on the user request.

  3. After making all the API calls, OpenCopilot responds to the user based on the results of the flow.

How to Define Your OpenCopilot Flows File

First, ensure that your copilot has a valid Swagger file. Typically, when you create a new copilot, you will need to upload a valid Swagger file.

We have developed a simple tool to assist you in writing your OpenCopilot flow definitions. In the following example, we have created a flow for cart creation. Take a look at it.

flows-file-example

Notice that each step have open_api_operation_id, which refer to your swagger file, from there the copilot knows exactly what is the endpoint details, params, base url, etc..

We have prepared a set of endpoints to help you create these flows.

Flows Best Practices

Flows are still in beta, and there are some areas where they currently lack functionality. To make the most of flows in OpenCopilot, ensure that your flow definition files always align with your Swagger file in terms of open_api_operation_id. Additionally, try to minimize the response data from each step (only pass the important fields between steps, not the entire API response).

If you have a specific use case and need support from our team, we would love to assist you. Please join our Discord server or schedule a call with us.

Suggestions and Questions ❤️

OpenCopilot flow definition is new and still in beta. We highly appreciate your suggestions. You can join our Discord server, [email protected]email us, or book a call with us to share your feedback.