@hashbrownai/azure
Version:
Azure provider for Hashbrown AI
63 lines (43 loc) • 1.88 kB
Markdown
<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>
```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();
});
```
[](https://hashbrown.dev/docs/react/platform/azure).
hashbrown is a community-driven project. Read our [contributing guidelines](https://github.com/liveloveapp/hashbrown?tab=contributing-ov-file) on how to get involved.
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).
MIT © [LiveLoveApp, LLC](https://liveloveapp.com)