@elizaos/plugin-openai 1.0.0-beta.7 → 1.0.0-beta.72

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 Shaw Walters, aka Moon aka @lalalune
3
+ Copyright (c) 2025 Shaw Walters and elizaOS Contributors
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -7,7 +7,7 @@ This plugin provides integration with OpenAI's models through the ElizaOS platfo
7
7
  Add the plugin to your character configuration:
8
8
 
9
9
  ```json
10
- "plugins": ["@elizaos/plugin-openai"]
10
+ "plugins": ["@elizaos-plugins/plugin-openai"]
11
11
  ```
12
12
 
13
13
  ## Configuration
@@ -19,7 +19,12 @@ The plugin requires these environment variables (can be set in .env file or char
19
19
  "OPENAI_API_KEY": "your_openai_api_key",
20
20
  "OPENAI_BASE_URL": "optional_custom_endpoint",
21
21
  "OPENAI_SMALL_MODEL": "gpt-4o-mini",
22
- "OPENAI_LARGE_MODEL": "gpt-4o"
22
+ "OPENAI_LARGE_MODEL": "gpt-4o",
23
+ "OPENAI_EMBEDDING_MODEL": "text-embedding-3-small",
24
+ "OPENAI_EMBEDDING_URL": "optional_custom_endpoint",
25
+ "OPENAI_EMBEDDING_DIMENSIONS": "1536",
26
+ "OPENAI_IMAGE_DESCRIPTION_MODEL": "gpt-4o-mini",
27
+ "OPENAI_IMAGE_DESCRIPTION_MAX_TOKENS": "8192"
23
28
  }
24
29
  ```
25
30
 
@@ -31,6 +36,11 @@ OPENAI_API_KEY=your_openai_api_key
31
36
  OPENAI_BASE_URL=optional_custom_endpoint
32
37
  OPENAI_SMALL_MODEL=gpt-4o-mini
33
38
  OPENAI_LARGE_MODEL=gpt-4o
39
+ OPENAI_EMBEDDING_MODEL=text-embedding-3-small
40
+ OPENAI_EMBEDDING_URL=optional_custom_endpoint
41
+ OPENAI_EMBEDDING_DIMENSIONS=1536
42
+ OPENAI_IMAGE_DESCRIPTION_MODEL=gpt-4o-mini
43
+ OPENAI_IMAGE_DESCRIPTION_MAX_TOKENS=8192
34
44
  ```
35
45
 
36
46
  ### Configuration Options
@@ -39,12 +49,17 @@ OPENAI_LARGE_MODEL=gpt-4o
39
49
  - `OPENAI_BASE_URL`: Custom API endpoint (default: https://api.openai.com/v1)
40
50
  - `OPENAI_SMALL_MODEL`: Defaults to GPT-4o Mini ("gpt-4o-mini")
41
51
  - `OPENAI_LARGE_MODEL`: Defaults to GPT-4o ("gpt-4o")
52
+ - `OPENAI_EMBEDDING_MODEL`: Defaults to text-embedding-3-small ("text-embedding-3-small")
53
+ - `OPENAI_EMBEDDING_URL`: Custom embedding endpoint (defaults to `OPENAI_BASE_URL`)
54
+ - `OPENAI_EMBEDDING_DIMENSIONS`: Defaults to 1536 (1536)
55
+ - `OPENAI_IMAGE_DESCRIPTION_MODEL`: Model used for image description (default: "gpt-4o-mini")
56
+ - `OPENAI_IMAGE_DESCRIPTION_MAX_TOKENS`: Maximum tokens for image descriptions (default: 8192)
42
57
 
43
58
  The plugin provides these model classes:
44
59
 
45
60
  - `TEXT_SMALL`: Optimized for fast, cost-effective responses
46
61
  - `TEXT_LARGE`: For complex tasks requiring deeper reasoning
47
- - `TEXT_EMBEDDING`: Text embedding model (text-embedding-3-small)
62
+ - `TEXT_EMBEDDING`: Text embedding model (text-embedding-3-small by default)
48
63
  - `IMAGE`: DALL-E image generation
49
64
  - `IMAGE_DESCRIPTION`: GPT-4o image analysis
50
65
  - `TRANSCRIPTION`: Whisper audio transcription
@@ -0,0 +1,9 @@
1
+ import { Plugin } from '@elizaos/core';
2
+
3
+ /**
4
+ * Defines the OpenAI plugin with its name, description, and configuration options.
5
+ * @type {Plugin}
6
+ */
7
+ declare const openaiPlugin: Plugin;
8
+
9
+ export { openaiPlugin as default, openaiPlugin };