-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* support revoke token * support revoke token * fix url * small fix * Simplify http endpoints * Remove workspaces * Fix test services * Fix login * Support basic web UI * fix permission * upgrade hypha-rpc * fix permission check * Fix register_service options * Add /info endpoint
- Loading branch information
Showing
46 changed files
with
2,013 additions
and
875 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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Hypha Change Log | ||
|
||
### 0.20.15 | ||
|
||
- Add `revoke_token` to the workspace api. | ||
- Simplify http endpoints to a fixed pattern such as "{workspace}/services/*" and "{workspace}/apps/*". | ||
- To avoid naming convension, workspace names now must contain at least one hyphens, and only lowercase letters, numbers and hyphens are allowed. | ||
|
||
### 0.20.14 | ||
|
||
- Make `get_service` more restricted to support only service id string, see [migration guide](./docs/migration-guide.md) for more details. | ||
- Clean up http endpoints for the services. | ||
- Remove local cache of the server apps, we now always use s3 as the primary storage. | ||
|
||
### 0.20.12 | ||
|
||
- New Feature: In order to support large language models' function calling feature, hypha support built-in type annotation. With `hypha-rpc>=0.20.12`, we also support type annotation for the service functions in JSON Schema format. In Python, you can use `Pydantic` or simple python type hint, or directly write the json schema for Javascript service functions. This allows you to specify the inputs spec for functions. | ||
- Add type support for the `hypha` module. It allows you to register a type in the workspace using `register_service_type`, `get_service_type`, `list_service_types`. When registering a new service, you can specify the type and enable type check for the service. The type check will be performed when calling the service function. The type check is only available in Python. | ||
- Fix reconnecton issue in the client. | ||
- Support case conversion, which allows converting the service functions to snake_case or camelCase in `get_service` (Python) or `getService` (JavaScript). | ||
- **Breaking Changes**: In Python, all the function names uses snake case, and in JavaScript, all the function names uses camel case. For example, you should call `server.getService` instead of `server.get_service` in JavaScript, and `server.get_service` instead of `server.getService` in Python. | ||
- **Breaking Changes**: The new version of Hypha (0.20.0+) improves the RPC connection to make it more stable and secure, most importantly it supports automatic reconnection when the connection is lost. This also means breaking changes to the previous version. In the new version you will need a new library called `hypha-rpc` (instead of the hypha submodule in the `imjoy-rpc` module) to connect to the server. | ||
|
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 |
---|---|---|
@@ -1,27 +1,51 @@ | ||
# Hypha | ||
|
||
![PyPI](https://img.shields.io/pypi/v/hypha.svg?style=popout) | ||
|
||
<img src="./docs/img/hypha-logo-black.svg" width="320" alt="Hypha"> | ||
|
||
# Hypha | ||
**Hypha** is a generative AI-powered application framework designed for large-scale data management, AI model serving, and real-time communication. Hypha allows the creation of computational platforms consisting of both computational and user interface components. | ||
|
||
## Key Features | ||
|
||
- **Generative AI-Powered:** Leverage the power of generative AI to build advanced data management and AI model serving solutions. | ||
- **Hypha-RPC:** Utilize [hypha-rpc](https://github.com/oeway/hypha-rpc), a bidirectional remote procedure call system, enabling seamless communication and integration across distributed components. | ||
- **Real-Time Communication:** Support for real-time communication within virtual workspaces, similar to platforms like Zoom. | ||
- **Scalable and Flexible:** Connect and orchestrate various compute services, AI models, tools, and services running on distributed locations. | ||
- **GenAI-Powered Automation:** Build GenAI-powered automation platforms and agentic workflows, enabling fully autonomous agent systems. | ||
|
||
## How It Works | ||
|
||
Hypha acts as a hub that connects different components through **Hypha-RPC**. Users and programmatic clients connect to the platform in virtual workspaces, where they can seamlessly make remote procedure calls (RPC) as if they are calling local functions. Developers can integrate all types of compute services, including AI models, tools, and services, across distributed locations. | ||
|
||
### Virtual Workspaces | ||
|
||
- Hypha's virtual workspaces are akin to Zoom rooms, where clients (users and programmatic) can connect and interact. | ||
- Within these workspaces, all clients can perform seamless RPCs, facilitating easy and efficient collaboration and computation. | ||
|
||
### Integration with Compute Services | ||
|
||
- Hypha supports the integration of various compute services, including AI models and data analytics tools. | ||
- These services, when connected to the platform, can be understood and orchestrated by large language models (LLMs), paving the way for creating next-generation GenAI-powered automation platforms and agentic workflows. | ||
|
||
## Use Cases | ||
|
||
- **Research Institutions:** Build integrated platforms for data management and AI-powered services. | ||
- **AI-Powered Automation:** Create autonomous agent systems and GenAI-powered automation platforms. | ||
- **Data Services:** Facilitate scalable and efficient data services and analytics through distributed computing. | ||
|
||
Hypha is an application framework for large-scale data management and AI model serving, it allows creating computational platforms consists of computational and user interface components. | ||
## Getting Started | ||
|
||
Hypha server act as a hub for connecting different components through [hypya-rpc](https://github.com/oeway/hypha-rpc). | ||
To get started with Hypha, follow the installation and setup instructions in the [documentation](https://docs.amun.ai). | ||
|
||
## Change log | ||
## License | ||
|
||
### 0.20.14 | ||
Hypha is released under the MIT License. See the [LICENSE](./LICENSE) file for more details. | ||
|
||
- Make `get_service` more restricted to support only service id string, see [migration guide](./docs/migration-guide.md) for more details. | ||
- Clean up http endpoints for the services, now we also support /services/:service_id/:function_name | ||
- Remove local cache of the server apps, we now always use s3 as the primary storage. | ||
## Contributing | ||
|
||
### 0.20.12 | ||
We welcome contributions from the community. Please see our [Contributing Guidelines](./CONTRIBUTING.md) for more information. | ||
|
||
- New Feature: In order to support large language models' function calling feature, hypha support built-in type annotation. With `hypha-rpc>=0.20.12`, we also support type annotation for the service functions in JSON Schema format. In Python, you can use `Pydantic` or simple python type hint, or directly write the json schema for Javascript service functions. This allows you to specify the inputs spec for functions. | ||
- Add type support for the `hypha` module. It allows you to register a type in the workspace using `register_service_type`, `get_service_type`, `list_service_types`. When registering a new service, you can specify the type and enable type check for the service. The type check will be performed when calling the service function. The type check is only available in Python. | ||
- Fix reconnecton issue in the client. | ||
- Support case conversion, which allows converting the service functions to snake_case or camelCase in `get_service` (Python) or `getService` (JavaScript). | ||
- **Breaking Changes**: In Python, all the function names uses snake case, and in JavaScript, all the function names uses camel case. For example, you should call `server.getService` instead of `server.get_service` in JavaScript, and `server.get_service` instead of `server.getService` in Python. | ||
- **Breaking Changes**: The new version of Hypha (0.20.0+) improves the RPC connection to make it more stable and secure, most importantly it supports automatic reconnection when the connection is lost. This also means breaking changes to the previous version. In the new version you will need a new library called `hypha-rpc` (instead of the hypha submodule in the `imjoy-rpc` module) to connect to the server. | ||
## Acknowledgments | ||
|
||
We thank the contributors and community members who have helped make Hypha what it is today. |
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 |
---|---|---|
|
@@ -200,7 +200,7 @@ if __name__ == "__main__": | |
Include the following script in your HTML file to load the `hypha-rpc` client: | ||
|
||
```html | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected].14/dist/hypha-rpc-websocket.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected].19/dist/hypha-rpc-websocket.min.js"></script> | ||
``` | ||
|
||
Use the following code in JavaScript to connect to the server and access an existing service: | ||
|
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
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
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 |
---|---|---|
|
@@ -15,7 +15,7 @@ To connect to the server, instead of installing the `imjoy-rpc` module, you will | |
pip install -U hypha-rpc # new install | ||
``` | ||
|
||
We also changed our versioning strategy, we use the same version number for the server and client, so it's easier to match the client and server versions. For example, `hypha-rpc` version `0.20.14` is compatible with Hypha server version `0.20.14`. | ||
We also changed our versioning strategy, we use the same version number for the server and client, so it's easier to match the client and server versions. For example, `hypha-rpc` version `0.20.19` is compatible with Hypha server version `0.20.19`. | ||
|
||
#### 2. Change the imports to use `hypha-rpc` | ||
|
||
|
@@ -124,10 +124,10 @@ loop.run_forever() | |
To connect to the server, instead of using the `imjoy-rpc` module, you will need to use the `hypha-rpc` module. The `hypha-rpc` module is a standalone module that provides the RPC connection to the Hypha server. You can include it in your HTML using a script tag: | ||
|
||
```html | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected].14/dist/hypha-rpc-websocket.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected].19/dist/hypha-rpc-websocket.min.js"></script> | ||
``` | ||
|
||
We also changed our versioning strategy, we use the same version number for the server and client, so it's easier to match the client and server versions. For example, `hypha-rpc` version `0.20.14` is compatible with Hypha server version `0.20.14`. | ||
We also changed our versioning strategy, we use the same version number for the server and client, so it's easier to match the client and server versions. For example, `hypha-rpc` version `0.20.19` is compatible with Hypha server version `0.20.19`. | ||
|
||
#### 2. Change the connection method and use camelCase for service function names | ||
|
||
|
@@ -145,7 +145,7 @@ Here is a suggested list of search and replace operations to update your code: | |
Here is an example of how the updated code might look: | ||
|
||
```html | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected].14/dist/hypha-rpc-websocket.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected].19/dist/hypha-rpc-websocket.min.js"></script> | ||
<script> | ||
async function main(){ | ||
const server = await hyphaWebsocketClient.connectToServer({"server_url": "https://hypha.aicell.io"}); | ||
|
@@ -193,7 +193,7 @@ We created a tutorial to introduce this new feature: [service type annotation](. | |
Here is a quick example in JavaScript: | ||
|
||
```html | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected].14/dist/hypha-rpc-websocket.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected].19/dist/hypha-rpc-websocket.min.js"></script> | ||
|
||
<script> | ||
async function main(){ | ||
|
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 |
---|---|---|
|
@@ -134,7 +134,7 @@ if __name__ == "__main__": | |
**JavaScript Client: Service Usage** | ||
|
||
```html | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected].14/dist/hypha-rpc-websocket.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected].19/dist/hypha-rpc-websocket.min.js"></script> | ||
<script> | ||
async function main() { | ||
const server = await hyphaWebsocketClient.connectToServer({"server_url": "https://hypha.aicell.io"}); | ||
|
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"version": "0.20.14" | ||
"version": "0.20.19" | ||
} |
Oops, something went wrong.