@yourgpt/llm-sdk 0.1.0 → 1.0.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.
Files changed (56) hide show
  1. package/README.md +61 -40
  2. package/dist/adapters/index.d.mts +4 -258
  3. package/dist/adapters/index.d.ts +4 -258
  4. package/dist/adapters/index.js +0 -113
  5. package/dist/adapters/index.js.map +1 -1
  6. package/dist/adapters/index.mjs +1 -112
  7. package/dist/adapters/index.mjs.map +1 -1
  8. package/dist/base-D_FyHFKj.d.mts +235 -0
  9. package/dist/base-D_FyHFKj.d.ts +235 -0
  10. package/dist/index.d.mts +209 -451
  11. package/dist/index.d.ts +209 -451
  12. package/dist/index.js +1905 -311
  13. package/dist/index.js.map +1 -1
  14. package/dist/index.mjs +1895 -309
  15. package/dist/index.mjs.map +1 -1
  16. package/dist/providers/anthropic/index.d.mts +61 -0
  17. package/dist/providers/anthropic/index.d.ts +61 -0
  18. package/dist/providers/anthropic/index.js +939 -0
  19. package/dist/providers/anthropic/index.js.map +1 -0
  20. package/dist/providers/anthropic/index.mjs +934 -0
  21. package/dist/providers/anthropic/index.mjs.map +1 -0
  22. package/dist/providers/azure/index.d.mts +38 -0
  23. package/dist/providers/azure/index.d.ts +38 -0
  24. package/dist/providers/azure/index.js +380 -0
  25. package/dist/providers/azure/index.js.map +1 -0
  26. package/dist/providers/azure/index.mjs +377 -0
  27. package/dist/providers/azure/index.mjs.map +1 -0
  28. package/dist/providers/google/index.d.mts +72 -0
  29. package/dist/providers/google/index.d.ts +72 -0
  30. package/dist/providers/google/index.js +790 -0
  31. package/dist/providers/google/index.js.map +1 -0
  32. package/dist/providers/google/index.mjs +785 -0
  33. package/dist/providers/google/index.mjs.map +1 -0
  34. package/dist/providers/ollama/index.d.mts +24 -0
  35. package/dist/providers/ollama/index.d.ts +24 -0
  36. package/dist/providers/ollama/index.js +235 -0
  37. package/dist/providers/ollama/index.js.map +1 -0
  38. package/dist/providers/ollama/index.mjs +232 -0
  39. package/dist/providers/ollama/index.mjs.map +1 -0
  40. package/dist/providers/openai/index.d.mts +82 -0
  41. package/dist/providers/openai/index.d.ts +82 -0
  42. package/dist/providers/openai/index.js +679 -0
  43. package/dist/providers/openai/index.js.map +1 -0
  44. package/dist/providers/openai/index.mjs +674 -0
  45. package/dist/providers/openai/index.mjs.map +1 -0
  46. package/dist/providers/xai/index.d.mts +78 -0
  47. package/dist/providers/xai/index.d.ts +78 -0
  48. package/dist/providers/xai/index.js +671 -0
  49. package/dist/providers/xai/index.js.map +1 -0
  50. package/dist/providers/xai/index.mjs +666 -0
  51. package/dist/providers/xai/index.mjs.map +1 -0
  52. package/dist/types-BBCZ3Fxy.d.mts +308 -0
  53. package/dist/types-CdORv1Yu.d.mts +338 -0
  54. package/dist/types-CdORv1Yu.d.ts +338 -0
  55. package/dist/types-DcoCaVVC.d.ts +308 -0
  56. package/package.json +34 -3
@@ -0,0 +1,72 @@
1
+ import { L as LanguageModel } from '../../types-CdORv1Yu.js';
2
+ import { G as GoogleProviderConfig, A as AIProvider } from '../../types-DcoCaVVC.js';
3
+ import 'zod';
4
+ import '@yourgpt/copilot-sdk/core';
5
+ import '../../base-D_FyHFKj.js';
6
+
7
+ /**
8
+ * Google Provider - Modern Pattern
9
+ *
10
+ * Google Gemini models.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * import { google } from '@yourgpt/llm-sdk/google';
15
+ * import { generateText } from '@yourgpt/llm-sdk';
16
+ *
17
+ * const result = await generateText({
18
+ * model: google('gemini-2.0-flash'),
19
+ * prompt: 'Hello!',
20
+ * });
21
+ * ```
22
+ */
23
+
24
+ interface GoogleProviderOptions {
25
+ /** API key (defaults to GOOGLE_API_KEY or GEMINI_API_KEY env var) */
26
+ apiKey?: string;
27
+ /** Safety settings */
28
+ safetySettings?: Array<{
29
+ category: string;
30
+ threshold: string;
31
+ }>;
32
+ }
33
+ /**
34
+ * Create a Google Gemini language model
35
+ */
36
+ declare function google(modelId: string, options?: GoogleProviderOptions): LanguageModel;
37
+
38
+ /**
39
+ * Google Provider
40
+ *
41
+ * Modern pattern: google('gemini-2.0-flash') returns a LanguageModel
42
+ * Legacy pattern: createGoogle({ apiKey }) returns an AIProvider
43
+ *
44
+ * Features:
45
+ * - Vision (images)
46
+ * - Audio input
47
+ * - Video input
48
+ * - PDF documents
49
+ * - Tools/Function calling
50
+ * - Massive context windows (up to 2M tokens)
51
+ */
52
+
53
+ /**
54
+ * Create a Google provider
55
+ *
56
+ * @example
57
+ * ```typescript
58
+ * const google = createGoogle({
59
+ * apiKey: '...',
60
+ * });
61
+ * const adapter = google.languageModel('gemini-2.0-flash');
62
+ * const caps = google.getCapabilities('gemini-2.0-flash');
63
+ *
64
+ * if (caps.supportsVideo) {
65
+ * // Show video upload button
66
+ * }
67
+ * ```
68
+ */
69
+ declare function createGoogle(config?: GoogleProviderConfig): AIProvider;
70
+ declare const createGoogleProvider: typeof createGoogle;
71
+
72
+ export { type GoogleProviderOptions, createGoogle, google as createGoogleModel, createGoogleProvider, google };