@hahnpro/ai-sdk 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +55 -0
- package/fesm2022/hahnpro-ai-sdk.mjs +3470 -0
- package/fesm2022/hahnpro-ai-sdk.mjs.map +1 -0
- package/index.d.ts +6 -0
- package/lib/ai/ai.module.d.ts +9 -0
- package/lib/ai/chat-dialog/chat-dialog.component.d.ts +48 -0
- package/lib/ai/chat-dialog/icons.d.ts +1 -0
- package/lib/ai/chat-scroll.directive.d.ts +19 -0
- package/lib/ai/chat.service.d.ts +79 -0
- package/lib/ai/context-overlay/context-overlay.component.d.ts +24 -0
- package/lib/ai/context.service.d.ts +27 -0
- package/lib/ai/message-context/message-context.component.d.ts +18 -0
- package/lib/ai/message-input/message-input.component.d.ts +24 -0
- package/lib/ai/preview/preview.component.d.ts +27 -0
- package/lib/ai/providers.d.ts +6 -0
- package/lib/ai/thread/thread.component.d.ts +20 -0
- package/lib/ai/transloco.module.d.ts +1216 -0
- package/lib/ai/utils.d.ts +1 -0
- package/lib/ai/voice-recognition.service.d.ts +24 -0
- package/lib/ai/websocket.service.d.ts +19 -0
- package/lib/core/api.service.d.ts +63 -0
- package/lib/core/markdown.provider.d.ts +6 -0
- package/lib/core/owner-resolver.service.d.ts +24 -0
- package/lib/core/pipes/bytes.pipe.d.ts +7 -0
- package/lib/core/pipes/color-level.pipe.d.ts +10 -0
- package/lib/core/pipes/date-ago.pipe.d.ts +7 -0
- package/lib/core/pipes/index.d.ts +1 -0
- package/lib/core/pipes/pipes.module.d.ts +10 -0
- package/lib/core/utils/i18n.d.ts +2 -0
- package/lib/core/utils/index.d.ts +3 -0
- package/lib/core/utils/mimetype.d.ts +2 -0
- package/package.json +42 -0
package/README.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# ADAM AI SDK
|
|
2
|
+
|
|
3
|
+
## Installation
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm install @hahnpro/ai-sdk
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
In your Angular application, you can use the `provideAiSdk()` function to set up all necessary providers:
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
// main.ts
|
|
15
|
+
import { bootstrapApplication } from '@angular/platform-browser';
|
|
16
|
+
import { provideAiSdk } from '@hahnpro/ai-sdk';
|
|
17
|
+
import { AppComponent } from './app/app.component';
|
|
18
|
+
|
|
19
|
+
bootstrapApplication(AppComponent, {
|
|
20
|
+
providers: [
|
|
21
|
+
provideAiSdk(),
|
|
22
|
+
// other providers...
|
|
23
|
+
],
|
|
24
|
+
}).catch((err) => console.error(err));
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The `provideAiSdk()` function includes the following configurations:
|
|
28
|
+
|
|
29
|
+
- Transloco module for internationalization
|
|
30
|
+
- Markdown support (ngx-markdown)
|
|
31
|
+
- Logger configuration (ngx-logger)
|
|
32
|
+
|
|
33
|
+
For more granular control, you can also use the individual providers:
|
|
34
|
+
|
|
35
|
+
```typescript
|
|
36
|
+
import { bootstrapApplication } from '@angular/platform-browser';
|
|
37
|
+
import { importProvidersFrom } from '@angular/core';
|
|
38
|
+
import { AiTranslocoModule, provideAiMarkdown } from '@hahnpro/ai-sdk';
|
|
39
|
+
import { LoggerModule, NgxLoggerLevel } from 'ngx-logger';
|
|
40
|
+
import { AppComponent } from './app/app.component';
|
|
41
|
+
|
|
42
|
+
bootstrapApplication(AppComponent, {
|
|
43
|
+
providers: [
|
|
44
|
+
importProvidersFrom(
|
|
45
|
+
AiTranslocoModule,
|
|
46
|
+
LoggerModule.forRoot({
|
|
47
|
+
level: NgxLoggerLevel.DEBUG,
|
|
48
|
+
disableConsoleLogging: false,
|
|
49
|
+
}),
|
|
50
|
+
),
|
|
51
|
+
provideAiMarkdown(),
|
|
52
|
+
// other providers...
|
|
53
|
+
],
|
|
54
|
+
}).catch((err) => console.error(err));
|
|
55
|
+
```
|