Skip to main content

codecov GitHub Workflow Status PyPI - License GitHub Pipenv locked Python version PyPI - Downloads

OmniBridge

OmniBridge wrap and connects different AI models. It helps access different AI models in a centralized place.

Install

pip install omnibridge

Now you can start using OmniBridge!

NOTE: Once installed, you can use omnibridge with both omnibridge and obr commands.

Usage

Add your key

obr create key --name open_ai --value <value>

Add your model

obr create model chatgpt --name gpt3.5 --key open_ai

You can now run chatGPT from your cli!

obr run model --name gpt3.5 --prompt "tell me a joke"

You can also use the model you created to build flows (aka Auto-GPT), passing the output of one model to several others!

obr create flow --name chef --model gpt3.5 -i "what ingridients do I need for the dishes?" 
"what wine would you suggest to pair with the dishes" "how much time does it take to prepare?"

This command set up four instances of your model, the first instance will handle your prompt as you would expect regularly, however, instead of returning the output, it will pass it to the other three, adding a specific instruction for each!

Understand it best with an example - (Notice it may take a short while to generate a response.)

obr run flow --name chef --prompt "suggest two dishes for a romantic date"

This should return

1. Filet Mignon with Roasted Vegetables: <description>
2. Lobster Risotto: <description>
******************************************************************

Ingridients:
< a list of ingridients>
******************************************************************

1. Filet Mignon with Roasted Vegetables: A red wine like a Cabernet Sauvignon or a Merlot...
2. Lobster Risotto: A white wine like a Chardonnay or a Sauvignon Blanc...
******************************************************************

Typical cooking times for a filet mignon can range from 8 to 12 minutes, and for lobster risotto, 
it can take around 30-40 minutes.

Combining two models in a sequential flow

Add your key

obr create key --name open_ai --value <value>

Create two models

obr create model chatgpt --name gpt_model -k open_ai  
obr create model dalle --name dalle_model -k open_ai  

Now combine both models in a sequential flow

obr create flow --name image_flow --multi gpt_model dalle_model -t seq

Finally, run the flow with a prompt

obr run flow --name image_flow -i "create a prompt to an image that will amaze me"

NOTE: Currently, we create the images in the current working directory.

Creating a flow from a template

These of you looking for more freedom creating a.i model flows, we got you covered too!

obr run flow -f flow_example.json -p "in short, suggest two dished for dinner date"

flow_example.json

{
  "version": "beta",
  "models": [
    {
      "name": "gpt3.5",
      "models": [
        {
          "name": "gpt3.5",
          "instruction": "what ingridients do I need for the dishes?"
        },
        {
          "name": "gpt3.5",
          "instruction": "what wine goes well with the dishes?"
        },
        {
          "name": "gpt3.5",
          "instruction": "what should I make for desert?",
          "models": [
            {
              "name": "dalle",
              "instruction": "realistic photography."
            }
          ]
        }
      ]
    }
  ]
}

Template Structure

  • version: The version of the JSON template.
  • models: An array of models, each containing:
    • name: The name of the AI model you created in OmniBridge.
    • models: An optional nested array of models, each containing:
      • name: The name of the nested AI model you created in OmniBridge.
      • instruction: The instruction to be executed by the AI model. In the beta version we concatenate the instruction to the end of the input generated by the parent model.
      • models: An optional nested array of models, following the same structure as above, getting the output of the current model as input.

NOTE: In the beta version Image models can only be used as the leaves of the graph.



We are working on more cool stuff!

Community

Come share your ideas, usage, and suggestions!
Join our discord server and share your feedback and ideas with us! Discord Icon

Contribute:

Join us in shaping the future of A.I!
For information on how to contribute, see here.

Metadata

Release files for OmniBridge 0.1.74

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for OmniBridge 0.1.74
File Size Uploaded
OmniBridge-0.1.74.tar.gz 25.4 kB Details

Release files / OmniBridge-0.1.74.tar.gz

Download URL OmniBridge-0.1.74.tar.gz
Size 25.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e6ae1558d8e6fb56e6f3067a0e76c6b749d660e3e08bdd70a2afea53898ad349
BLAKE2b-256 checksum
How to use checksums
564a1ed5d9d026ef0055c7876977c8704aa17505247b967cb4627e9e4992904c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.3

Release history Release notifications | RSS feed

This release

0.1.74 This release

1 release file

0.1.73

1 release file

0.1.72

1 release file

0.1.71

1 release file

0.1.70

1 release file

0.1.69

1 release file

0.1.68

1 release file

0.1.67

1 release file

0.1.66

1 release file

0.1.65

1 release file

0.1.64

1 release file

0.1.63

1 release file

0.1.62

1 release file

0.1.61

1 release file

0.1.60

1 release file

0.1.59

1 release file

0.1.58

1 release file

0.1.57

1 release file

0.1.56

1 release file

0.1.55

1 release file

0.1.54

1 release file

0.1.53

1 release file

0.1.52

1 release file

0.1.51

1 release file

0.1.50

1 release file

0.1.49

1 release file

0.1.48

1 release file

0.1.47

1 release file

0.1.46

1 release file

0.1.45

1 release file

0.1.44

1 release file

0.1.43

1 release file

0.1.42

1 release file

0.1.41

1 release file

0.1.40

1 release file

0.1.39

1 release file

0.1.38

1 release file

0.1.37

1 release file

0.1.36

1 release file

0.1.35

1 release file

0.1.34

1 release file

0.1.33

1 release file

0.1.32

1 release file

0.1.31

1 release file

0.1.30

1 release file

0.1.29

1 release file

0.1.28

1 release file

0.1.27

1 release file

0.1.26

1 release file

0.1.25

1 release file

0.1.24

1 release file

0.1.23

1 release file

0.1.22

1 release file

0.1.21

1 release file

0.1.20

1 release file

0.1.19

1 release file

0.1.18

1 release file

0.1.17

1 release file

0.1.16

1 release file

0.1.15

1 release file

0.1.14

1 release file

0.1.13

1 release file

0.1.12

1 release file

0.1.11

1 release file

0.1.10

1 release file

0.1.9

1 release file

0.1.8

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page