Skip to content

Commit e56ccb9

Browse files
doc tiny fix.
1 parent 8cff99d commit e56ccb9

File tree

4 files changed

+379
-325
lines changed

4 files changed

+379
-325
lines changed

README.md

Lines changed: 60 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ This class is responsible for managing AI session data, including models, histor
44

55
The script is designed to interact with the AI API, providing a complete structure for building user interfaces (UI) or AI-powered chatbots.
66

7-
It implements a session management system to help handle multiple different bots.
7+
It implements a session management system to help handle multiple different bots, allowing you to manage various aspects of interactions such as system instructions, file handling, tokens, and more.
8+
9+
---
810

911
## Limitations
1012

@@ -20,6 +22,8 @@ Developers must implement their own logic to monitor and manage token usage if n
2022

2123
## 📦 Installation
2224

25+
To install the package, use the following command:
26+
2327
```bash
2428
npm install tiny-ai-api
2529
```
@@ -28,7 +32,7 @@ npm install tiny-ai-api
2832

2933
## 🔧 Usage Example
3034

31-
The two methods will work identically.
35+
You can interact with the AI using two methods, both of which are valid.
3236

3337
```js
3438
import { TinyAiInstance, setTinyGoogleAi } from 'tiny-ai-api';
@@ -37,6 +41,8 @@ const ai = new TinyAiInstance();
3741
setTinyGoogleAi(ai, 'GEMINI_API_KEY', 'gemini-2.0-flash');
3842
```
3943

44+
Alternatively, you can use the following shorthand method:
45+
4046
```js
4147
import { TinyGoogleAi } from 'tiny-ai-api';
4248

@@ -47,6 +53,8 @@ const ai = TinyGoogleAi('GEMINI_API_KEY', 'gemini-2.0-flash');
4753

4854
## 📂 File Structure (After Build)
4955

56+
After building the project, the following files will be available:
57+
5058
```
5159
dist/
5260
├── index.mjs → For ESM users (`import`)
@@ -58,3 +66,53 @@ dist/
5866

5967
## 📚 API Reference
6068

69+
### [Introduction](https://github.com/JasminDreasond/TinyAiApi/blob/main/docs/introduction.md) - Getting Started
70+
71+
Learn the basics of initializing a session, setting up models, and understanding the general structure of the API.
72+
73+
### [Configs](https://github.com/JasminDreasond/TinyAiApi/blob/main/docs/configs.md) - Session Configuration
74+
75+
Learn how to configure session data, including setting up system instructions, models, and file handling.
76+
77+
### [Content](https://github.com/JasminDreasond/TinyAiApi/blob/main/docs/content.md) - Content Management
78+
79+
Understand how to manage content like prompts, dialogues, file data, and how to retrieve and modify this content.
80+
81+
### [Custom](https://github.com/JasminDreasond/TinyAiApi/blob/main/docs/custom.md) - Working with Custom Values
82+
83+
Understand how to implement custom values, including session-specific data and any user-defined parameters.
84+
85+
### [Dev](https://github.com/JasminDreasond/TinyAiApi/blob/main/docs/dev.md) - Development Tools
86+
87+
For developers looking to extend or debug the API, this section provides tools and guidelines for working with the internal workings of the library.
88+
89+
### [Models](https://github.com/JasminDreasond/TinyAiApi/blob/main/docs/models.md) - Model Configuration
90+
91+
Set up models and manage their configurations to interact with the API correctly. This includes handling different types of models and adjusting their parameters.
92+
93+
---
94+
95+
## 💡 Features
96+
97+
- **Session Management**: Keep track of multiple AI instances with full session history.
98+
- **Content Handling**: Easily manage data like user inputs, AI-generated responses, and file handling.
99+
- **Token and Hash Tracking**: Monitor token usage for each session and track hash values for specific items.
100+
- **Customizable**: Fully configurable session data and model setups for different environments.
101+
- **Error Handling**: Built-in error management to ensure robust session handling and prevent crashes.
102+
- **Event-driven**: Supports event-driven architecture to handle real-time updates and triggers.
103+
104+
---
105+
106+
## 🛠 Development Tools
107+
108+
For advanced users, you can access several development tools to help with debugging and extending the API:
109+
110+
- **Token Tracking**: Manually track token usage for specific message categories like prompt, system instruction, or file.
111+
- **Custom Session IDs**: Create and manage custom session IDs to differentiate between different AI sessions.
112+
- **File Data Management**: Set, get, and remove file data associated with specific sessions, ideal for sending or receiving large data files.
113+
114+
---
115+
116+
## 📄 License
117+
118+
This project is licensed under the AGPL-3.0 License - see the [LICENSE](./LICENSE) file for details.

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This documentation is designed to provide all the information you need to get up
2020
- [Content](https://github.com/JasminDreasond/TinyAiApi/blob/main/docs/content.md) - Manage session content, including prompts, dialogues, and files.
2121
- [Custom](https://github.com/JasminDreasond/TinyAiApi/blob/main/docs/custom.md) - Working with custom values and user-specific configurations.
2222
- [Dev](https://github.com/JasminDreasond/TinyAiApi/blob/main/docs/dev.md) - Development tools and utilities for advanced users.
23-
- [Models](https://github.com/JasminDreasond/TinyAiApi/blob/main/docs/dev.md) - Model configuration and setup.
23+
- [Models](https://github.com/JasminDreasond/TinyAiApi/blob/main/docs/models.md) - Model configuration and setup.
2424

2525
---
2626

0 commit comments

Comments
 (0)