|
2 | 2 |
|
3 | 3 | A developer-friendly Lua interface for working with various generative AI providers, abstracting away provider-specific payload structures and response parsing so that using multiple models is easy.
|
4 | 4 |
|
5 |
| -## Providers |
| 5 | +## Features |
6 | 6 |
|
7 | 7 | > ⚠️ This is a work in progress so any help is highly appreciated!
|
8 | 8 |
|
| 9 | +- Easily switch between AI chat model providers |
| 10 | +- Pass in prompts and get replies without the provider complexity |
| 11 | +- Easily integrate new models and adjust settings |
| 12 | +- Use the `chat` object for integrated message history |
| 13 | +- For more granular control use the `genai` client directly if needed |
| 14 | +- Stream output for real-time responses |
| 15 | +- Structured JSON response abstraction layer |
| 16 | +- Token usage tracking with cost calculation |
| 17 | + |
| 18 | +### Providers |
| 19 | + |
9 | 20 | - [OpenAI](https://platform.openai.com/docs/overview)
|
10 | 21 |
|
11 | 22 | - [Anthropic](https://docs.anthropic.com/en/home)
|
12 | 23 |
|
13 |
| -## Features |
| 24 | +### Roadmap |
14 | 25 |
|
15 |
| -- Easily switch between AI chat model providers |
16 |
| -- Pass in prompts and get replies without the provider complexity |
17 |
| -- Easily integrate new models and adjust settings |
18 |
| -- Use the `chat` object for integrated message handling |
19 |
| -- Use the `genai` client directly for more granular control if needed |
20 |
| -- Abstraction for structured response JSON output |
21 |
| -- Token usage tracking with cost calculation |
| 26 | +1. Advanced error handling |
| 27 | +2. Google Gemini integration |
| 28 | +3. Audio models |
| 29 | +4. Image models |
| 30 | +5. Open-Source model integration |
| 31 | +6. Video models |
22 | 32 |
|
23 | 33 | ## Installation
|
24 | 34 |
|
25 | 35 | ```
|
26 | 36 | luarocks install lua-genai
|
27 | 37 | ```
|
28 | 38 |
|
| 39 | +### Dependencies |
| 40 | + |
| 41 | +- [lua-cjson](https://github.com/openresty/lua-cjson) |
| 42 | + |
| 43 | +- [luasec](https://github.com/brunoos/luasec) |
| 44 | + |
29 | 45 | ## Usage
|
30 | 46 |
|
31 | 47 | ```lua
|
@@ -76,19 +92,4 @@ local chat = client:chat("gpt-4o-mini", { settings = { json = json_object } })
|
76 | 92 | print(chat:say("Create a powerful wizard called Torben."))
|
77 | 93 | ```
|
78 | 94 |
|
79 |
| -See `example.lua` for a full-featured Anthropic implementation. |
80 |
| - |
81 |
| -## Dependencies |
82 |
| - |
83 |
| -- [lua-cjson](https://github.com/openresty/lua-cjson) |
84 |
| - |
85 |
| -- [luasec](https://github.com/brunoos/luasec) |
86 |
| - |
87 |
| -## Roadmap |
88 |
| - |
89 |
| -1. Advanced error handling |
90 |
| -2. Google Gemini integration |
91 |
| -3. Audio models |
92 |
| -4. Image models |
93 |
| -5. Open-Source model integration |
94 |
| -6. Video models |
| 95 | +See `example.lua` for a full-featured Anthropic implementation. |
0 commit comments