diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..43eb191c --- /dev/null +++ b/CHANGELOG.md @@ -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. + diff --git a/README.md b/README.md index 109538e1..2bac5fee 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,51 @@ +# Hypha + ![PyPI](https://img.shields.io/pypi/v/hypha.svg?style=popout) -# 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. diff --git a/docs/getting-started.md b/docs/getting-started.md index f93d56a7..d7f41951 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -200,7 +200,7 @@ if __name__ == "__main__": Include the following script in your HTML file to load the `hypha-rpc` client: ```html - + ``` Use the following code in JavaScript to connect to the server and access an existing service: diff --git a/docs/hypha-quick-tour.ipynb b/docs/hypha-quick-tour.ipynb index b5935d5b..37863e4f 100644 --- a/docs/hypha-quick-tour.ipynb +++ b/docs/hypha-quick-tour.ipynb @@ -83,28 +83,28 @@ { "data": { "text/plain": [ - "[{'id': 'public/workspace-manager:triton-client',\n", + "[{'id': 'public/ws:triton-client',\n", " 'name': 'Triton Client',\n", " 'type': 'triton-client',\n", " 'config': {'visibility': 'public',\n", " 'require_context': True,\n", " 'workspace': 'public',\n", " 'flags': []}},\n", - " {'id': 'public/workspace-manager:s3-storage',\n", + " {'id': 'public/ws:s3-storage',\n", " 'name': 'S3 Storage',\n", " 'type': 's3-storage',\n", " 'config': {'visibility': 'public',\n", " 'require_context': True,\n", " 'workspace': 'public',\n", " 'flags': []}},\n", - " {'id': 'public/workspace-manager:card',\n", + " {'id': 'public/ws:card',\n", " 'name': 'Card',\n", " 'type': 'card',\n", " 'config': {'visibility': 'public',\n", " 'require_context': True,\n", " 'workspace': 'public',\n", " 'flags': []}},\n", - " {'id': 'public/workspace-manager:server-apps',\n", + " {'id': 'public/ws:server-apps',\n", " 'name': 'Server Apps',\n", " 'type': 'server-apps',\n", " 'config': {'visibility': 'public',\n", @@ -268,7 +268,7 @@ ], "source": [ "url = await s3.generate_presigned_url(\n", - " info[\"bucket\"], info[\"prefix\"] + \"hello.txt\"\n", + " \"hello.txt\"\n", ")\n", "print(url)\n", "response = await fetch(url, method=\"GET\")\n", diff --git a/docs/hypha_data_store.py b/docs/hypha_data_store.py index 477bd2d7..59fd3f0b 100644 --- a/docs/hypha_data_store.py +++ b/docs/hypha_data_store.py @@ -20,7 +20,7 @@ async def setup(self, server, service_id="data-store", visibility="public"): "config": {"visibility": visibility, "require_context": False}, "get": self.http_get, }, - overwrite=True, + {"overwrite": True}, ) def get_url(self, obj_id: str): diff --git a/docs/migration-guide.md b/docs/migration-guide.md index f27861ab..1556a1a9 100644 --- a/docs/migration-guide.md +++ b/docs/migration-guide.md @@ -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 - + ``` -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 - + + + - - -
- - -