@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 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
+ ```