diff --git a/.changeset/chubby-spiders-love.md b/.changeset/chubby-spiders-love.md deleted file mode 100644 index af51b2f3ccac1..0000000000000 --- a/.changeset/chubby-spiders-love.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"gradio": patch ---- - -feat:Warn against Falsy credentials diff --git a/.changeset/fancy-lands-dance.md b/.changeset/fancy-lands-dance.md deleted file mode 100644 index 945799376c513..0000000000000 --- a/.changeset/fancy-lands-dance.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@gradio/client": patch -"gradio": patch ---- - -fix:Ensure JS client `status_callback` functionality works and improve status messages diff --git a/.changeset/fifty-wings-sip.md b/.changeset/fifty-wings-sip.md deleted file mode 100644 index 037b1c077a130..0000000000000 --- a/.changeset/fifty-wings-sip.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"gradio": minor ---- - -feat:Perform CORS validation when the request has a cookie diff --git a/.changeset/heavy-beds-exist.md b/.changeset/heavy-beds-exist.md deleted file mode 100644 index 1c0e0dad8380a..0000000000000 --- a/.changeset/heavy-beds-exist.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@gradio/paramviewer": patch -"gradio": patch ---- - -feat:Refactor `gr.ParamViewer` to use HTML `
` and other tweaks diff --git a/.changeset/heavy-monkeys-shake.md b/.changeset/heavy-monkeys-shake.md deleted file mode 100644 index 03d6c5bd70464..0000000000000 --- a/.changeset/heavy-monkeys-shake.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@gradio/dataframe": patch -"gradio": patch ---- - -fix:8394 df hidden items diff --git a/.changeset/hungry-rice-thank.md b/.changeset/hungry-rice-thank.md deleted file mode 100644 index d3891a94a3299..0000000000000 --- a/.changeset/hungry-rice-thank.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"@gradio/app": minor -"@gradio/client": minor -"@gradio/timer": minor -"gradio": minor -"gradio_client": minor -"website": minor ---- - -fix:Add Timer component diff --git a/.changeset/itchy-cities-walk.md b/.changeset/itchy-cities-walk.md deleted file mode 100644 index 4dfaf3ca96d1f..0000000000000 --- a/.changeset/itchy-cities-walk.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@gradio/client": patch -"gradio": patch ---- - -fix:Ensure `@gradio/client`'s `submit` iterator releases as expected diff --git a/.changeset/light-gifts-pull.md b/.changeset/light-gifts-pull.md deleted file mode 100644 index e7d11522cdeaf..0000000000000 --- a/.changeset/light-gifts-pull.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@gradio/code": minor -"gradio": minor ---- - -feat:Add c/cpp code support diff --git a/.changeset/nine-ways-sink.md b/.changeset/nine-ways-sink.md deleted file mode 100644 index ebf6dfb7a89d7..0000000000000 --- a/.changeset/nine-ways-sink.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@gradio/chatbot": patch -"gradio": patch ---- - -fix:Revert chatbot styling diff --git a/.changeset/puny-bananas-prove.md b/.changeset/puny-bananas-prove.md deleted file mode 100644 index d27488fbf3d4c..0000000000000 --- a/.changeset/puny-bananas-prove.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"website": patch ---- - -feat:Better spacing for codeblocks on docs diff --git a/.changeset/puny-dolls-work.md b/.changeset/puny-dolls-work.md deleted file mode 100644 index 2f8fcf3d3addb..0000000000000 --- a/.changeset/puny-dolls-work.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@gradio/markdown": patch -"gradio": patch ---- - -fix:Chatbot LaTeX Crash Fix diff --git a/.changeset/purple-seals-fetch.md b/.changeset/purple-seals-fetch.md deleted file mode 100644 index 41e02ecc8af25..0000000000000 --- a/.changeset/purple-seals-fetch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"website": patch ---- - -feat:Add guide on best practices for ZeroGPU limits with the python client diff --git a/.changeset/rare-frogs-warn.md b/.changeset/rare-frogs-warn.md deleted file mode 100644 index dc1dd6ea9c598..0000000000000 --- a/.changeset/rare-frogs-warn.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@gradio/client": patch -"gradio": patch ---- - -fix:ensure `@gradio/client` always returns the correct data diff --git a/.changeset/ready-roses-shave.md b/.changeset/ready-roses-shave.md deleted file mode 100644 index aa582a2ba2b4a..0000000000000 --- a/.changeset/ready-roses-shave.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@gradio/image": patch -"@gradio/utils": patch -"gradio": patch ---- - -fix:Fix `Share to community` button for images diff --git a/.changeset/sad-suits-burn.md b/.changeset/sad-suits-burn.md deleted file mode 100644 index 45915b59d3149..0000000000000 --- a/.changeset/sad-suits-burn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"gradio": patch ---- - -fix:Fix multimodal textbox custom components diff --git a/.changeset/shaky-numbers-punch.md b/.changeset/shaky-numbers-punch.md deleted file mode 100644 index 3c8c4938858b9..0000000000000 --- a/.changeset/shaky-numbers-punch.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@gradio/client": patch -"@gradio/upload": patch -"gradio": patch ---- - -fix:Bind `fetch` and `stream` in JS client diff --git a/.changeset/sharp-ideas-run.md b/.changeset/sharp-ideas-run.md deleted file mode 100644 index b54685a79caa7..0000000000000 --- a/.changeset/sharp-ideas-run.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@gradio/app": minor -"@gradio/icons": minor -"@gradio/plot": minor -"gradio": minor ---- - -feat:Time range component diff --git a/.changeset/silver-impalas-try.md b/.changeset/silver-impalas-try.md deleted file mode 100644 index 7f53f52ce994e..0000000000000 --- a/.changeset/silver-impalas-try.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"gradio": minor ---- - -feat:GRADIO_ALLOWED_PATHS & GRADIO_BLOCKED_PATHS comma separated environme… diff --git a/.changeset/slow-candles-fail.md b/.changeset/slow-candles-fail.md deleted file mode 100644 index 6ac84418edf23..0000000000000 --- a/.changeset/slow-candles-fail.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@gradio/dataset": minor -"gradio": minor -"website": minor ---- - -feat:Improvements to `gr.Examples`: adds events as attributes and documents, them, adds `sample_labels`, and `visible` properties diff --git a/.changeset/slow-ties-hope.md b/.changeset/slow-ties-hope.md deleted file mode 100644 index 06fe758fb77c2..0000000000000 --- a/.changeset/slow-ties-hope.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"website": minor ---- - -feat:Fix playground to display errors diff --git a/.changeset/soft-months-behave.md b/.changeset/soft-months-behave.md deleted file mode 100644 index 21ccb51550dd1..0000000000000 --- a/.changeset/soft-months-behave.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"gradio": patch -"website": patch ---- - -fix:Allow supplying custom `gr.Chatbot` with events to `gr.ChatInterface` diff --git a/.changeset/sour-walls-kiss.md b/.changeset/sour-walls-kiss.md deleted file mode 100644 index 8fc67e0c01b8f..0000000000000 --- a/.changeset/sour-walls-kiss.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@gradio/statustracker": patch -"gradio": patch ---- - -fix:Chatbot generating scroll and click fix diff --git a/.changeset/tender-pianos-cross.md b/.changeset/tender-pianos-cross.md deleted file mode 100644 index 5c807c42217f7..0000000000000 --- a/.changeset/tender-pianos-cross.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@gradio/preview": patch ---- - -fix:Fix issue with virtual module in custom components diff --git a/.changeset/true-ears-knock.md b/.changeset/true-ears-knock.md deleted file mode 100644 index 3f8af24d80ed9..0000000000000 --- a/.changeset/true-ears-knock.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"gradio": patch ---- - -feat:Add guides for msg format and llm agents diff --git a/.changeset/wet-seas-end.md b/.changeset/wet-seas-end.md deleted file mode 100644 index b4d86e2afddb3..0000000000000 --- a/.changeset/wet-seas-end.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@gradio/tootils": minor ---- - -feat:Lite load perf ci diff --git a/.changeset/wide-wasps-wait.md b/.changeset/wide-wasps-wait.md deleted file mode 100644 index e8ddff60ff781..0000000000000 --- a/.changeset/wide-wasps-wait.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"website": patch ---- - -feat:Add search to website diff --git a/.changeset/wise-animals-go.md b/.changeset/wise-animals-go.md deleted file mode 100644 index 7a83d94415165..0000000000000 --- a/.changeset/wise-animals-go.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@gradio/model3d": minor -"gradio": minor ---- - -feat:Model3D point cloud and wireframe display modes diff --git a/.changeset/witty-pugs-beg.md b/.changeset/witty-pugs-beg.md deleted file mode 100644 index f678b2912dbe3..0000000000000 --- a/.changeset/witty-pugs-beg.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@gradio/app": patch -"@gradio/client": patch -"gradio": patch ---- - -fix:Documents auth in the guides, in the view API page, and also types the Blocks.config object diff --git a/.changeset/young-crabs-begin.md b/.changeset/young-crabs-begin.md deleted file mode 100644 index eca49c4d88e99..0000000000000 --- a/.changeset/young-crabs-begin.md +++ /dev/null @@ -1,93 +0,0 @@ ---- -"@gradio/chatbot": minor -"@gradio/tootils": minor -"gradio": minor -"website": minor ---- - -highlight: - -#### Support message format in chatbot 💬 - -`gr.Chatbot` and `gr.ChatInterface` now support the [Messages API](https://huggingface.co/docs/text-generation-inference/en/messages_api#messages-api), which is fully compatible with LLM API providers such as Hugging Face Text Generation Inference, OpenAI's chat completions API, and Llama.cpp server. - -Building Gradio applications around these LLM solutions is now even easier! - -`gr.Chatbot` and `gr.ChatInterface` now have a `type` parameter that can accept two values - `'tuples'` and `'messages'`. If set to `'tuples'`, the default chatbot data format is expected. If set to `'messages'`, a list of dictionaries with `content` and `role` keys is expected. See below - - -```python -def chat_greeter(msg, history): - history.append({"role": "assistant", "content": "Hello!"}) - return history -``` - -Additionally, gradio now exposes a `gr.ChatMessage` dataclass you can use for IDE type hints and auto completion. - -image - - -#### Tool use in Chatbot 🛠️ - -The Gradio Chatbot can now natively display tool usage and intermediate thoughts common in Agent and chain-of-thought workflows! - -If you are using the new "messages" format, simply add a `metadata` key with a dictionary containing a `title` key and `value`. This will display the assistant message in an expandable message box to show the result of a tool or intermediate step. - -```python -import gradio as gr -from gradio import ChatMessage -import time - -def generate_response(history): - history.append(ChatMessage(role="user", content="What is the weather in San Francisco right now?")) - yield history - time.sleep(0.25) - history.append(ChatMessage(role="assistant", - content="In order to find the current weather in San Francisco, I will need to use my weather tool.") - ) - yield history - time.sleep(0.25) - - history.append(ChatMessage(role="assistant", - content="API Error when connecting to weather service.", - metadata={"title": "💥 Error using tool 'Weather'"}) - ) - yield history - time.sleep(0.25) - - history.append(ChatMessage(role="assistant", - content="I will try again", - )) - yield history - time.sleep(0.25) - - history.append(ChatMessage(role="assistant", - content="Weather 72 degrees Fahrenheit with 20% chance of rain.", - metadata={"title": "🛠️ Used tool 'Weather'"} - )) - yield history - time.sleep(0.25) - - history.append(ChatMessage(role="assistant", - content="Now that the API succeeded I can complete my task.", - )) - yield history - time.sleep(0.25) - - history.append(ChatMessage(role="assistant", - content="It's a sunny day in San Francisco with a current temperature of 72 degrees Fahrenheit and a 20% chance of rain. Enjoy the weather!", - )) - yield history - - -with gr.Blocks() as demo: - chatbot = gr.Chatbot(type="messages") - button = gr.Button("Get San Francisco Weather") - button.click(generate_response, chatbot, chatbot) - -if __name__ == "__main__": - demo.launch() -``` - - - -![tool-box-demo](https://github.com/freddyaboulton/freddyboulton/assets/41651716/cf73ecc9-90ac-42ce-bca5-768e0cc00a48) \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 5763023cfeac2..3f287903a0814 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,124 @@ # gradio +## 4.38.0 + +### Highlights + +#### Support message format in chatbot 💬 ([#8422](https://github.com/gradio-app/gradio/pull/8422) [`4221290`](https://github.com/gradio-app/gradio/commit/4221290d847041024b1faa3df5585bba0775b8b3)) + +`gr.Chatbot` and `gr.ChatInterface` now support the [Messages API](https://huggingface.co/docs/text-generation-inference/en/messages_api#messages-api), which is fully compatible with LLM API providers such as Hugging Face Text Generation Inference, OpenAI's chat completions API, and Llama.cpp server. + +Building Gradio applications around these LLM solutions is now even easier! + +`gr.Chatbot` and `gr.ChatInterface` now have a `type` parameter that can accept two values - `'tuples'` and `'messages'`. If set to `'tuples'`, the default chatbot data format is expected. If set to `'messages'`, a list of dictionaries with `content` and `role` keys is expected. See below - + +```python +def chat_greeter(msg, history): + history.append({"role": "assistant", "content": "Hello!"}) + return history +``` + +Additionally, gradio now exposes a `gr.ChatMessage` dataclass you can use for IDE type hints and auto completion. + +image + + +#### Tool use in Chatbot 🛠️ + +The Gradio Chatbot can now natively display tool usage and intermediate thoughts common in Agent and chain-of-thought workflows! + +If you are using the new "messages" format, simply add a `metadata` key with a dictionary containing a `title` key and `value`. This will display the assistant message in an expandable message box to show the result of a tool or intermediate step. + +```python +import gradio as gr +from gradio import ChatMessage +import time + +def generate_response(history): + history.append(ChatMessage(role="user", content="What is the weather in San Francisco right now?")) + yield history + time.sleep(0.25) + history.append(ChatMessage(role="assistant", + content="In order to find the current weather in San Francisco, I will need to use my weather tool.") + ) + yield history + time.sleep(0.25) + + history.append(ChatMessage(role="assistant", + content="API Error when connecting to weather service.", + metadata={"title": "💥 Error using tool 'Weather'"}) + ) + yield history + time.sleep(0.25) + + history.append(ChatMessage(role="assistant", + content="I will try again", + )) + yield history + time.sleep(0.25) + + history.append(ChatMessage(role="assistant", + content="Weather 72 degrees Fahrenheit with 20% chance of rain.", + metadata={"title": "🛠️ Used tool 'Weather'"} + )) + yield history + time.sleep(0.25) + + history.append(ChatMessage(role="assistant", + content="Now that the API succeeded I can complete my task.", + )) + yield history + time.sleep(0.25) + + history.append(ChatMessage(role="assistant", + content="It's a sunny day in San Francisco with a current temperature of 72 degrees Fahrenheit and a 20% chance of rain. Enjoy the weather!", + )) + yield history + + +with gr.Blocks() as demo: + chatbot = gr.Chatbot(type="messages") + button = gr.Button("Get San Francisco Weather") + button.click(generate_response, chatbot, chatbot) + +if __name__ == "__main__": + demo.launch() +``` + + + +![tool-box-demo](https://github.com/freddyaboulton/freddyboulton/assets/41651716/cf73ecc9-90ac-42ce-bca5-768e0cc00a48) + + Thanks @freddyaboulton! + +### Features + +- [#8683](https://github.com/gradio-app/gradio/pull/8683) [`a92c3e8`](https://github.com/gradio-app/gradio/commit/a92c3e8015c1951f995f52f9750a0364bd5d5e8d) - Warn against Falsy credentials. Thanks @Paillat-dev! +- [#8743](https://github.com/gradio-app/gradio/pull/8743) [`ee497d5`](https://github.com/gradio-app/gradio/commit/ee497d5c3c96041e5b624452596762248de114cc) - Perform CORS validation when the request has a cookie. Thanks @abidlabs! +- [#8744](https://github.com/gradio-app/gradio/pull/8744) [`b736c8d`](https://github.com/gradio-app/gradio/commit/b736c8db343087a4854f659b92732c8859fa999a) - Refactor `gr.ParamViewer` to use HTML `
` and other tweaks. Thanks @abidlabs! +- [#8665](https://github.com/gradio-app/gradio/pull/8665) [`3b8238c`](https://github.com/gradio-app/gradio/commit/3b8238c2e222a6537b19b8901198b7e369e8319a) - Add c/cpp code support. Thanks @ginazhouhuiwu! +- [#8713](https://github.com/gradio-app/gradio/pull/8713) [`e3c7079`](https://github.com/gradio-app/gradio/commit/e3c7079e380880d5759d98d180eaf688122f1c69) - Time range component. Thanks @aliabid94! +- [#8705](https://github.com/gradio-app/gradio/pull/8705) [`280a3f4`](https://github.com/gradio-app/gradio/commit/280a3f4afe0500fe67a02fafa2ac31344c3a0149) - GRADIO_ALLOWED_PATHS & GRADIO_BLOCKED_PATHS comma separated environme…. Thanks @cocktailpeanut! +- [#8733](https://github.com/gradio-app/gradio/pull/8733) [`fb0daf3`](https://github.com/gradio-app/gradio/commit/fb0daf3730ffbe6aab5ebe4210eae150729a40b1) - Improvements to `gr.Examples`: adds events as attributes and documents, them, adds `sample_labels`, and `visible` properties. Thanks @abidlabs! +- [#8750](https://github.com/gradio-app/gradio/pull/8750) [`5e36144`](https://github.com/gradio-app/gradio/commit/5e361442328cf01fa92ecdadfa420054b8da2a81) - Add guides for msg format and llm agents. Thanks @freddyaboulton! +- [#8687](https://github.com/gradio-app/gradio/pull/8687) [`bc1d45d`](https://github.com/gradio-app/gradio/commit/bc1d45d8745a677bbe2a32f8d7553fe0d4ef3fd7) - Model3D point cloud and wireframe display modes. Thanks @dawoodkhan82! + +### Fixes + +- [#8699](https://github.com/gradio-app/gradio/pull/8699) [`012da05`](https://github.com/gradio-app/gradio/commit/012da05287846d94beb0ecdc28d7fbc48c4248ff) - Ensure JS client `status_callback` functionality works and improve status messages. Thanks @hannahblair! +- [#8763](https://github.com/gradio-app/gradio/pull/8763) [`c1ecfde`](https://github.com/gradio-app/gradio/commit/c1ecfde50e55902140aafc3551968e26c1bb4cd0) - 8394 df hidden items. Thanks @pngwn! +- [#8505](https://github.com/gradio-app/gradio/pull/8505) [`2943d6d`](https://github.com/gradio-app/gradio/commit/2943d6d68847314885dc6c5c0247083116017ca0) - Add Timer component. Thanks @aliabid94! +- [#8715](https://github.com/gradio-app/gradio/pull/8715) [`a6b3c6c`](https://github.com/gradio-app/gradio/commit/a6b3c6ce4e1d06253860c72740024a9138e3a93a) - Ensure `@gradio/client`'s `submit` iterator releases as expected. Thanks @pngwn! +- [#8758](https://github.com/gradio-app/gradio/pull/8758) [`26cdd0f`](https://github.com/gradio-app/gradio/commit/26cdd0ffe049ecfe751f3831cbdb4c04c0ecf934) - Revert chatbot styling. Thanks @pngwn! +- [#8658](https://github.com/gradio-app/gradio/pull/8658) [`0482453`](https://github.com/gradio-app/gradio/commit/0482453fd5815446c8efa21bfbba0b00d6e4113d) - Chatbot LaTeX Crash Fix. Thanks @dawoodkhan82! +- [#8716](https://github.com/gradio-app/gradio/pull/8716) [`e834d30`](https://github.com/gradio-app/gradio/commit/e834d302e44f7a54565129bf2c11acf4e882a59b) - ensure `@gradio/client` always returns the correct data. Thanks @pngwn! +- [#8737](https://github.com/gradio-app/gradio/pull/8737) [`31a876d`](https://github.com/gradio-app/gradio/commit/31a876d0274d7b74a90d30148f3e9c098f486242) - Fix `Share to community` button for images. Thanks @hannahblair! +- [#8719](https://github.com/gradio-app/gradio/pull/8719) [`d15ada9`](https://github.com/gradio-app/gradio/commit/d15ada9a1c270dd86e1751b1846510a70dc48510) - Fix multimodal textbox custom components. Thanks @freddyaboulton! +- [#8714](https://github.com/gradio-app/gradio/pull/8714) [`1b5b5b0`](https://github.com/gradio-app/gradio/commit/1b5b5b0b43e69ee84f3baad2aae59ffc9c4d995a) - Bind `fetch` and `stream` in JS client. Thanks @hannahblair! +- [#8677](https://github.com/gradio-app/gradio/pull/8677) [`c946c6f`](https://github.com/gradio-app/gradio/commit/c946c6f31a34bfd888a6a16c3fb479fe34710206) - Allow supplying custom `gr.Chatbot` with events to `gr.ChatInterface`. Thanks @abidlabs! +- [#8748](https://github.com/gradio-app/gradio/pull/8748) [`a9307c6`](https://github.com/gradio-app/gradio/commit/a9307c64525c5b323e56ea6f7475faa7c3dad4a4) - Chatbot generating scroll and click fix. Thanks @freddyaboulton! +- [#8720](https://github.com/gradio-app/gradio/pull/8720) [`936c713`](https://github.com/gradio-app/gradio/commit/936c7137a99ef59efdf75bae5dd27eea2ac1f577) - Documents auth in the guides, in the view API page, and also types the Blocks.config object. Thanks @abidlabs! + ## 4.37.2 ### Features diff --git a/client/js/CHANGELOG.md b/client/js/CHANGELOG.md index 326f937b12c00..227579821e05d 100644 --- a/client/js/CHANGELOG.md +++ b/client/js/CHANGELOG.md @@ -1,5 +1,16 @@ # @gradio/client +## 1.3.0 + +### Fixes + +- [#8699](https://github.com/gradio-app/gradio/pull/8699) [`012da05`](https://github.com/gradio-app/gradio/commit/012da05287846d94beb0ecdc28d7fbc48c4248ff) - Ensure JS client `status_callback` functionality works and improve status messages. Thanks @hannahblair! +- [#8505](https://github.com/gradio-app/gradio/pull/8505) [`2943d6d`](https://github.com/gradio-app/gradio/commit/2943d6d68847314885dc6c5c0247083116017ca0) - Add Timer component. Thanks @aliabid94! +- [#8715](https://github.com/gradio-app/gradio/pull/8715) [`a6b3c6c`](https://github.com/gradio-app/gradio/commit/a6b3c6ce4e1d06253860c72740024a9138e3a93a) - Ensure `@gradio/client`'s `submit` iterator releases as expected. Thanks @pngwn! +- [#8716](https://github.com/gradio-app/gradio/pull/8716) [`e834d30`](https://github.com/gradio-app/gradio/commit/e834d302e44f7a54565129bf2c11acf4e882a59b) - ensure `@gradio/client` always returns the correct data. Thanks @pngwn! +- [#8714](https://github.com/gradio-app/gradio/pull/8714) [`1b5b5b0`](https://github.com/gradio-app/gradio/commit/1b5b5b0b43e69ee84f3baad2aae59ffc9c4d995a) - Bind `fetch` and `stream` in JS client. Thanks @hannahblair! +- [#8720](https://github.com/gradio-app/gradio/pull/8720) [`936c713`](https://github.com/gradio-app/gradio/commit/936c7137a99ef59efdf75bae5dd27eea2ac1f577) - Documents auth in the guides, in the view API page, and also types the Blocks.config object. Thanks @abidlabs! + ## 1.2.1 ### Features diff --git a/client/js/package.json b/client/js/package.json index 118a79a33aa12..d0a13f81a4b29 100644 --- a/client/js/package.json +++ b/client/js/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/client", - "version": "1.2.1", + "version": "1.3.0", "description": "Gradio API client", "type": "module", "main": "dist/index.js", diff --git a/client/python/CHANGELOG.md b/client/python/CHANGELOG.md index 2b9891e202b55..3105fc25aec25 100644 --- a/client/python/CHANGELOG.md +++ b/client/python/CHANGELOG.md @@ -1,5 +1,11 @@ # gradio_client +## 1.1.0 + +### Fixes + +- [#8505](https://github.com/gradio-app/gradio/pull/8505) [`2943d6d`](https://github.com/gradio-app/gradio/commit/2943d6d68847314885dc6c5c0247083116017ca0) - Add Timer component. Thanks @aliabid94! + ## 1.0.2 ### Features diff --git a/client/python/gradio_client/CHANGELOG.md b/client/python/gradio_client/CHANGELOG.md index 2b9891e202b55..3105fc25aec25 100644 --- a/client/python/gradio_client/CHANGELOG.md +++ b/client/python/gradio_client/CHANGELOG.md @@ -1,5 +1,11 @@ # gradio_client +## 1.1.0 + +### Fixes + +- [#8505](https://github.com/gradio-app/gradio/pull/8505) [`2943d6d`](https://github.com/gradio-app/gradio/commit/2943d6d68847314885dc6c5c0247083116017ca0) - Add Timer component. Thanks @aliabid94! + ## 1.0.2 ### Features diff --git a/client/python/gradio_client/package.json b/client/python/gradio_client/package.json index 537ef5664119c..d9af60e010525 100644 --- a/client/python/gradio_client/package.json +++ b/client/python/gradio_client/package.json @@ -1,6 +1,6 @@ { "name": "gradio_client", - "version": "1.0.2", + "version": "1.1.0", "description": "", "python": "true", "main_changeset": true diff --git a/gradio/CHANGELOG.md b/gradio/CHANGELOG.md index 5763023cfeac2..3f287903a0814 100644 --- a/gradio/CHANGELOG.md +++ b/gradio/CHANGELOG.md @@ -1,5 +1,124 @@ # gradio +## 4.38.0 + +### Highlights + +#### Support message format in chatbot 💬 ([#8422](https://github.com/gradio-app/gradio/pull/8422) [`4221290`](https://github.com/gradio-app/gradio/commit/4221290d847041024b1faa3df5585bba0775b8b3)) + +`gr.Chatbot` and `gr.ChatInterface` now support the [Messages API](https://huggingface.co/docs/text-generation-inference/en/messages_api#messages-api), which is fully compatible with LLM API providers such as Hugging Face Text Generation Inference, OpenAI's chat completions API, and Llama.cpp server. + +Building Gradio applications around these LLM solutions is now even easier! + +`gr.Chatbot` and `gr.ChatInterface` now have a `type` parameter that can accept two values - `'tuples'` and `'messages'`. If set to `'tuples'`, the default chatbot data format is expected. If set to `'messages'`, a list of dictionaries with `content` and `role` keys is expected. See below - + +```python +def chat_greeter(msg, history): + history.append({"role": "assistant", "content": "Hello!"}) + return history +``` + +Additionally, gradio now exposes a `gr.ChatMessage` dataclass you can use for IDE type hints and auto completion. + +image + + +#### Tool use in Chatbot 🛠️ + +The Gradio Chatbot can now natively display tool usage and intermediate thoughts common in Agent and chain-of-thought workflows! + +If you are using the new "messages" format, simply add a `metadata` key with a dictionary containing a `title` key and `value`. This will display the assistant message in an expandable message box to show the result of a tool or intermediate step. + +```python +import gradio as gr +from gradio import ChatMessage +import time + +def generate_response(history): + history.append(ChatMessage(role="user", content="What is the weather in San Francisco right now?")) + yield history + time.sleep(0.25) + history.append(ChatMessage(role="assistant", + content="In order to find the current weather in San Francisco, I will need to use my weather tool.") + ) + yield history + time.sleep(0.25) + + history.append(ChatMessage(role="assistant", + content="API Error when connecting to weather service.", + metadata={"title": "💥 Error using tool 'Weather'"}) + ) + yield history + time.sleep(0.25) + + history.append(ChatMessage(role="assistant", + content="I will try again", + )) + yield history + time.sleep(0.25) + + history.append(ChatMessage(role="assistant", + content="Weather 72 degrees Fahrenheit with 20% chance of rain.", + metadata={"title": "🛠️ Used tool 'Weather'"} + )) + yield history + time.sleep(0.25) + + history.append(ChatMessage(role="assistant", + content="Now that the API succeeded I can complete my task.", + )) + yield history + time.sleep(0.25) + + history.append(ChatMessage(role="assistant", + content="It's a sunny day in San Francisco with a current temperature of 72 degrees Fahrenheit and a 20% chance of rain. Enjoy the weather!", + )) + yield history + + +with gr.Blocks() as demo: + chatbot = gr.Chatbot(type="messages") + button = gr.Button("Get San Francisco Weather") + button.click(generate_response, chatbot, chatbot) + +if __name__ == "__main__": + demo.launch() +``` + + + +![tool-box-demo](https://github.com/freddyaboulton/freddyboulton/assets/41651716/cf73ecc9-90ac-42ce-bca5-768e0cc00a48) + + Thanks @freddyaboulton! + +### Features + +- [#8683](https://github.com/gradio-app/gradio/pull/8683) [`a92c3e8`](https://github.com/gradio-app/gradio/commit/a92c3e8015c1951f995f52f9750a0364bd5d5e8d) - Warn against Falsy credentials. Thanks @Paillat-dev! +- [#8743](https://github.com/gradio-app/gradio/pull/8743) [`ee497d5`](https://github.com/gradio-app/gradio/commit/ee497d5c3c96041e5b624452596762248de114cc) - Perform CORS validation when the request has a cookie. Thanks @abidlabs! +- [#8744](https://github.com/gradio-app/gradio/pull/8744) [`b736c8d`](https://github.com/gradio-app/gradio/commit/b736c8db343087a4854f659b92732c8859fa999a) - Refactor `gr.ParamViewer` to use HTML `
` and other tweaks. Thanks @abidlabs! +- [#8665](https://github.com/gradio-app/gradio/pull/8665) [`3b8238c`](https://github.com/gradio-app/gradio/commit/3b8238c2e222a6537b19b8901198b7e369e8319a) - Add c/cpp code support. Thanks @ginazhouhuiwu! +- [#8713](https://github.com/gradio-app/gradio/pull/8713) [`e3c7079`](https://github.com/gradio-app/gradio/commit/e3c7079e380880d5759d98d180eaf688122f1c69) - Time range component. Thanks @aliabid94! +- [#8705](https://github.com/gradio-app/gradio/pull/8705) [`280a3f4`](https://github.com/gradio-app/gradio/commit/280a3f4afe0500fe67a02fafa2ac31344c3a0149) - GRADIO_ALLOWED_PATHS & GRADIO_BLOCKED_PATHS comma separated environme…. Thanks @cocktailpeanut! +- [#8733](https://github.com/gradio-app/gradio/pull/8733) [`fb0daf3`](https://github.com/gradio-app/gradio/commit/fb0daf3730ffbe6aab5ebe4210eae150729a40b1) - Improvements to `gr.Examples`: adds events as attributes and documents, them, adds `sample_labels`, and `visible` properties. Thanks @abidlabs! +- [#8750](https://github.com/gradio-app/gradio/pull/8750) [`5e36144`](https://github.com/gradio-app/gradio/commit/5e361442328cf01fa92ecdadfa420054b8da2a81) - Add guides for msg format and llm agents. Thanks @freddyaboulton! +- [#8687](https://github.com/gradio-app/gradio/pull/8687) [`bc1d45d`](https://github.com/gradio-app/gradio/commit/bc1d45d8745a677bbe2a32f8d7553fe0d4ef3fd7) - Model3D point cloud and wireframe display modes. Thanks @dawoodkhan82! + +### Fixes + +- [#8699](https://github.com/gradio-app/gradio/pull/8699) [`012da05`](https://github.com/gradio-app/gradio/commit/012da05287846d94beb0ecdc28d7fbc48c4248ff) - Ensure JS client `status_callback` functionality works and improve status messages. Thanks @hannahblair! +- [#8763](https://github.com/gradio-app/gradio/pull/8763) [`c1ecfde`](https://github.com/gradio-app/gradio/commit/c1ecfde50e55902140aafc3551968e26c1bb4cd0) - 8394 df hidden items. Thanks @pngwn! +- [#8505](https://github.com/gradio-app/gradio/pull/8505) [`2943d6d`](https://github.com/gradio-app/gradio/commit/2943d6d68847314885dc6c5c0247083116017ca0) - Add Timer component. Thanks @aliabid94! +- [#8715](https://github.com/gradio-app/gradio/pull/8715) [`a6b3c6c`](https://github.com/gradio-app/gradio/commit/a6b3c6ce4e1d06253860c72740024a9138e3a93a) - Ensure `@gradio/client`'s `submit` iterator releases as expected. Thanks @pngwn! +- [#8758](https://github.com/gradio-app/gradio/pull/8758) [`26cdd0f`](https://github.com/gradio-app/gradio/commit/26cdd0ffe049ecfe751f3831cbdb4c04c0ecf934) - Revert chatbot styling. Thanks @pngwn! +- [#8658](https://github.com/gradio-app/gradio/pull/8658) [`0482453`](https://github.com/gradio-app/gradio/commit/0482453fd5815446c8efa21bfbba0b00d6e4113d) - Chatbot LaTeX Crash Fix. Thanks @dawoodkhan82! +- [#8716](https://github.com/gradio-app/gradio/pull/8716) [`e834d30`](https://github.com/gradio-app/gradio/commit/e834d302e44f7a54565129bf2c11acf4e882a59b) - ensure `@gradio/client` always returns the correct data. Thanks @pngwn! +- [#8737](https://github.com/gradio-app/gradio/pull/8737) [`31a876d`](https://github.com/gradio-app/gradio/commit/31a876d0274d7b74a90d30148f3e9c098f486242) - Fix `Share to community` button for images. Thanks @hannahblair! +- [#8719](https://github.com/gradio-app/gradio/pull/8719) [`d15ada9`](https://github.com/gradio-app/gradio/commit/d15ada9a1c270dd86e1751b1846510a70dc48510) - Fix multimodal textbox custom components. Thanks @freddyaboulton! +- [#8714](https://github.com/gradio-app/gradio/pull/8714) [`1b5b5b0`](https://github.com/gradio-app/gradio/commit/1b5b5b0b43e69ee84f3baad2aae59ffc9c4d995a) - Bind `fetch` and `stream` in JS client. Thanks @hannahblair! +- [#8677](https://github.com/gradio-app/gradio/pull/8677) [`c946c6f`](https://github.com/gradio-app/gradio/commit/c946c6f31a34bfd888a6a16c3fb479fe34710206) - Allow supplying custom `gr.Chatbot` with events to `gr.ChatInterface`. Thanks @abidlabs! +- [#8748](https://github.com/gradio-app/gradio/pull/8748) [`a9307c6`](https://github.com/gradio-app/gradio/commit/a9307c64525c5b323e56ea6f7475faa7c3dad4a4) - Chatbot generating scroll and click fix. Thanks @freddyaboulton! +- [#8720](https://github.com/gradio-app/gradio/pull/8720) [`936c713`](https://github.com/gradio-app/gradio/commit/936c7137a99ef59efdf75bae5dd27eea2ac1f577) - Documents auth in the guides, in the view API page, and also types the Blocks.config object. Thanks @abidlabs! + ## 4.37.2 ### Features diff --git a/gradio/package.json b/gradio/package.json index 7e15cc6bb9dd8..53d50fb70a5a8 100644 --- a/gradio/package.json +++ b/gradio/package.json @@ -1,6 +1,6 @@ { "name": "gradio", - "version": "4.37.2", + "version": "4.38.0", "description": "", "python": "true" } diff --git a/js/_spaces-test/CHANGELOG.md b/js/_spaces-test/CHANGELOG.md index 6b3c15d41d4de..95545d4ba1edf 100644 --- a/js/_spaces-test/CHANGELOG.md +++ b/js/_spaces-test/CHANGELOG.md @@ -4,6 +4,13 @@ ### Dependency updates +- @gradio/client@1.3.0 +- @gradio/form@0.1.20 + +## 0.0.1 + +### Dependency updates + - @gradio/client@1.2.1 ## 0.0.1 diff --git a/js/_website/CHANGELOG.md b/js/_website/CHANGELOG.md index 0d38bbd4371eb..96002f5764365 100644 --- a/js/_website/CHANGELOG.md +++ b/js/_website/CHANGELOG.md @@ -1,5 +1,113 @@ # website +## 0.34.0 + +### Highlights + +#### Support message format in chatbot 💬 ([#8422](https://github.com/gradio-app/gradio/pull/8422) [`4221290`](https://github.com/gradio-app/gradio/commit/4221290d847041024b1faa3df5585bba0775b8b3)) + +`gr.Chatbot` and `gr.ChatInterface` now support the [Messages API](https://huggingface.co/docs/text-generation-inference/en/messages_api#messages-api), which is fully compatible with LLM API providers such as Hugging Face Text Generation Inference, OpenAI's chat completions API, and Llama.cpp server. + +Building Gradio applications around these LLM solutions is now even easier! + +`gr.Chatbot` and `gr.ChatInterface` now have a `type` parameter that can accept two values - `'tuples'` and `'messages'`. If set to `'tuples'`, the default chatbot data format is expected. If set to `'messages'`, a list of dictionaries with `content` and `role` keys is expected. See below - + +```python +def chat_greeter(msg, history): + history.append({"role": "assistant", "content": "Hello!"}) + return history +``` + +Additionally, gradio now exposes a `gr.ChatMessage` dataclass you can use for IDE type hints and auto completion. + +image + + +#### Tool use in Chatbot 🛠️ + +The Gradio Chatbot can now natively display tool usage and intermediate thoughts common in Agent and chain-of-thought workflows! + +If you are using the new "messages" format, simply add a `metadata` key with a dictionary containing a `title` key and `value`. This will display the assistant message in an expandable message box to show the result of a tool or intermediate step. + +```python +import gradio as gr +from gradio import ChatMessage +import time + +def generate_response(history): + history.append(ChatMessage(role="user", content="What is the weather in San Francisco right now?")) + yield history + time.sleep(0.25) + history.append(ChatMessage(role="assistant", + content="In order to find the current weather in San Francisco, I will need to use my weather tool.") + ) + yield history + time.sleep(0.25) + + history.append(ChatMessage(role="assistant", + content="API Error when connecting to weather service.", + metadata={"title": "💥 Error using tool 'Weather'"}) + ) + yield history + time.sleep(0.25) + + history.append(ChatMessage(role="assistant", + content="I will try again", + )) + yield history + time.sleep(0.25) + + history.append(ChatMessage(role="assistant", + content="Weather 72 degrees Fahrenheit with 20% chance of rain.", + metadata={"title": "🛠️ Used tool 'Weather'"} + )) + yield history + time.sleep(0.25) + + history.append(ChatMessage(role="assistant", + content="Now that the API succeeded I can complete my task.", + )) + yield history + time.sleep(0.25) + + history.append(ChatMessage(role="assistant", + content="It's a sunny day in San Francisco with a current temperature of 72 degrees Fahrenheit and a 20% chance of rain. Enjoy the weather!", + )) + yield history + + +with gr.Blocks() as demo: + chatbot = gr.Chatbot(type="messages") + button = gr.Button("Get San Francisco Weather") + button.click(generate_response, chatbot, chatbot) + +if __name__ == "__main__": + demo.launch() +``` + + + +![tool-box-demo](https://github.com/freddyaboulton/freddyboulton/assets/41651716/cf73ecc9-90ac-42ce-bca5-768e0cc00a48) + + Thanks @freddyaboulton! + +### Features + +- [#8733](https://github.com/gradio-app/gradio/pull/8733) [`fb0daf3`](https://github.com/gradio-app/gradio/commit/fb0daf3730ffbe6aab5ebe4210eae150729a40b1) - Improvements to `gr.Examples`: adds events as attributes and documents, them, adds `sample_labels`, and `visible` properties. Thanks @abidlabs! +- [#8686](https://github.com/gradio-app/gradio/pull/8686) [`64ac05b`](https://github.com/gradio-app/gradio/commit/64ac05b1114e08c21909d21653c02d1c45f05aee) - Better spacing for codeblocks on docs. Thanks @aliabd! +- [#8656](https://github.com/gradio-app/gradio/pull/8656) [`740364e`](https://github.com/gradio-app/gradio/commit/740364e5cee5f96625fe0da3ac8257d97e5f0815) - Add guide on best practices for ZeroGPU limits with the python client. Thanks @freddyaboulton! +- [#8689](https://github.com/gradio-app/gradio/pull/8689) [`edcd574`](https://github.com/gradio-app/gradio/commit/edcd5748f6c0faf2028a8e6a330aad5eccf103d5) - Fix playground to display errors. Thanks @whitphx! +- [#8624](https://github.com/gradio-app/gradio/pull/8624) [`ba59bb8`](https://github.com/gradio-app/gradio/commit/ba59bb824f77dd3cb57019c59d3c3b0755c68b85) - Add search to website. Thanks @aliabd! + +### Fixes + +- [#8505](https://github.com/gradio-app/gradio/pull/8505) [`2943d6d`](https://github.com/gradio-app/gradio/commit/2943d6d68847314885dc6c5c0247083116017ca0) - Add Timer component. Thanks @aliabid94! +- [#8677](https://github.com/gradio-app/gradio/pull/8677) [`c946c6f`](https://github.com/gradio-app/gradio/commit/c946c6f31a34bfd888a6a16c3fb479fe34710206) - Allow supplying custom `gr.Chatbot` with events to `gr.ChatInterface`. Thanks @abidlabs! + +### Dependency updates + +- @gradio/code@0.7.0 + ## 0.33.0 ### Features diff --git a/js/_website/package.json b/js/_website/package.json index f19b73e60273e..e1a0bd9035781 100644 --- a/js/_website/package.json +++ b/js/_website/package.json @@ -1,6 +1,6 @@ { "name": "website", - "version": "0.33.0", + "version": "0.34.0", "private": true, "scripts": { "dev": "pip install boto3 && python generate_jsons/generate.py && vite dev", diff --git a/js/accordion/CHANGELOG.md b/js/accordion/CHANGELOG.md index a29a4e3b419de..3fefe27b14d8a 100644 --- a/js/accordion/CHANGELOG.md +++ b/js/accordion/CHANGELOG.md @@ -1,5 +1,14 @@ # @gradio/accordion +## 0.3.18 + +### Dependency updates + +- @gradio/atoms@0.7.6 +- @gradio/utils@0.5.1 +- @gradio/statustracker@0.7.1 +- @gradio/column@0.1.2 + ## 0.3.17 ### Dependency updates diff --git a/js/accordion/package.json b/js/accordion/package.json index de933ba912aae..140e4da24138e 100644 --- a/js/accordion/package.json +++ b/js/accordion/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/accordion", - "version": "0.3.17", + "version": "0.3.18", "description": "Gradio UI packages", "type": "module", "author": "", @@ -11,7 +11,7 @@ "@gradio/atoms": "workspace:^", "@gradio/column": "workspace:^", "@gradio/statustracker": "workspace:^", - "@gradio/utils": "workspace:0.5.0" + "@gradio/utils": "workspace:0.5.1" }, "devDependencies": { "@gradio/preview": "workspace:^" diff --git a/js/annotatedimage/CHANGELOG.md b/js/annotatedimage/CHANGELOG.md index 4e65802001952..dd9d3cbc401a0 100644 --- a/js/annotatedimage/CHANGELOG.md +++ b/js/annotatedimage/CHANGELOG.md @@ -1,5 +1,16 @@ # @gradio/annotatedimage +## 0.6.13 + +### Dependency updates + +- @gradio/atoms@0.7.6 +- @gradio/utils@0.5.1 +- @gradio/statustracker@0.7.1 +- @gradio/client@1.3.0 +- @gradio/upload@0.11.5 +- @gradio/icons@0.6.0 + ## 0.6.12 ### Dependency updates diff --git a/js/annotatedimage/package.json b/js/annotatedimage/package.json index 960fb01cdd639..c2410c786f044 100644 --- a/js/annotatedimage/package.json +++ b/js/annotatedimage/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/annotatedimage", - "version": "0.6.12", + "version": "0.6.13", "description": "Gradio UI packages", "type": "module", "author": "", diff --git a/js/app/CHANGELOG.md b/js/app/CHANGELOG.md index 089acb27b95ad..37dffbfb3bf39 100644 --- a/js/app/CHANGELOG.md +++ b/js/app/CHANGELOG.md @@ -1,5 +1,71 @@ # @gradio/app +## 1.38.0 + +### Features + +- [#8713](https://github.com/gradio-app/gradio/pull/8713) [`e3c7079`](https://github.com/gradio-app/gradio/commit/e3c7079e380880d5759d98d180eaf688122f1c69) - Time range component. Thanks @aliabid94! + +### Fixes + +- [#8505](https://github.com/gradio-app/gradio/pull/8505) [`2943d6d`](https://github.com/gradio-app/gradio/commit/2943d6d68847314885dc6c5c0247083116017ca0) - Add Timer component. Thanks @aliabid94! +- [#8720](https://github.com/gradio-app/gradio/pull/8720) [`936c713`](https://github.com/gradio-app/gradio/commit/936c7137a99ef59efdf75bae5dd27eea2ac1f577) - Documents auth in the guides, in the view API page, and also types the Blocks.config object. Thanks @abidlabs! + +### Dependency updates + +- @gradio/atoms@0.7.6 +- @gradio/utils@0.5.1 +- @gradio/statustracker@0.7.1 +- @gradio/client@1.3.0 +- @gradio/markdown@0.8.1 +- @gradio/upload@0.11.5 +- @gradio/button@0.2.46 +- @gradio/paramviewer@0.4.17 +- @gradio/dataframe@0.8.13 +- @gradio/timer@0.3.0 +- @gradio/code@0.7.0 +- @gradio/chatbot@0.12.0 +- @gradio/image@0.12.2 +- @gradio/icons@0.6.0 +- @gradio/plot@0.6.0 +- @gradio/dataset@0.2.0 +- @gradio/model3d@0.11.0 +- @gradio/annotatedimage@0.6.13 +- @gradio/audio@0.12.2 +- @gradio/downloadbutton@0.1.23 +- @gradio/file@0.8.5 +- @gradio/fileexplorer@0.4.14 +- @gradio/gallery@0.11.2 +- @gradio/imageeditor@0.7.13 +- @gradio/multimodaltextbox@0.5.2 +- @gradio/simpleimage@0.6.2 +- @gradio/uploadbutton@0.6.14 +- @gradio/video@0.9.2 +- @gradio/accordion@0.3.18 +- @gradio/checkbox@0.3.8 +- @gradio/checkboxgroup@0.5.8 +- @gradio/colorpicker@0.3.8 +- @gradio/column@0.1.2 +- @gradio/datetime@0.0.2 +- @gradio/dropdown@0.7.8 +- @gradio/fallback@0.3.8 +- @gradio/form@0.1.20 +- @gradio/highlightedtext@0.7.2 +- @gradio/html@0.3.1 +- @gradio/json@0.2.8 +- @gradio/label@0.3.8 +- @gradio/number@0.4.8 +- @gradio/radio@0.5.8 +- @gradio/row@0.1.3 +- @gradio/simpledropdown@0.2.8 +- @gradio/simpletextbox@0.2.8 +- @gradio/slider@0.4.8 +- @gradio/tabitem@0.2.12 +- @gradio/tabs@0.2.11 +- @gradio/textbox@0.6.7 +- @gradio/group@0.1.1 +- @gradio/box@0.1.20 + ## 1.37.1 ### Dependency updates diff --git a/js/app/package.json b/js/app/package.json index 89f9f94be826d..7fb65f9be303d 100644 --- a/js/app/package.json +++ b/js/app/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/app", - "version": "1.37.1", + "version": "1.38.0", "private": true, "type": "module", "scripts": { diff --git a/js/atoms/CHANGELOG.md b/js/atoms/CHANGELOG.md index 7faa325724b90..6d2e709577d8d 100644 --- a/js/atoms/CHANGELOG.md +++ b/js/atoms/CHANGELOG.md @@ -1,5 +1,12 @@ # @gradio/atoms +## 0.7.6 + +### Dependency updates + +- @gradio/utils@0.5.1 +- @gradio/icons@0.6.0 + ## 0.7.5 ### Dependency updates diff --git a/js/atoms/package.json b/js/atoms/package.json index 2a948a2467d1f..31ae07dd14141 100644 --- a/js/atoms/package.json +++ b/js/atoms/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/atoms", - "version": "0.7.5", + "version": "0.7.6", "description": "Gradio UI packages", "type": "module", "main": "src/index.ts", diff --git a/js/audio/CHANGELOG.md b/js/audio/CHANGELOG.md index 3b3ba71bb9796..b07fc68b941b9 100644 --- a/js/audio/CHANGELOG.md +++ b/js/audio/CHANGELOG.md @@ -1,5 +1,17 @@ # @gradio/audio +## 0.12.2 + +### Dependency updates + +- @gradio/atoms@0.7.6 +- @gradio/utils@0.5.1 +- @gradio/statustracker@0.7.1 +- @gradio/client@1.3.0 +- @gradio/upload@0.11.5 +- @gradio/button@0.2.46 +- @gradio/icons@0.6.0 + ## 0.12.1 ### Dependency updates diff --git a/js/audio/package.json b/js/audio/package.json index a51258bc7bee2..6c7f3fd17e07c 100644 --- a/js/audio/package.json +++ b/js/audio/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/audio", - "version": "0.12.1", + "version": "0.12.2", "description": "Gradio UI packages", "type": "module", "author": "", diff --git a/js/box/CHANGELOG.md b/js/box/CHANGELOG.md index ac1bafd00ab3b..03a10c00deed0 100644 --- a/js/box/CHANGELOG.md +++ b/js/box/CHANGELOG.md @@ -1,5 +1,11 @@ # @gradio/box +## 0.1.20 + +### Dependency updates + +- @gradio/atoms@0.7.6 + ## 0.1.19 ### Dependency updates diff --git a/js/box/package.json b/js/box/package.json index 9095b5dd48391..58d84b5bc8eeb 100644 --- a/js/box/package.json +++ b/js/box/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/box", - "version": "0.1.19", + "version": "0.1.20", "description": "Gradio UI packages", "type": "module", "author": "", diff --git a/js/button/CHANGELOG.md b/js/button/CHANGELOG.md index d57e0a245373b..3a76e5c9cf7c2 100644 --- a/js/button/CHANGELOG.md +++ b/js/button/CHANGELOG.md @@ -1,5 +1,13 @@ # @gradio/button +## 0.2.46 + +### Dependency updates + +- @gradio/utils@0.5.1 +- @gradio/client@1.3.0 +- @gradio/upload@0.11.5 + ## 0.2.45 ### Dependency updates diff --git a/js/button/package.json b/js/button/package.json index 9f8715f751881..0b5b20cd49007 100644 --- a/js/button/package.json +++ b/js/button/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/button", - "version": "0.2.45", + "version": "0.2.46", "description": "Gradio UI packages", "type": "module", "author": "", diff --git a/js/chatbot/CHANGELOG.md b/js/chatbot/CHANGELOG.md index e2d7947d16e54..25385ab6721a5 100644 --- a/js/chatbot/CHANGELOG.md +++ b/js/chatbot/CHANGELOG.md @@ -1,5 +1,115 @@ # @gradio/chatbot +## 0.12.0 + +### Highlights + +#### Support message format in chatbot 💬 ([#8422](https://github.com/gradio-app/gradio/pull/8422) [`4221290`](https://github.com/gradio-app/gradio/commit/4221290d847041024b1faa3df5585bba0775b8b3)) + +`gr.Chatbot` and `gr.ChatInterface` now support the [Messages API](https://huggingface.co/docs/text-generation-inference/en/messages_api#messages-api), which is fully compatible with LLM API providers such as Hugging Face Text Generation Inference, OpenAI's chat completions API, and Llama.cpp server. + +Building Gradio applications around these LLM solutions is now even easier! + +`gr.Chatbot` and `gr.ChatInterface` now have a `type` parameter that can accept two values - `'tuples'` and `'messages'`. If set to `'tuples'`, the default chatbot data format is expected. If set to `'messages'`, a list of dictionaries with `content` and `role` keys is expected. See below - + +```python +def chat_greeter(msg, history): + history.append({"role": "assistant", "content": "Hello!"}) + return history +``` + +Additionally, gradio now exposes a `gr.ChatMessage` dataclass you can use for IDE type hints and auto completion. + +image + + +#### Tool use in Chatbot 🛠️ + +The Gradio Chatbot can now natively display tool usage and intermediate thoughts common in Agent and chain-of-thought workflows! + +If you are using the new "messages" format, simply add a `metadata` key with a dictionary containing a `title` key and `value`. This will display the assistant message in an expandable message box to show the result of a tool or intermediate step. + +```python +import gradio as gr +from gradio import ChatMessage +import time + +def generate_response(history): + history.append(ChatMessage(role="user", content="What is the weather in San Francisco right now?")) + yield history + time.sleep(0.25) + history.append(ChatMessage(role="assistant", + content="In order to find the current weather in San Francisco, I will need to use my weather tool.") + ) + yield history + time.sleep(0.25) + + history.append(ChatMessage(role="assistant", + content="API Error when connecting to weather service.", + metadata={"title": "💥 Error using tool 'Weather'"}) + ) + yield history + time.sleep(0.25) + + history.append(ChatMessage(role="assistant", + content="I will try again", + )) + yield history + time.sleep(0.25) + + history.append(ChatMessage(role="assistant", + content="Weather 72 degrees Fahrenheit with 20% chance of rain.", + metadata={"title": "🛠️ Used tool 'Weather'"} + )) + yield history + time.sleep(0.25) + + history.append(ChatMessage(role="assistant", + content="Now that the API succeeded I can complete my task.", + )) + yield history + time.sleep(0.25) + + history.append(ChatMessage(role="assistant", + content="It's a sunny day in San Francisco with a current temperature of 72 degrees Fahrenheit and a 20% chance of rain. Enjoy the weather!", + )) + yield history + + +with gr.Blocks() as demo: + chatbot = gr.Chatbot(type="messages") + button = gr.Button("Get San Francisco Weather") + button.click(generate_response, chatbot, chatbot) + +if __name__ == "__main__": + demo.launch() +``` + + + +![tool-box-demo](https://github.com/freddyaboulton/freddyboulton/assets/41651716/cf73ecc9-90ac-42ce-bca5-768e0cc00a48) + + Thanks @freddyaboulton! + +### Fixes + +- [#8758](https://github.com/gradio-app/gradio/pull/8758) [`26cdd0f`](https://github.com/gradio-app/gradio/commit/26cdd0ffe049ecfe751f3831cbdb4c04c0ecf934) - Revert chatbot styling. Thanks @pngwn! + +### Dependency updates + +- @gradio/atoms@0.7.6 +- @gradio/utils@0.5.1 +- @gradio/statustracker@0.7.1 +- @gradio/client@1.3.0 +- @gradio/markdown@0.8.1 +- @gradio/upload@0.11.5 +- @gradio/image@0.12.2 +- @gradio/icons@0.6.0 +- @gradio/plot@0.6.0 +- @gradio/audio@0.12.2 +- @gradio/gallery@0.11.2 +- @gradio/video@0.9.2 + ## 0.11.1 ### Fixes diff --git a/js/chatbot/package.json b/js/chatbot/package.json index 031d3183c9601..1f63b7b88a875 100644 --- a/js/chatbot/package.json +++ b/js/chatbot/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/chatbot", - "version": "0.11.1", + "version": "0.12.0", "description": "Gradio UI packages", "type": "module", "author": "", diff --git a/js/checkbox/CHANGELOG.md b/js/checkbox/CHANGELOG.md index 17efbad8c495c..fabe56b0074b7 100644 --- a/js/checkbox/CHANGELOG.md +++ b/js/checkbox/CHANGELOG.md @@ -1,5 +1,13 @@ # @gradio/checkbox +## 0.3.8 + +### Dependency updates + +- @gradio/atoms@0.7.6 +- @gradio/utils@0.5.1 +- @gradio/statustracker@0.7.1 + ## 0.3.7 ### Dependency updates diff --git a/js/checkbox/package.json b/js/checkbox/package.json index eca514e7a95d9..1230f60addf1e 100644 --- a/js/checkbox/package.json +++ b/js/checkbox/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/checkbox", - "version": "0.3.7", + "version": "0.3.8", "description": "Gradio UI packages", "type": "module", "author": "", diff --git a/js/checkboxgroup/CHANGELOG.md b/js/checkboxgroup/CHANGELOG.md index f09ad8f49dc2f..1cabdba54d100 100644 --- a/js/checkboxgroup/CHANGELOG.md +++ b/js/checkboxgroup/CHANGELOG.md @@ -1,5 +1,13 @@ # @gradio/checkboxgroup +## 0.5.8 + +### Dependency updates + +- @gradio/atoms@0.7.6 +- @gradio/utils@0.5.1 +- @gradio/statustracker@0.7.1 + ## 0.5.7 ### Dependency updates diff --git a/js/checkboxgroup/package.json b/js/checkboxgroup/package.json index 7cca86a2ce792..caa5ac1920a09 100644 --- a/js/checkboxgroup/package.json +++ b/js/checkboxgroup/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/checkboxgroup", - "version": "0.5.7", + "version": "0.5.8", "description": "Gradio UI packages", "type": "module", "author": "", diff --git a/js/code/CHANGELOG.md b/js/code/CHANGELOG.md index b82d66e5d60d6..e3c44325e25ed 100644 --- a/js/code/CHANGELOG.md +++ b/js/code/CHANGELOG.md @@ -1,5 +1,19 @@ # @gradio/code +## 0.7.0 + +### Features + +- [#8665](https://github.com/gradio-app/gradio/pull/8665) [`3b8238c`](https://github.com/gradio-app/gradio/commit/3b8238c2e222a6537b19b8901198b7e369e8319a) - Add c/cpp code support. Thanks @ginazhouhuiwu! + +### Dependency updates + +- @gradio/atoms@0.7.6 +- @gradio/utils@0.5.1 +- @gradio/statustracker@0.7.1 +- @gradio/upload@0.11.5 +- @gradio/icons@0.6.0 + ## 0.6.13 ### Dependency updates diff --git a/js/code/package.json b/js/code/package.json index 8d81d752011c3..9a89f0434c2ed 100644 --- a/js/code/package.json +++ b/js/code/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/code", - "version": "0.6.13", + "version": "0.7.0", "description": "Gradio UI packages", "type": "module", "author": "", diff --git a/js/colorpicker/CHANGELOG.md b/js/colorpicker/CHANGELOG.md index de64188f74c64..1990702cad8a8 100644 --- a/js/colorpicker/CHANGELOG.md +++ b/js/colorpicker/CHANGELOG.md @@ -1,5 +1,13 @@ # @gradio/colorpicker +## 0.3.8 + +### Dependency updates + +- @gradio/atoms@0.7.6 +- @gradio/utils@0.5.1 +- @gradio/statustracker@0.7.1 + ## 0.3.7 ### Dependency updates diff --git a/js/colorpicker/package.json b/js/colorpicker/package.json index 72b4254cc0305..0e5763ba9f25e 100644 --- a/js/colorpicker/package.json +++ b/js/colorpicker/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/colorpicker", - "version": "0.3.7", + "version": "0.3.8", "description": "Gradio UI packages", "type": "module", "author": "", diff --git a/js/column/CHANGELOG.md b/js/column/CHANGELOG.md index 00b6372467cc0..e4b7c85d63c9a 100644 --- a/js/column/CHANGELOG.md +++ b/js/column/CHANGELOG.md @@ -4,6 +4,13 @@ ### Dependency updates +- @gradio/utils@0.5.1 +- @gradio/statustracker@0.7.1 + +## 0.1.2 + +### Dependency updates + - @gradio/utils@0.5.0 - @gradio/statustracker@0.7.0 diff --git a/js/dataframe/CHANGELOG.md b/js/dataframe/CHANGELOG.md index da0c7d2cde1e8..17d7b90ea5e16 100644 --- a/js/dataframe/CHANGELOG.md +++ b/js/dataframe/CHANGELOG.md @@ -1,5 +1,21 @@ # @gradio/dataframe +## 0.8.13 + +### Fixes + +- [#8763](https://github.com/gradio-app/gradio/pull/8763) [`c1ecfde`](https://github.com/gradio-app/gradio/commit/c1ecfde50e55902140aafc3551968e26c1bb4cd0) - 8394 df hidden items. Thanks @pngwn! + +### Dependency updates + +- @gradio/atoms@0.7.6 +- @gradio/utils@0.5.1 +- @gradio/statustracker@0.7.1 +- @gradio/client@1.3.0 +- @gradio/markdown@0.8.1 +- @gradio/upload@0.11.5 +- @gradio/button@0.2.46 + ## 0.8.12 ### Dependency updates diff --git a/js/dataframe/package.json b/js/dataframe/package.json index a9db59feacd2e..b78790eed8b00 100644 --- a/js/dataframe/package.json +++ b/js/dataframe/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/dataframe", - "version": "0.8.12", + "version": "0.8.13", "description": "Gradio UI packages", "type": "module", "author": "", diff --git a/js/dataset/CHANGELOG.md b/js/dataset/CHANGELOG.md index 14656baaad7c9..90d5607284bc9 100644 --- a/js/dataset/CHANGELOG.md +++ b/js/dataset/CHANGELOG.md @@ -1,5 +1,19 @@ # @gradio/dataset +## 0.2.0 + +### Features + +- [#8733](https://github.com/gradio-app/gradio/pull/8733) [`fb0daf3`](https://github.com/gradio-app/gradio/commit/fb0daf3730ffbe6aab5ebe4210eae150729a40b1) - Improvements to `gr.Examples`: adds events as attributes and documents, them, adds `sample_labels`, and `visible` properties. Thanks @abidlabs! + +### Dependency updates + +- @gradio/atoms@0.7.6 +- @gradio/utils@0.5.1 +- @gradio/client@1.3.0 +- @gradio/upload@0.11.5 +- @gradio/textbox@0.6.7 + ## 0.1.45 ### Dependency updates diff --git a/js/dataset/package.json b/js/dataset/package.json index eef9f44f24e34..047a1c01369ec 100644 --- a/js/dataset/package.json +++ b/js/dataset/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/dataset", - "version": "0.1.45", + "version": "0.2.0", "description": "Gradio UI packages", "type": "module", "author": "", diff --git a/js/datetime/CHANGELOG.md b/js/datetime/CHANGELOG.md index cae41448bc173..f7006035463a6 100644 --- a/js/datetime/CHANGELOG.md +++ b/js/datetime/CHANGELOG.md @@ -1,3 +1,12 @@ # @gradio/datetime -## 0.1.0 +## 0.0.2 + +### Dependency updates + +- @gradio/atoms@0.7.6 +- @gradio/utils@0.5.1 +- @gradio/statustracker@0.7.1 +- @gradio/icons@0.6.0 + +## 0.1.0 \ No newline at end of file diff --git a/js/datetime/package.json b/js/datetime/package.json index ef0702639bad2..d183efd216067 100644 --- a/js/datetime/package.json +++ b/js/datetime/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/datetime", - "version": "0.0.1", + "version": "0.0.2", "description": "Gradio UI packages", "type": "module", "author": "", diff --git a/js/downloadbutton/CHANGELOG.md b/js/downloadbutton/CHANGELOG.md index 0f7fba3dc4006..dd9146225fd8a 100644 --- a/js/downloadbutton/CHANGELOG.md +++ b/js/downloadbutton/CHANGELOG.md @@ -1,5 +1,13 @@ # @gradio/downloadbutton +## 0.1.23 + +### Dependency updates + +- @gradio/utils@0.5.1 +- @gradio/client@1.3.0 +- @gradio/button@0.2.46 + ## 0.1.22 ### Dependency updates diff --git a/js/downloadbutton/package.json b/js/downloadbutton/package.json index d3a1ad1a13d7a..64f8ec5d55e07 100644 --- a/js/downloadbutton/package.json +++ b/js/downloadbutton/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/downloadbutton", - "version": "0.1.22", + "version": "0.1.23", "description": "Gradio UI packages", "type": "module", "author": "", diff --git a/js/dropdown/CHANGELOG.md b/js/dropdown/CHANGELOG.md index 7597988a6577a..77b8a99eb361d 100644 --- a/js/dropdown/CHANGELOG.md +++ b/js/dropdown/CHANGELOG.md @@ -1,5 +1,14 @@ # @gradio/dropdown +## 0.7.8 + +### Dependency updates + +- @gradio/atoms@0.7.6 +- @gradio/utils@0.5.1 +- @gradio/statustracker@0.7.1 +- @gradio/icons@0.6.0 + ## 0.7.7 ### Dependency updates diff --git a/js/dropdown/package.json b/js/dropdown/package.json index 94e3d514947b4..9ad25c0acbdf1 100644 --- a/js/dropdown/package.json +++ b/js/dropdown/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/dropdown", - "version": "0.7.7", + "version": "0.7.8", "description": "Gradio UI packages", "type": "module", "author": "", diff --git a/js/fallback/CHANGELOG.md b/js/fallback/CHANGELOG.md index 22c2f58fbc221..80650ead39426 100644 --- a/js/fallback/CHANGELOG.md +++ b/js/fallback/CHANGELOG.md @@ -1,5 +1,13 @@ # @gradio/fallback +## 0.3.8 + +### Dependency updates + +- @gradio/atoms@0.7.6 +- @gradio/utils@0.5.1 +- @gradio/statustracker@0.7.1 + ## 0.3.7 ### Dependency updates diff --git a/js/fallback/package.json b/js/fallback/package.json index 180b0eb58497d..10ca797ba132c 100644 --- a/js/fallback/package.json +++ b/js/fallback/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/fallback", - "version": "0.3.7", + "version": "0.3.8", "description": "Gradio UI packages", "type": "module", "author": "", diff --git a/js/file/CHANGELOG.md b/js/file/CHANGELOG.md index c08e8609ba847..5b95b849ed94b 100644 --- a/js/file/CHANGELOG.md +++ b/js/file/CHANGELOG.md @@ -1,5 +1,16 @@ # @gradio/file +## 0.8.5 + +### Dependency updates + +- @gradio/atoms@0.7.6 +- @gradio/utils@0.5.1 +- @gradio/statustracker@0.7.1 +- @gradio/client@1.3.0 +- @gradio/upload@0.11.5 +- @gradio/icons@0.6.0 + ## 0.8.4 ### Fixes diff --git a/js/file/package.json b/js/file/package.json index 3305e08bbacd6..9e415aafb3f7b 100644 --- a/js/file/package.json +++ b/js/file/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/file", - "version": "0.8.4", + "version": "0.8.5", "description": "Gradio UI packages", "type": "module", "author": "", diff --git a/js/fileexplorer/CHANGELOG.md b/js/fileexplorer/CHANGELOG.md index 42eaaa72f1074..94bb50d4f3735 100644 --- a/js/fileexplorer/CHANGELOG.md +++ b/js/fileexplorer/CHANGELOG.md @@ -1,5 +1,18 @@ # @gradio/fileexplorer +## 0.4.14 + +### Dependency updates + +- @gradio/atoms@0.7.6 +- @gradio/utils@0.5.1 +- @gradio/statustracker@0.7.1 +- @gradio/client@1.3.0 +- @gradio/upload@0.11.5 +- @gradio/icons@0.6.0 +- @gradio/file@0.8.5 +- @gradio/checkbox@0.3.8 + ## 0.4.13 ### Dependency updates diff --git a/js/fileexplorer/package.json b/js/fileexplorer/package.json index 56a0705381701..a956253ebc15c 100644 --- a/js/fileexplorer/package.json +++ b/js/fileexplorer/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/fileexplorer", - "version": "0.4.13", + "version": "0.4.14", "description": "Gradio UI packages", "type": "module", "author": "", diff --git a/js/form/CHANGELOG.md b/js/form/CHANGELOG.md index 01a6220f65d3e..8675ec3939a88 100644 --- a/js/form/CHANGELOG.md +++ b/js/form/CHANGELOG.md @@ -1,5 +1,13 @@ # @gradio/form +## 0.1.20 + +### Dependency updates + +- @gradio/atoms@0.7.6 +- @gradio/utils@0.5.1 +- @gradio/icons@0.6.0 + ## 0.1.19 ### Dependency updates diff --git a/js/form/package.json b/js/form/package.json index 48bede3bc94b2..dddc49eb6b260 100644 --- a/js/form/package.json +++ b/js/form/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/form", - "version": "0.1.19", + "version": "0.1.20", "description": "Gradio UI packages", "type": "module", "author": "", diff --git a/js/gallery/CHANGELOG.md b/js/gallery/CHANGELOG.md index 171f0b81f2aa4..f8320b8bd16c4 100644 --- a/js/gallery/CHANGELOG.md +++ b/js/gallery/CHANGELOG.md @@ -1,5 +1,18 @@ # @gradio/gallery +## 0.11.2 + +### Dependency updates + +- @gradio/atoms@0.7.6 +- @gradio/utils@0.5.1 +- @gradio/statustracker@0.7.1 +- @gradio/client@1.3.0 +- @gradio/upload@0.11.5 +- @gradio/image@0.12.2 +- @gradio/icons@0.6.0 +- @gradio/file@0.8.5 + ## 0.11.1 ### Dependency updates diff --git a/js/gallery/package.json b/js/gallery/package.json index 2eaad24c5af50..b226a334eab86 100644 --- a/js/gallery/package.json +++ b/js/gallery/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/gallery", - "version": "0.11.1", + "version": "0.11.2", "description": "Gradio UI packages", "type": "module", "author": "", diff --git a/js/highlightedtext/CHANGELOG.md b/js/highlightedtext/CHANGELOG.md index 07d730063f5fa..611f93cedde4a 100644 --- a/js/highlightedtext/CHANGELOG.md +++ b/js/highlightedtext/CHANGELOG.md @@ -1,5 +1,14 @@ # @gradio/highlightedtext +## 0.7.2 + +### Dependency updates + +- @gradio/atoms@0.7.6 +- @gradio/utils@0.5.1 +- @gradio/statustracker@0.7.1 +- @gradio/icons@0.6.0 + ## 0.7.1 ### Dependency updates diff --git a/js/highlightedtext/package.json b/js/highlightedtext/package.json index a4f4084ba8303..5c99cdead3393 100644 --- a/js/highlightedtext/package.json +++ b/js/highlightedtext/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/highlightedtext", - "version": "0.7.1", + "version": "0.7.2", "description": "Gradio UI packages", "type": "module", "author": "", diff --git a/js/html/CHANGELOG.md b/js/html/CHANGELOG.md index 280cee8339ee2..315e1e24f9346 100644 --- a/js/html/CHANGELOG.md +++ b/js/html/CHANGELOG.md @@ -1,5 +1,13 @@ # @gradio/html +## 0.3.1 + +### Dependency updates + +- @gradio/atoms@0.7.6 +- @gradio/utils@0.5.1 +- @gradio/statustracker@0.7.1 + ## 0.3.0 ### Features diff --git a/js/html/package.json b/js/html/package.json index c58a8f3a3cf57..bc0885463450c 100644 --- a/js/html/package.json +++ b/js/html/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/html", - "version": "0.3.0", + "version": "0.3.1", "description": "Gradio UI packages", "type": "module", "author": "", diff --git a/js/icons/CHANGELOG.md b/js/icons/CHANGELOG.md index 52512e2de7afc..df5ebe21650d3 100644 --- a/js/icons/CHANGELOG.md +++ b/js/icons/CHANGELOG.md @@ -1,5 +1,11 @@ # @gradio/icons +## 0.6.0 + +### Features + +- [#8713](https://github.com/gradio-app/gradio/pull/8713) [`e3c7079`](https://github.com/gradio-app/gradio/commit/e3c7079e380880d5759d98d180eaf688122f1c69) - Time range component. Thanks @aliabid94! + ## 0.5.0 ### Features diff --git a/js/icons/package.json b/js/icons/package.json index 370330ccd3396..db0168ccda51c 100644 --- a/js/icons/package.json +++ b/js/icons/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/icons", - "version": "0.5.0", + "version": "0.6.0", "description": "Gradio UI packages", "type": "module", "main": "src/index.ts", diff --git a/js/image/CHANGELOG.md b/js/image/CHANGELOG.md index 1b5f8614dbdc7..f6f1b5a6b7c18 100644 --- a/js/image/CHANGELOG.md +++ b/js/image/CHANGELOG.md @@ -1,5 +1,20 @@ # @gradio/image +## 0.12.2 + +### Fixes + +- [#8737](https://github.com/gradio-app/gradio/pull/8737) [`31a876d`](https://github.com/gradio-app/gradio/commit/31a876d0274d7b74a90d30148f3e9c098f486242) - Fix `Share to community` button for images. Thanks @hannahblair! + +### Dependency updates + +- @gradio/atoms@0.7.6 +- @gradio/utils@0.5.1 +- @gradio/statustracker@0.7.1 +- @gradio/client@1.3.0 +- @gradio/upload@0.11.5 +- @gradio/icons@0.6.0 + ## 0.12.1 ### Dependency updates diff --git a/js/image/package.json b/js/image/package.json index 8ba344eafb557..06776ccf40d42 100644 --- a/js/image/package.json +++ b/js/image/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/image", - "version": "0.12.1", + "version": "0.12.2", "description": "Gradio UI packages", "type": "module", "author": "", diff --git a/js/imageeditor/CHANGELOG.md b/js/imageeditor/CHANGELOG.md index edfea7bc42a60..f1a9655161569 100644 --- a/js/imageeditor/CHANGELOG.md +++ b/js/imageeditor/CHANGELOG.md @@ -1,5 +1,17 @@ # @gradio/imageeditor +## 0.7.13 + +### Dependency updates + +- @gradio/atoms@0.7.6 +- @gradio/utils@0.5.1 +- @gradio/statustracker@0.7.1 +- @gradio/client@1.3.0 +- @gradio/upload@0.11.5 +- @gradio/image@0.12.2 +- @gradio/icons@0.6.0 + ## 0.7.12 ### Dependency updates diff --git a/js/imageeditor/package.json b/js/imageeditor/package.json index 071acd6d10008..2295d649b2451 100644 --- a/js/imageeditor/package.json +++ b/js/imageeditor/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/imageeditor", - "version": "0.7.12", + "version": "0.7.13", "description": "Gradio UI packages", "type": "module", "author": "", diff --git a/js/json/CHANGELOG.md b/js/json/CHANGELOG.md index a36531cd9c8f4..424b933d65dcc 100644 --- a/js/json/CHANGELOG.md +++ b/js/json/CHANGELOG.md @@ -1,5 +1,14 @@ # @gradio/json +## 0.2.8 + +### Dependency updates + +- @gradio/atoms@0.7.6 +- @gradio/utils@0.5.1 +- @gradio/statustracker@0.7.1 +- @gradio/icons@0.6.0 + ## 0.2.7 ### Dependency updates diff --git a/js/json/package.json b/js/json/package.json index 88587e7bf8200..50d50ca21c4e6 100644 --- a/js/json/package.json +++ b/js/json/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/json", - "version": "0.2.7", + "version": "0.2.8", "description": "Gradio UI packages", "type": "module", "author": "", diff --git a/js/label/CHANGELOG.md b/js/label/CHANGELOG.md index a409c05a98150..1119944659b41 100644 --- a/js/label/CHANGELOG.md +++ b/js/label/CHANGELOG.md @@ -1,5 +1,14 @@ # @gradio/label +## 0.3.8 + +### Dependency updates + +- @gradio/atoms@0.7.6 +- @gradio/utils@0.5.1 +- @gradio/statustracker@0.7.1 +- @gradio/icons@0.6.0 + ## 0.3.7 ### Dependency updates diff --git a/js/label/package.json b/js/label/package.json index 7f107b428433c..1778e8c7f3674 100644 --- a/js/label/package.json +++ b/js/label/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/label", - "version": "0.3.7", + "version": "0.3.8", "description": "Gradio UI packages", "type": "module", "author": "", diff --git a/js/lite/CHANGELOG.md b/js/lite/CHANGELOG.md index 6341cbe93407c..0fe5e175bc654 100644 --- a/js/lite/CHANGELOG.md +++ b/js/lite/CHANGELOG.md @@ -1,5 +1,11 @@ # @gradio/lite +## 4.38.0 + +### Dependency updates + +- gradio@4.38.0 + ## 4.37.2 ### Dependency updates diff --git a/js/lite/package.json b/js/lite/package.json index d324363612078..571f74d86c44b 100644 --- a/js/lite/package.json +++ b/js/lite/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/lite", - "version": "4.37.2", + "version": "4.38.0", "description": "Serverless Gradio", "type": "module", "main": "dist/lite.js", diff --git a/js/markdown/CHANGELOG.md b/js/markdown/CHANGELOG.md index 60ba212a9dd24..3e6922421e8d2 100644 --- a/js/markdown/CHANGELOG.md +++ b/js/markdown/CHANGELOG.md @@ -1,5 +1,17 @@ # @gradio/markdown +## 0.8.1 + +### Fixes + +- [#8658](https://github.com/gradio-app/gradio/pull/8658) [`0482453`](https://github.com/gradio-app/gradio/commit/0482453fd5815446c8efa21bfbba0b00d6e4113d) - Chatbot LaTeX Crash Fix. Thanks @dawoodkhan82! + +### Dependency updates + +- @gradio/atoms@0.7.6 +- @gradio/utils@0.5.1 +- @gradio/statustracker@0.7.1 + ## 0.8.0 ### Features diff --git a/js/markdown/package.json b/js/markdown/package.json index 57bcfa7cff745..d88fc293b9cbc 100644 --- a/js/markdown/package.json +++ b/js/markdown/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/markdown", - "version": "0.8.0", + "version": "0.8.1", "description": "Gradio UI packages", "type": "module", "author": "", diff --git a/js/model3D/CHANGELOG.md b/js/model3D/CHANGELOG.md index 76b84756adc53..4ec5c1d73cf35 100644 --- a/js/model3D/CHANGELOG.md +++ b/js/model3D/CHANGELOG.md @@ -1,5 +1,20 @@ # @gradio/model3d +## 0.11.0 + +### Features + +- [#8687](https://github.com/gradio-app/gradio/pull/8687) [`bc1d45d`](https://github.com/gradio-app/gradio/commit/bc1d45d8745a677bbe2a32f8d7553fe0d4ef3fd7) - Model3D point cloud and wireframe display modes. Thanks @dawoodkhan82! + +### Dependency updates + +- @gradio/atoms@0.7.6 +- @gradio/utils@0.5.1 +- @gradio/statustracker@0.7.1 +- @gradio/client@1.3.0 +- @gradio/upload@0.11.5 +- @gradio/icons@0.6.0 + ## 0.10.12 ### Dependency updates diff --git a/js/model3D/package.json b/js/model3D/package.json index 7e4cb347d45fc..1f67a59a7f6cd 100644 --- a/js/model3D/package.json +++ b/js/model3D/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/model3d", - "version": "0.10.12", + "version": "0.11.0", "description": "Gradio UI packages", "type": "module", "author": "", diff --git a/js/multimodaltextbox/CHANGELOG.md b/js/multimodaltextbox/CHANGELOG.md index 7ed3da4861ed2..2e4ea708f8ffa 100644 --- a/js/multimodaltextbox/CHANGELOG.md +++ b/js/multimodaltextbox/CHANGELOG.md @@ -1,5 +1,17 @@ # @gradio/multimodaltextbox +## 0.5.2 + +### Dependency updates + +- @gradio/atoms@0.7.6 +- @gradio/utils@0.5.1 +- @gradio/statustracker@0.7.1 +- @gradio/client@1.3.0 +- @gradio/upload@0.11.5 +- @gradio/image@0.12.2 +- @gradio/icons@0.6.0 + ## 0.5.1 ### Fixes diff --git a/js/multimodaltextbox/package.json b/js/multimodaltextbox/package.json index 8c760bc064209..481998ebe571b 100644 --- a/js/multimodaltextbox/package.json +++ b/js/multimodaltextbox/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/multimodaltextbox", - "version": "0.5.1", + "version": "0.5.2", "description": "Gradio UI packages", "type": "module", "author": "", diff --git a/js/number/CHANGELOG.md b/js/number/CHANGELOG.md index e1705bc8a51f6..a79aaf71b959e 100644 --- a/js/number/CHANGELOG.md +++ b/js/number/CHANGELOG.md @@ -1,5 +1,13 @@ # @gradio/number +## 0.4.8 + +### Dependency updates + +- @gradio/atoms@0.7.6 +- @gradio/utils@0.5.1 +- @gradio/statustracker@0.7.1 + ## 0.4.7 ### Dependency updates diff --git a/js/number/package.json b/js/number/package.json index 72f2793a0ac85..1c9d1dcd6e0b6 100644 --- a/js/number/package.json +++ b/js/number/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/number", - "version": "0.4.7", + "version": "0.4.8", "description": "Gradio UI packages", "type": "module", "author": "", diff --git a/js/paramviewer/CHANGELOG.md b/js/paramviewer/CHANGELOG.md index d6f0e66ce816b..a38abd15ed8cf 100644 --- a/js/paramviewer/CHANGELOG.md +++ b/js/paramviewer/CHANGELOG.md @@ -1,5 +1,17 @@ # @gradio/paramviewer +## 0.4.17 + +### Features + +- [#8744](https://github.com/gradio-app/gradio/pull/8744) [`b736c8d`](https://github.com/gradio-app/gradio/commit/b736c8db343087a4854f659b92732c8859fa999a) - Refactor `gr.ParamViewer` to use HTML `
` and other tweaks. Thanks @abidlabs! + +### Dependency updates + +- @gradio/atoms@0.7.6 +- @gradio/utils@0.5.1 +- @gradio/statustracker@0.7.1 + ## 0.4.16 ### Dependency updates diff --git a/js/paramviewer/package.json b/js/paramviewer/package.json index 7edc05c8459a3..ece9f0712e2ae 100644 --- a/js/paramviewer/package.json +++ b/js/paramviewer/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/paramviewer", - "version": "0.4.16", + "version": "0.4.17", "description": "Gradio UI packages", "type": "module", "author": "", diff --git a/js/plot/CHANGELOG.md b/js/plot/CHANGELOG.md index 6c4cfca76fa2b..178926e167e88 100644 --- a/js/plot/CHANGELOG.md +++ b/js/plot/CHANGELOG.md @@ -1,5 +1,18 @@ # @gradio/plot +## 0.6.0 + +### Features + +- [#8713](https://github.com/gradio-app/gradio/pull/8713) [`e3c7079`](https://github.com/gradio-app/gradio/commit/e3c7079e380880d5759d98d180eaf688122f1c69) - Time range component. Thanks @aliabid94! + +### Dependency updates + +- @gradio/atoms@0.7.6 +- @gradio/utils@0.5.1 +- @gradio/statustracker@0.7.1 +- @gradio/icons@0.6.0 + ## 0.5.0 ### Features diff --git a/js/plot/package.json b/js/plot/package.json index f02cff045d96a..5d2802b7dc2cc 100644 --- a/js/plot/package.json +++ b/js/plot/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/plot", - "version": "0.5.0", + "version": "0.6.0", "description": "Gradio UI packages", "type": "module", "author": "", diff --git a/js/preview/CHANGELOG.md b/js/preview/CHANGELOG.md index cf78344b055ae..ec7f429eddb57 100644 --- a/js/preview/CHANGELOG.md +++ b/js/preview/CHANGELOG.md @@ -1,5 +1,11 @@ # @gradio/preview +## 0.10.1 + +### Fixes + +- [#8761](https://github.com/gradio-app/gradio/pull/8761) [`078663a`](https://github.com/gradio-app/gradio/commit/078663a3a4f9c19e86e415295e82be7103260f97) - Fix issue with virtual module in custom components. Thanks @pngwn! + ## 0.10.0 ### Features diff --git a/js/preview/package.json b/js/preview/package.json index ffe1630c8b186..7add39ebe2d8f 100644 --- a/js/preview/package.json +++ b/js/preview/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/preview", - "version": "0.10.0", + "version": "0.10.1", "description": "Gradio UI packages", "type": "module", "main": "dist/index.js", diff --git a/js/radio/CHANGELOG.md b/js/radio/CHANGELOG.md index fa7230585f57f..63adc176a4af2 100644 --- a/js/radio/CHANGELOG.md +++ b/js/radio/CHANGELOG.md @@ -1,5 +1,13 @@ # @gradio/radio +## 0.5.8 + +### Dependency updates + +- @gradio/atoms@0.7.6 +- @gradio/utils@0.5.1 +- @gradio/statustracker@0.7.1 + ## 0.5.7 ### Dependency updates diff --git a/js/radio/package.json b/js/radio/package.json index 4e2d058e8cc4e..e8bfe79e42149 100644 --- a/js/radio/package.json +++ b/js/radio/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/radio", - "version": "0.5.7", + "version": "0.5.8", "description": "Gradio UI packages", "type": "module", "author": "", diff --git a/js/row/CHANGELOG.md b/js/row/CHANGELOG.md index 7391a90cabd4f..539aff520e57a 100644 --- a/js/row/CHANGELOG.md +++ b/js/row/CHANGELOG.md @@ -4,6 +4,13 @@ ### Dependency updates +- @gradio/utils@0.5.1 +- @gradio/statustracker@0.7.1 + +## 0.1.3 + +### Dependency updates + - @gradio/utils@0.5.0 - @gradio/statustracker@0.7.0 diff --git a/js/simpledropdown/CHANGELOG.md b/js/simpledropdown/CHANGELOG.md index c2822e62a0587..5128531df1ce9 100644 --- a/js/simpledropdown/CHANGELOG.md +++ b/js/simpledropdown/CHANGELOG.md @@ -1,5 +1,14 @@ # @gradio/simpledropdown +## 0.2.8 + +### Dependency updates + +- @gradio/atoms@0.7.6 +- @gradio/utils@0.5.1 +- @gradio/statustracker@0.7.1 +- @gradio/icons@0.6.0 + ## 0.2.7 ### Dependency updates diff --git a/js/simpledropdown/package.json b/js/simpledropdown/package.json index 2a1fa5ba455d7..6abcc5be83211 100644 --- a/js/simpledropdown/package.json +++ b/js/simpledropdown/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/simpledropdown", - "version": "0.2.7", + "version": "0.2.8", "description": "Gradio UI packages", "type": "module", "author": "", diff --git a/js/simpleimage/CHANGELOG.md b/js/simpleimage/CHANGELOG.md index 5e90c3da9a465..ee97ad3c7e5ca 100644 --- a/js/simpleimage/CHANGELOG.md +++ b/js/simpleimage/CHANGELOG.md @@ -1,5 +1,16 @@ # @gradio/simpleimage +## 0.6.2 + +### Dependency updates + +- @gradio/atoms@0.7.6 +- @gradio/utils@0.5.1 +- @gradio/statustracker@0.7.1 +- @gradio/client@1.3.0 +- @gradio/upload@0.11.5 +- @gradio/icons@0.6.0 + ## 0.6.1 ### Dependency updates diff --git a/js/simpleimage/package.json b/js/simpleimage/package.json index b61c05d3ab598..f4a54f7629c30 100644 --- a/js/simpleimage/package.json +++ b/js/simpleimage/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/simpleimage", - "version": "0.6.1", + "version": "0.6.2", "description": "Gradio UI packages", "type": "module", "author": "", diff --git a/js/simpletextbox/CHANGELOG.md b/js/simpletextbox/CHANGELOG.md index 418bc7681556e..6a6f4e72b14f0 100644 --- a/js/simpletextbox/CHANGELOG.md +++ b/js/simpletextbox/CHANGELOG.md @@ -1,5 +1,14 @@ # @gradio/simpletextbox +## 0.2.8 + +### Dependency updates + +- @gradio/atoms@0.7.6 +- @gradio/utils@0.5.1 +- @gradio/statustracker@0.7.1 +- @gradio/icons@0.6.0 + ## 0.2.7 ### Dependency updates diff --git a/js/simpletextbox/package.json b/js/simpletextbox/package.json index 781acd080b000..4a774fafa7cef 100644 --- a/js/simpletextbox/package.json +++ b/js/simpletextbox/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/simpletextbox", - "version": "0.2.7", + "version": "0.2.8", "description": "Gradio UI packages", "type": "module", "author": "", diff --git a/js/slider/CHANGELOG.md b/js/slider/CHANGELOG.md index 9ce6d3eeb1d4d..99cd78bd550a5 100644 --- a/js/slider/CHANGELOG.md +++ b/js/slider/CHANGELOG.md @@ -1,5 +1,13 @@ # @gradio/slider +## 0.4.8 + +### Dependency updates + +- @gradio/atoms@0.7.6 +- @gradio/utils@0.5.1 +- @gradio/statustracker@0.7.1 + ## 0.4.7 ### Dependency updates diff --git a/js/slider/package.json b/js/slider/package.json index 4d6317a78a27b..4582f13cff4c1 100644 --- a/js/slider/package.json +++ b/js/slider/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/slider", - "version": "0.4.7", + "version": "0.4.8", "description": "Gradio UI packages", "type": "module", "author": "", diff --git a/js/statustracker/CHANGELOG.md b/js/statustracker/CHANGELOG.md index 296037377ce6e..17f365719f6fc 100644 --- a/js/statustracker/CHANGELOG.md +++ b/js/statustracker/CHANGELOG.md @@ -1,5 +1,17 @@ # @gradio/statustracker +## 0.7.1 + +### Fixes + +- [#8748](https://github.com/gradio-app/gradio/pull/8748) [`a9307c6`](https://github.com/gradio-app/gradio/commit/a9307c64525c5b323e56ea6f7475faa7c3dad4a4) - Chatbot generating scroll and click fix. Thanks @freddyaboulton! + +### Dependency updates + +- @gradio/atoms@0.7.6 +- @gradio/utils@0.5.1 +- @gradio/icons@0.6.0 + ## 0.7.0 ### Features diff --git a/js/statustracker/package.json b/js/statustracker/package.json index 1f5830a24da02..972fb4c981646 100644 --- a/js/statustracker/package.json +++ b/js/statustracker/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/statustracker", - "version": "0.7.0", + "version": "0.7.1", "description": "Gradio UI packages", "type": "module", "main": "./index.ts", diff --git a/js/tabitem/CHANGELOG.md b/js/tabitem/CHANGELOG.md index bff8b3856d584..0645a1ca11f0a 100644 --- a/js/tabitem/CHANGELOG.md +++ b/js/tabitem/CHANGELOG.md @@ -1,5 +1,13 @@ # @gradio/tabitem +## 0.2.12 + +### Dependency updates + +- @gradio/utils@0.5.1 +- @gradio/column@0.1.2 +- @gradio/tabs@0.2.11 + ## 0.2.11 ### Dependency updates diff --git a/js/tabitem/package.json b/js/tabitem/package.json index f0e6371e4529e..6b3bbb115f417 100644 --- a/js/tabitem/package.json +++ b/js/tabitem/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/tabitem", - "version": "0.2.11", + "version": "0.2.12", "description": "Gradio UI packages", "type": "module", "author": "", diff --git a/js/tabs/CHANGELOG.md b/js/tabs/CHANGELOG.md index 89f5b3f9af314..105396d359b5c 100644 --- a/js/tabs/CHANGELOG.md +++ b/js/tabs/CHANGELOG.md @@ -1,5 +1,11 @@ # @gradio/tabs +## 0.2.11 + +### Dependency updates + +- @gradio/utils@0.5.1 + ## 0.2.10 ### Dependency updates diff --git a/js/tabs/package.json b/js/tabs/package.json index a2bf1c6ca9c55..26813966ac1dd 100644 --- a/js/tabs/package.json +++ b/js/tabs/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/tabs", - "version": "0.2.10", + "version": "0.2.11", "description": "Gradio UI packages", "type": "module", "author": "", diff --git a/js/textbox/CHANGELOG.md b/js/textbox/CHANGELOG.md index a2a0ec57a4923..b25e68ec38892 100644 --- a/js/textbox/CHANGELOG.md +++ b/js/textbox/CHANGELOG.md @@ -1,5 +1,14 @@ # @gradio/textbox +## 0.6.7 + +### Dependency updates + +- @gradio/atoms@0.7.6 +- @gradio/utils@0.5.1 +- @gradio/statustracker@0.7.1 +- @gradio/icons@0.6.0 + ## 0.6.6 ### Dependency updates diff --git a/js/textbox/package.json b/js/textbox/package.json index 1ab2d6ef86193..774ef8a02be1d 100644 --- a/js/textbox/package.json +++ b/js/textbox/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/textbox", - "version": "0.6.6", + "version": "0.6.7", "description": "Gradio UI packages", "type": "module", "author": "", diff --git a/js/timer/CHANGELOG.md b/js/timer/CHANGELOG.md index fb524051f0154..3652691959f44 100644 --- a/js/timer/CHANGELOG.md +++ b/js/timer/CHANGELOG.md @@ -1 +1,11 @@ # @gradio/timer + +## 0.3.0 + +### Fixes + +- [#8505](https://github.com/gradio-app/gradio/pull/8505) [`2943d6d`](https://github.com/gradio-app/gradio/commit/2943d6d68847314885dc6c5c0247083116017ca0) - Add Timer component. Thanks @aliabid94! + +### Dependency updates + +- @gradio/utils@0.5.1 \ No newline at end of file diff --git a/js/timer/package.json b/js/timer/package.json index 1834130c6b367..ffcdaf33b5130 100644 --- a/js/timer/package.json +++ b/js/timer/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/timer", - "version": "0.2.6", + "version": "0.3.0", "description": "Gradio UI packages", "type": "module", "author": "", diff --git a/js/tootils/CHANGELOG.md b/js/tootils/CHANGELOG.md index fd20f3c30df97..8a3769b2527cb 100644 --- a/js/tootils/CHANGELOG.md +++ b/js/tootils/CHANGELOG.md @@ -1,5 +1,105 @@ # @gradio/tootils +## 0.6.0 + +### Highlights + +#### Support message format in chatbot 💬 ([#8422](https://github.com/gradio-app/gradio/pull/8422) [`4221290`](https://github.com/gradio-app/gradio/commit/4221290d847041024b1faa3df5585bba0775b8b3)) + +`gr.Chatbot` and `gr.ChatInterface` now support the [Messages API](https://huggingface.co/docs/text-generation-inference/en/messages_api#messages-api), which is fully compatible with LLM API providers such as Hugging Face Text Generation Inference, OpenAI's chat completions API, and Llama.cpp server. + +Building Gradio applications around these LLM solutions is now even easier! + +`gr.Chatbot` and `gr.ChatInterface` now have a `type` parameter that can accept two values - `'tuples'` and `'messages'`. If set to `'tuples'`, the default chatbot data format is expected. If set to `'messages'`, a list of dictionaries with `content` and `role` keys is expected. See below - + +```python +def chat_greeter(msg, history): + history.append({"role": "assistant", "content": "Hello!"}) + return history +``` + +Additionally, gradio now exposes a `gr.ChatMessage` dataclass you can use for IDE type hints and auto completion. + +image + + +#### Tool use in Chatbot 🛠️ + +The Gradio Chatbot can now natively display tool usage and intermediate thoughts common in Agent and chain-of-thought workflows! + +If you are using the new "messages" format, simply add a `metadata` key with a dictionary containing a `title` key and `value`. This will display the assistant message in an expandable message box to show the result of a tool or intermediate step. + +```python +import gradio as gr +from gradio import ChatMessage +import time + +def generate_response(history): + history.append(ChatMessage(role="user", content="What is the weather in San Francisco right now?")) + yield history + time.sleep(0.25) + history.append(ChatMessage(role="assistant", + content="In order to find the current weather in San Francisco, I will need to use my weather tool.") + ) + yield history + time.sleep(0.25) + + history.append(ChatMessage(role="assistant", + content="API Error when connecting to weather service.", + metadata={"title": "💥 Error using tool 'Weather'"}) + ) + yield history + time.sleep(0.25) + + history.append(ChatMessage(role="assistant", + content="I will try again", + )) + yield history + time.sleep(0.25) + + history.append(ChatMessage(role="assistant", + content="Weather 72 degrees Fahrenheit with 20% chance of rain.", + metadata={"title": "🛠️ Used tool 'Weather'"} + )) + yield history + time.sleep(0.25) + + history.append(ChatMessage(role="assistant", + content="Now that the API succeeded I can complete my task.", + )) + yield history + time.sleep(0.25) + + history.append(ChatMessage(role="assistant", + content="It's a sunny day in San Francisco with a current temperature of 72 degrees Fahrenheit and a 20% chance of rain. Enjoy the weather!", + )) + yield history + + +with gr.Blocks() as demo: + chatbot = gr.Chatbot(type="messages") + button = gr.Button("Get San Francisco Weather") + button.click(generate_response, chatbot, chatbot) + +if __name__ == "__main__": + demo.launch() +``` + + + +![tool-box-demo](https://github.com/freddyaboulton/freddyboulton/assets/41651716/cf73ecc9-90ac-42ce-bca5-768e0cc00a48) + + Thanks @freddyaboulton! + +### Features + +- [#8222](https://github.com/gradio-app/gradio/pull/8222) [`3a6142f`](https://github.com/gradio-app/gradio/commit/3a6142fa4829aa6d65d7b8388fbba49cc8db8ab1) - Lite load perf ci. Thanks @whitphx! + +### Dependency updates + +- @gradio/utils@0.5.1 +- @gradio/statustracker@0.7.1 + ## 0.5.1 ### Dependency updates diff --git a/js/tootils/package.json b/js/tootils/package.json index a64bd10e1f9d6..597907078f839 100644 --- a/js/tootils/package.json +++ b/js/tootils/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/tootils", - "version": "0.5.1", + "version": "0.6.0", "description": "Internal test utilities", "type": "module", "main": "src/index.ts", diff --git a/js/upload/CHANGELOG.md b/js/upload/CHANGELOG.md index d57dde7abbd6b..511147e764acb 100644 --- a/js/upload/CHANGELOG.md +++ b/js/upload/CHANGELOG.md @@ -1,5 +1,18 @@ # @gradio/upload +## 0.11.5 + +### Fixes + +- [#8714](https://github.com/gradio-app/gradio/pull/8714) [`1b5b5b0`](https://github.com/gradio-app/gradio/commit/1b5b5b0b43e69ee84f3baad2aae59ffc9c4d995a) - Bind `fetch` and `stream` in JS client. Thanks @hannahblair! + +### Dependency updates + +- @gradio/atoms@0.7.6 +- @gradio/utils@0.5.1 +- @gradio/client@1.3.0 +- @gradio/icons@0.6.0 + ## 0.11.4 ### Fixes diff --git a/js/upload/package.json b/js/upload/package.json index b2d7a413984d6..835825698af10 100644 --- a/js/upload/package.json +++ b/js/upload/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/upload", - "version": "0.11.4", + "version": "0.11.5", "description": "Gradio UI packages", "type": "module", "main": "src/index.ts", diff --git a/js/uploadbutton/CHANGELOG.md b/js/uploadbutton/CHANGELOG.md index ba42b7d77edb9..d9bdadbf8b096 100644 --- a/js/uploadbutton/CHANGELOG.md +++ b/js/uploadbutton/CHANGELOG.md @@ -1,5 +1,14 @@ # @gradio/uploadbutton +## 0.6.14 + +### Dependency updates + +- @gradio/utils@0.5.1 +- @gradio/client@1.3.0 +- @gradio/upload@0.11.5 +- @gradio/button@0.2.46 + ## 0.6.13 ### Dependency updates diff --git a/js/uploadbutton/package.json b/js/uploadbutton/package.json index ab3b3af6cd2bb..1d6287fae4c53 100644 --- a/js/uploadbutton/package.json +++ b/js/uploadbutton/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/uploadbutton", - "version": "0.6.13", + "version": "0.6.14", "description": "Gradio UI packages", "type": "module", "author": "", diff --git a/js/utils/CHANGELOG.md b/js/utils/CHANGELOG.md index 955613885b536..4f9759d97f6de 100644 --- a/js/utils/CHANGELOG.md +++ b/js/utils/CHANGELOG.md @@ -1,5 +1,11 @@ # @gradio/utils +## 0.5.1 + +### Fixes + +- [#8737](https://github.com/gradio-app/gradio/pull/8737) [`31a876d`](https://github.com/gradio-app/gradio/commit/31a876d0274d7b74a90d30148f3e9c098f486242) - Fix `Share to community` button for images. Thanks @hannahblair! + ## 0.5.0 ### Features diff --git a/js/utils/package.json b/js/utils/package.json index c5df47bc74b89..589b2dc33ce6e 100644 --- a/js/utils/package.json +++ b/js/utils/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/utils", - "version": "0.5.0", + "version": "0.5.1", "description": "Gradio UI packages", "type": "module", "main": "src/index.ts", diff --git a/js/video/CHANGELOG.md b/js/video/CHANGELOG.md index babdfa161a31b..548baf57bdd8f 100644 --- a/js/video/CHANGELOG.md +++ b/js/video/CHANGELOG.md @@ -1,5 +1,17 @@ # @gradio/video +## 0.9.2 + +### Dependency updates + +- @gradio/atoms@0.7.6 +- @gradio/utils@0.5.1 +- @gradio/statustracker@0.7.1 +- @gradio/client@1.3.0 +- @gradio/upload@0.11.5 +- @gradio/image@0.12.2 +- @gradio/icons@0.6.0 + ## 0.9.1 ### Dependency updates diff --git a/js/video/package.json b/js/video/package.json index 46e745aba8cf4..95a44af504c92 100644 --- a/js/video/package.json +++ b/js/video/package.json @@ -1,6 +1,6 @@ { "name": "@gradio/video", - "version": "0.9.1", + "version": "0.9.2", "description": "Gradio UI packages", "type": "module", "author": "", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1c919d34a9a50..e1cde3f6c32e8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -483,7 +483,7 @@ importers: specifier: workspace:^ version: link:../statustracker '@gradio/utils': - specifier: workspace:0.5.0 + specifier: workspace:0.5.1 version: link:../utils devDependencies: '@gradio/preview': @@ -1688,25 +1688,6 @@ importers: specifier: ^3.28.0 version: 3.28.0 - js/preview/test/mycomponent/frontend: - dependencies: - '@gradio/atoms': - specifier: workspace:^ - version: link:../../../../atoms - '@gradio/icons': - specifier: workspace:^ - version: link:../../../../icons - '@gradio/statustracker': - specifier: workspace:^ - version: link:../../../../statustracker - '@gradio/utils': - specifier: workspace:^ - version: link:../../../../utils - devDependencies: - '@gradio/preview': - specifier: workspace:^ - version: link:../../.. - js/preview/test/test/frontend: {} js/radio: diff --git a/requirements.txt b/requirements.txt index 733869d8ae4ee..65d1b87c7d716 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ aiofiles>=22.0,<24.0 altair>=5.0,<6.0 fastapi ffmpy -gradio_client==1.0.2 +gradio_client==1.1.0 httpx>=0.24.1 huggingface_hub>=0.19.3 importlib_resources>=1.3,<7.0