@revenium/openai 1.0.9 → 1.0.11
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/CHANGELOG.md +78 -0
- package/LICENSE +21 -21
- package/README.md +1231 -1152
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/types/openai-augmentation.js +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/types/openai-augmentation.js +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/types/openai-augmentation.d.ts +1 -1
- package/examples/README.md +361 -0
- package/examples/azure-basic.ts +194 -0
- package/examples/azure-responses-basic.ts +204 -0
- package/examples/azure-responses-streaming.ts +226 -0
- package/examples/azure-streaming.ts +188 -0
- package/examples/openai-basic.ts +125 -0
- package/examples/openai-responses-basic.ts +183 -0
- package/examples/openai-responses-streaming.ts +203 -0
- package/examples/openai-streaming.ts +161 -0
- package/package.json +87 -84
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [1.0.11] - 2025-10-21
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- Examples now included in npm package for offline access
|
|
12
|
+
- New `examples/README.md` with comprehensive step-by-step guide
|
|
13
|
+
- Step 4: Protect Your API Keys - Security best practices in main README
|
|
14
|
+
- TypeScript and JavaScript examples for getting started
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
- Removed internal QA environment references from documentation
|
|
18
|
+
- Documentation standardized for public repository
|
|
19
|
+
- Improved README structure with enhanced security guidance
|
|
20
|
+
|
|
21
|
+
### Security
|
|
22
|
+
- Added `.gitignore` best practices to protect API keys
|
|
23
|
+
- Enhanced environment variable security documentation
|
|
24
|
+
|
|
25
|
+
## [1.0.10] - 2025-10-17
|
|
26
|
+
|
|
27
|
+
### Added
|
|
28
|
+
- Support for OpenAI Responses API (SDK 5.8+)
|
|
29
|
+
- New example files for Responses API with Azure and standard OpenAI
|
|
30
|
+
- Enhanced TypeScript type definitions for Responses API
|
|
31
|
+
|
|
32
|
+
### Changed
|
|
33
|
+
- README documentation significantly expanded with step-by-step guides
|
|
34
|
+
- Improved examples structure and organization
|
|
35
|
+
- Package maintenance and stability improvements
|
|
36
|
+
|
|
37
|
+
## [1.0.9] - 2025-10-16
|
|
38
|
+
|
|
39
|
+
### Changed
|
|
40
|
+
- Internal improvements and bug fixes
|
|
41
|
+
- Enhanced error handling and logging
|
|
42
|
+
|
|
43
|
+
## [1.0.8] - 2025-10-15
|
|
44
|
+
|
|
45
|
+
### Added
|
|
46
|
+
- Initial release of @revenium/openai scoped package
|
|
47
|
+
- Migration from revenium-middleware-openai-node to @revenium/openai
|
|
48
|
+
- Transparent OpenAI API usage tracking middleware
|
|
49
|
+
- Support for streaming responses
|
|
50
|
+
- Support for function/tool calling
|
|
51
|
+
- Automatic metadata collection and forwarding
|
|
52
|
+
- Azure OpenAI support with automatic detection
|
|
53
|
+
- Full TypeScript support with native type integration
|
|
54
|
+
- Zero configuration setup from environment variables
|
|
55
|
+
|
|
56
|
+
### Changed
|
|
57
|
+
- Package name migrated to scoped format (@revenium/openai)
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Package Migration Notice
|
|
62
|
+
|
|
63
|
+
This package was previously published as `revenium-middleware-openai-node` up to v1.1.0.
|
|
64
|
+
|
|
65
|
+
Starting with v1.0.8, the package has been migrated to the scoped format `@revenium/openai`.
|
|
66
|
+
|
|
67
|
+
The old package has been deprecated with a notice directing users to the new scoped package.
|
|
68
|
+
|
|
69
|
+
To upgrade:
|
|
70
|
+
```bash
|
|
71
|
+
npm uninstall revenium-middleware-openai-node
|
|
72
|
+
npm install @revenium/openai
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
[1.0.11]: https://github.com/revenium/revenium-middleware-openai-node/releases/tag/v1.0.11
|
|
76
|
+
[1.0.10]: https://github.com/revenium/revenium-middleware-openai-node/releases/tag/v1.0.10
|
|
77
|
+
[1.0.9]: https://github.com/revenium/revenium-middleware-openai-node/releases/tag/v1.0.9
|
|
78
|
+
[1.0.8]: https://github.com/revenium/revenium-middleware-openai-node/releases/tag/v1.0.8
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Revenium, Inc.
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Revenium, Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|