UNPKG

@hashbrownai/azure

Version:
63 lines (43 loc) 1.88 kB
<h1 align="center">Hashbrown - Build Generative User Interfaces</h1> <p align="center"> <img src="https://hashbrown.dev/image/logo/brand-mark.svg" alt="Hashbrown Logo" width="144px" height="136px"/> <br> <em>Hashbrown is an open-source framework for building user interfaces <br />that converse with users, dynamically reorganize, and even code themselves.</em> <br> </p> <p align="center"> <a href="https://hashbrown.dev/"><strong>hashbrown.dev</strong></a> <br> </p> ## Getting Started ```sh npm install @hashbrownai/azure --save ``` Deploy an express server with a single /chat endpoint to use Hashbrown with Azure OpenAI. ```ts import { Chat } from '@hashbrownai/core'; import { HashbrownAzure } from '@hashbrownai/azure'; app.post('/chat', async (req, res) => { const request = req.body as Chat.CompletionCreateParams; const stream = HashbrownAzure.stream.text({ apiKey: AZURE_API_KEY, endpoint: AZURE_ENDPOINT, request, }); res.header('Content-Type', 'application/octet-stream'); for await (const chunk of stream) { res.write(chunk); } res.end(); }); ``` ## Docs [Read the docs for the Hashbrown Azure OpenAI adapter](https://hashbrown.dev/docs/react/platform/azure). ## Contributing hashbrown is a community-driven project. Read our [contributing guidelines](https://github.com/liveloveapp/hashbrown?tab=contributing-ov-file) on how to get involved. ## Workshops and Consulting Want to learn how to build web apps with AI? [Learn more about our workshops](https://hashbrown.dev/workshops). LiveLoveApp provides hands-on engagement with our AI engineers for architecture reviews, custom integrations, proof-of-concept builds, performance tuning, and expert guidance on best practices. [Learn more about LiveLoveApp](https://liveloveapp.com). ## License MIT © [LiveLoveApp, LLC](https://liveloveapp.com)