diff --git a/codegen/generator/src/OpenAI.Library.Plugin.csproj b/codegen/generator/src/OpenAI.Library.Plugin.csproj index 681ba7abc..27dd54f84 100644 --- a/codegen/generator/src/OpenAI.Library.Plugin.csproj +++ b/codegen/generator/src/OpenAI.Library.Plugin.csproj @@ -1,4 +1,4 @@ - + net8.0 @@ -8,7 +8,7 @@ - + @@ -22,3 +22,4 @@ + diff --git a/codegen/package.json b/codegen/package.json index 47ed1732f..f3e6a5b64 100644 --- a/codegen/package.json +++ b/codegen/package.json @@ -1,48 +1,48 @@ { - "name": "@open-ai/plugin", - "version": "1.0.0", - "description": "OpenAI plugin", - "license": "MIT", - "repository": { - "type": "git", - "url": "git+https://github.com/openai/openai-dotnet.git" - }, - "bugs": { - "url": "https://github.com/openai/openai-dotnet/issues" - }, - "type": "module", - "main": "dist/emitter/index.js", - "exports": { - ".": "./dist/emitter/index.js" - }, - "scripts": { - "clean": "rimraf ./dist ./emitter/temp && dotnet clean ./generator", - "build:emitter": "tsc -p ./tsconfig.build.json", - "build:generator": "dotnet build ./generator", - "build": "npm run build:emitter && npm run build:generator", - "test:emitter": "vitest run -c ./emitter/vitest.config.ts", - "test:generator": "dotnet test ./generator", - "test": "npm run test:emitter && npm run test:generator" - }, - "files": [ - "dist/**" - ], - "dependencies": { - "@open-ai/plugin": "file:", - "@azure-tools/typespec-client-generator-core": "0.59.0", - "@azure-tools/typespec-azure-core": "0.59.0", - "@typespec/http-client-csharp": "1.0.0-alpha.20250827.2", - "@typespec/http": "1.3.0", - "@typespec/openapi": "1.3.0" - }, - "devDependencies": { - "@types/node": "^22.8.1", - "@vitest/coverage-v8": "^1.4.0", - "@vitest/ui": "^1.4.0", - "c8": "^9.1.0", - "copyfiles": "^2.4.1", - "rimraf": "~5.0.5", - "typescript": "^5.6.3", - "vitest": "^1.4.0" - } + "name": "@open-ai/plugin", + "version": "1.0.0", + "description": "OpenAI plugin", + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/openai/openai-dotnet.git" + }, + "bugs": { + "url": "https://github.com/openai/openai-dotnet/issues" + }, + "type": "module", + "main": "dist/emitter/index.js", + "exports": { + ".": "./dist/emitter/index.js" + }, + "scripts": { + "clean": "rimraf ./dist ./emitter/temp && dotnet clean ./generator", + "build:emitter": "tsc -p ./tsconfig.build.json", + "build:generator": "dotnet build ./generator", + "build": "npm run build:emitter && npm run build:generator", + "test:emitter": "vitest run -c ./emitter/vitest.config.ts", + "test:generator": "dotnet test ./generator", + "test": "npm run test:emitter && npm run test:generator" + }, + "files": [ + "dist/**" + ], + "dependencies": { + "@open-ai/plugin": "file:", + "@azure-tools/typespec-client-generator-core": "0.59.0", + "@azure-tools/typespec-azure-core": "0.59.0", + "@typespec/http-client-csharp": "1.0.0-alpha.20250829.4", + "@typespec/http": "1.3.0", + "@typespec/openapi": "1.3.0" + }, + "devDependencies": { + "@types/node": "^22.8.1", + "@vitest/coverage-v8": "^1.4.0", + "@vitest/ui": "^1.4.0", + "c8": "^9.1.0", + "copyfiles": "^2.4.1", + "rimraf": "~5.0.5", + "typescript": "^5.6.3", + "vitest": "^1.4.0" + } } diff --git a/package-lock.json b/package-lock.json index c47a25acd..627915e70 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "@azure-tools/typespec-client-generator-core": "0.59.0", "@open-ai/plugin": "file:", "@typespec/http": "1.3.0", - "@typespec/http-client-csharp": "1.0.0-alpha.20250827.2", + "@typespec/http-client-csharp": "1.0.0-alpha.20250829.4", "@typespec/openapi": "1.3.0" }, "devDependencies": { @@ -1129,9 +1129,9 @@ "license": "MIT" }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.49.0.tgz", - "integrity": "sha512-rlKIeL854Ed0e09QGYFlmDNbka6I3EQFw7iZuugQjMb11KMpJCLPFL4ZPbMfaEhLADEL1yx0oujGkBQ7+qW3eA==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.50.0.tgz", + "integrity": "sha512-lVgpeQyy4fWN5QYebtW4buT/4kn4p4IJ+kDNB4uYNT5b8c8DLJDg6titg20NIg7E8RWwdWZORW6vUFfrLyG3KQ==", "cpu": [ "arm" ], @@ -1143,9 +1143,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.49.0.tgz", - "integrity": "sha512-cqPpZdKUSQYRtLLr6R4X3sD4jCBO1zUmeo3qrWBCqYIeH8Q3KRL4F3V7XJ2Rm8/RJOQBZuqzQGWPjjvFUcYa/w==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.50.0.tgz", + "integrity": "sha512-2O73dR4Dc9bp+wSYhviP6sDziurB5/HCym7xILKifWdE9UsOe2FtNcM+I4xZjKrfLJnq5UR8k9riB87gauiQtw==", "cpu": [ "arm64" ], @@ -1157,9 +1157,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.49.0.tgz", - "integrity": "sha512-99kMMSMQT7got6iYX3yyIiJfFndpojBmkHfTc1rIje8VbjhmqBXE+nb7ZZP3A5skLyujvT0eIUCUsxAe6NjWbw==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.50.0.tgz", + "integrity": "sha512-vwSXQN8T4sKf1RHr1F0s98Pf8UPz7pS6P3LG9NSmuw0TVh7EmaE+5Ny7hJOZ0M2yuTctEsHHRTMi2wuHkdS6Hg==", "cpu": [ "arm64" ], @@ -1171,9 +1171,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.49.0.tgz", - "integrity": "sha512-y8cXoD3wdWUDpjOLMKLx6l+NFz3NlkWKcBCBfttUn+VGSfgsQ5o/yDUGtzE9HvsodkP0+16N0P4Ty1VuhtRUGg==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.50.0.tgz", + "integrity": "sha512-cQp/WG8HE7BCGyFVuzUg0FNmupxC+EPZEwWu2FCGGw5WDT1o2/YlENbm5e9SMvfDFR6FRhVCBePLqj0o8MN7Vw==", "cpu": [ "x64" ], @@ -1185,9 +1185,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.49.0.tgz", - "integrity": "sha512-3mY5Pr7qv4GS4ZvWoSP8zha8YoiqrU+e0ViPvB549jvliBbdNLrg2ywPGkgLC3cmvN8ya3za+Q2xVyT6z+vZqA==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.50.0.tgz", + "integrity": "sha512-UR1uTJFU/p801DvvBbtDD7z9mQL8J80xB0bR7DqW7UGQHRm/OaKzp4is7sQSdbt2pjjSS72eAtRh43hNduTnnQ==", "cpu": [ "arm64" ], @@ -1199,9 +1199,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.49.0.tgz", - "integrity": "sha512-C9KzzOAQU5gU4kG8DTk+tjdKjpWhVWd5uVkinCwwFub2m7cDYLOdtXoMrExfeBmeRy9kBQMkiyJ+HULyF1yj9w==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.50.0.tgz", + "integrity": "sha512-G/DKyS6PK0dD0+VEzH/6n/hWDNPDZSMBmqsElWnCRGrYOb2jC0VSupp7UAHHQ4+QILwkxSMaYIbQ72dktp8pKA==", "cpu": [ "x64" ], @@ -1213,9 +1213,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.49.0.tgz", - "integrity": "sha512-OVSQgEZDVLnTbMq5NBs6xkmz3AADByCWI4RdKSFNlDsYXdFtlxS59J+w+LippJe8KcmeSSM3ba+GlsM9+WwC1w==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.50.0.tgz", + "integrity": "sha512-u72Mzc6jyJwKjJbZZcIYmd9bumJu7KNmHYdue43vT1rXPm2rITwmPWF0mmPzLm9/vJWxIRbao/jrQmxTO0Sm9w==", "cpu": [ "arm" ], @@ -1227,9 +1227,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.49.0.tgz", - "integrity": "sha512-ZnfSFA7fDUHNa4P3VwAcfaBLakCbYaxCk0jUnS3dTou9P95kwoOLAMlT3WmEJDBCSrOEFFV0Y1HXiwfLYJuLlA==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.50.0.tgz", + "integrity": "sha512-S4UefYdV0tnynDJV1mdkNawp0E5Qm2MtSs330IyHgaccOFrwqsvgigUD29uT+B/70PDY1eQ3t40+xf6wIvXJyg==", "cpu": [ "arm" ], @@ -1241,9 +1241,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.49.0.tgz", - "integrity": "sha512-Z81u+gfrobVK2iV7GqZCBfEB1y6+I61AH466lNK+xy1jfqFLiQ9Qv716WUM5fxFrYxwC7ziVdZRU9qvGHkYIJg==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.50.0.tgz", + "integrity": "sha512-1EhkSvUQXJsIhk4msxP5nNAUWoB4MFDHhtc4gAYvnqoHlaL9V3F37pNHabndawsfy/Tp7BPiy/aSa6XBYbaD1g==", "cpu": [ "arm64" ], @@ -1255,9 +1255,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.49.0.tgz", - "integrity": "sha512-zoAwS0KCXSnTp9NH/h9aamBAIve0DXeYpll85shf9NJ0URjSTzzS+Z9evmolN+ICfD3v8skKUPyk2PO0uGdFqg==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.50.0.tgz", + "integrity": "sha512-EtBDIZuDtVg75xIPIK1l5vCXNNCIRM0OBPUG+tbApDuJAy9mKago6QxX+tfMzbCI6tXEhMuZuN1+CU8iDW+0UQ==", "cpu": [ "arm64" ], @@ -1269,9 +1269,9 @@ ] }, "node_modules/@rollup/rollup-linux-loongarch64-gnu": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.49.0.tgz", - "integrity": "sha512-2QyUyQQ1ZtwZGiq0nvODL+vLJBtciItC3/5cYN8ncDQcv5avrt2MbKt1XU/vFAJlLta5KujqyHdYtdag4YEjYQ==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.50.0.tgz", + "integrity": "sha512-BGYSwJdMP0hT5CCmljuSNx7+k+0upweM2M4YGfFBjnFSZMHOLYR0gEEj/dxyYJ6Zc6AiSeaBY8dWOa11GF/ppQ==", "cpu": [ "loong64" ], @@ -1283,9 +1283,9 @@ ] }, "node_modules/@rollup/rollup-linux-ppc64-gnu": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.49.0.tgz", - "integrity": "sha512-k9aEmOWt+mrMuD3skjVJSSxHckJp+SiFzFG+v8JLXbc/xi9hv2icSkR3U7uQzqy+/QbbYY7iNB9eDTwrELo14g==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.50.0.tgz", + "integrity": "sha512-I1gSMzkVe1KzAxKAroCJL30hA4DqSi+wGc5gviD0y3IL/VkvcnAqwBf4RHXHyvH66YVHxpKO8ojrgc4SrWAnLg==", "cpu": [ "ppc64" ], @@ -1297,9 +1297,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.49.0.tgz", - "integrity": "sha512-rDKRFFIWJ/zJn6uk2IdYLc09Z7zkE5IFIOWqpuU0o6ZpHcdniAyWkwSUWE/Z25N/wNDmFHHMzin84qW7Wzkjsw==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.50.0.tgz", + "integrity": "sha512-bSbWlY3jZo7molh4tc5dKfeSxkqnf48UsLqYbUhnkdnfgZjgufLS/NTA8PcP/dnvct5CCdNkABJ56CbclMRYCA==", "cpu": [ "riscv64" ], @@ -1311,9 +1311,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.49.0.tgz", - "integrity": "sha512-FkkhIY/hYFVnOzz1WeV3S9Bd1h0hda/gRqvZCMpHWDHdiIHn6pqsY3b5eSbvGccWHMQ1uUzgZTKS4oGpykf8Tw==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.50.0.tgz", + "integrity": "sha512-LSXSGumSURzEQLT2e4sFqFOv3LWZsEF8FK7AAv9zHZNDdMnUPYH3t8ZlaeYYZyTXnsob3htwTKeWtBIkPV27iQ==", "cpu": [ "riscv64" ], @@ -1325,9 +1325,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.49.0.tgz", - "integrity": "sha512-gRf5c+A7QiOG3UwLyOOtyJMD31JJhMjBvpfhAitPAoqZFcOeK3Kc1Veg1z/trmt+2P6F/biT02fU19GGTS529A==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.50.0.tgz", + "integrity": "sha512-CxRKyakfDrsLXiCyucVfVWVoaPA4oFSpPpDwlMcDFQvrv3XY6KEzMtMZrA+e/goC8xxp2WSOxHQubP8fPmmjOQ==", "cpu": [ "s390x" ], @@ -1339,9 +1339,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.49.0.tgz", - "integrity": "sha512-BR7+blScdLW1h/2hB/2oXM+dhTmpW3rQt1DeSiCP9mc2NMMkqVgjIN3DDsNpKmezffGC9R8XKVOLmBkRUcK/sA==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.50.0.tgz", + "integrity": "sha512-8PrJJA7/VU8ToHVEPu14FzuSAqVKyo5gg/J8xUerMbyNkWkO9j2ExBho/68RnJsMGNJq4zH114iAttgm7BZVkA==", "cpu": [ "x64" ], @@ -1353,9 +1353,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.49.0.tgz", - "integrity": "sha512-hDMOAe+6nX3V5ei1I7Au3wcr9h3ktKzDvF2ne5ovX8RZiAHEtX1A5SNNk4zt1Qt77CmnbqT+upb/umzoPMWiPg==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.50.0.tgz", + "integrity": "sha512-SkE6YQp+CzpyOrbw7Oc4MgXFvTw2UIBElvAvLCo230pyxOLmYwRPwZ/L5lBe/VW/qT1ZgND9wJfOsdy0XptRvw==", "cpu": [ "x64" ], @@ -1366,10 +1366,24 @@ "linux" ] }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.50.0.tgz", + "integrity": "sha512-PZkNLPfvXeIOgJWA804zjSFH7fARBBCpCXxgkGDRjjAhRLOR8o0IGS01ykh5GYfod4c2yiiREuDM8iZ+pVsT+Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.49.0.tgz", - "integrity": "sha512-wkNRzfiIGaElC9kXUT+HLx17z7D0jl+9tGYRKwd8r7cUqTL7GYAvgUY++U2hK6Ar7z5Z6IRRoWC8kQxpmM7TDA==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.50.0.tgz", + "integrity": "sha512-q7cIIdFvWQoaCbLDUyUc8YfR3Jh2xx3unO8Dn6/TTogKjfwrax9SyfmGGK6cQhKtjePI7jRfd7iRYcxYs93esg==", "cpu": [ "arm64" ], @@ -1381,9 +1395,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.49.0.tgz", - "integrity": "sha512-gq5aW/SyNpjp71AAzroH37DtINDcX1Qw2iv9Chyz49ZgdOP3NV8QCyKZUrGsYX9Yyggj5soFiRCgsL3HwD8TdA==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.50.0.tgz", + "integrity": "sha512-XzNOVg/YnDOmFdDKcxxK410PrcbcqZkBmz+0FicpW5jtjKQxcW1BZJEQOF0NJa6JO7CZhett8GEtRN/wYLYJuw==", "cpu": [ "ia32" ], @@ -1395,9 +1409,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.49.0.tgz", - "integrity": "sha512-gEtqFbzmZLFk2xKh7g0Rlo8xzho8KrEFEkzvHbfUGkrgXOpZ4XagQ6n+wIZFNh1nTb8UD16J4nFSFKXYgnbdBg==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.50.0.tgz", + "integrity": "sha512-xMmiWRR8sp72Zqwjgtf3QbZfF1wdh8X2ABu3EaozvZcyHJeU0r+XAnXdKgs4cCAp6ORoYoCygipYP1mjmbjrsg==", "cpu": [ "x64" ], @@ -1517,9 +1531,9 @@ } }, "node_modules/@typespec/http-client-csharp": { - "version": "1.0.0-alpha.20250827.2", - "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20250827.2.tgz", - "integrity": "sha512-TodwID2apHysku1tkxA/GAQCgPCZbrdkq+6bc15CU/k9WfWqBig7whIOeBULs7zlACkbmZXkyCOt9kDcMslhSg==", + "version": "1.0.0-alpha.20250829.4", + "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20250829.4.tgz", + "integrity": "sha512-SxOwdLrI5sJ4dPC3j0jLn5DQHQg0g4qm5q4cZCsLMzHbT1Jiio5Z8kDZWlx9UrhfGeNaJ53WWHcccXKowlFw/A==", "license": "MIT", "peerDependencies": { "@azure-tools/typespec-azure-core": ">=0.59.0 <0.60.0 || ~0.60.0-0", @@ -2099,9 +2113,9 @@ } }, "node_modules/cliui/node_modules/emoji-regex": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", - "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.5.0.tgz", + "integrity": "sha512-lb49vf1Xzfx080OKA0o6l8DQQpV+6Vg95zyCJX9VB/BqKYlhG7N4wgROUUHRA+ZPUefLnteQOad7z1kT2bV7bg==", "license": "MIT", "peer": true }, @@ -2603,9 +2617,9 @@ } }, "node_modules/get-east-asian-width": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.3.0.tgz", - "integrity": "sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.3.1.tgz", + "integrity": "sha512-R1QfovbPsKmosqTnPoRFiJ7CF9MLRgb53ChvMZm+r4p76/+8yKDy17qLL2PKInORy2RkZZekuK0efYgmzTkXyQ==", "license": "MIT", "peer": true, "engines": { @@ -3608,9 +3622,9 @@ } }, "node_modules/rollup": { - "version": "4.49.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.49.0.tgz", - "integrity": "sha512-3IVq0cGJ6H7fKXXEdVt+RcYvRCt8beYY9K1760wGQwSAHZcS9eot1zDG5axUbcp/kWRi5zKIIDX8MoKv/TzvZA==", + "version": "4.50.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.50.0.tgz", + "integrity": "sha512-/Zl4D8zPifNmyGzJS+3kVoyXeDeT/GrsJM94sACNg9RtUE0hrHa1bNPtRSrfHTMH5HjRzce6K7rlTh3Khiw+pw==", "dev": true, "license": "MIT", "dependencies": { @@ -3624,26 +3638,27 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.49.0", - "@rollup/rollup-android-arm64": "4.49.0", - "@rollup/rollup-darwin-arm64": "4.49.0", - "@rollup/rollup-darwin-x64": "4.49.0", - "@rollup/rollup-freebsd-arm64": "4.49.0", - "@rollup/rollup-freebsd-x64": "4.49.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.49.0", - "@rollup/rollup-linux-arm-musleabihf": "4.49.0", - "@rollup/rollup-linux-arm64-gnu": "4.49.0", - "@rollup/rollup-linux-arm64-musl": "4.49.0", - "@rollup/rollup-linux-loongarch64-gnu": "4.49.0", - "@rollup/rollup-linux-ppc64-gnu": "4.49.0", - "@rollup/rollup-linux-riscv64-gnu": "4.49.0", - "@rollup/rollup-linux-riscv64-musl": "4.49.0", - "@rollup/rollup-linux-s390x-gnu": "4.49.0", - "@rollup/rollup-linux-x64-gnu": "4.49.0", - "@rollup/rollup-linux-x64-musl": "4.49.0", - "@rollup/rollup-win32-arm64-msvc": "4.49.0", - "@rollup/rollup-win32-ia32-msvc": "4.49.0", - "@rollup/rollup-win32-x64-msvc": "4.49.0", + "@rollup/rollup-android-arm-eabi": "4.50.0", + "@rollup/rollup-android-arm64": "4.50.0", + "@rollup/rollup-darwin-arm64": "4.50.0", + "@rollup/rollup-darwin-x64": "4.50.0", + "@rollup/rollup-freebsd-arm64": "4.50.0", + "@rollup/rollup-freebsd-x64": "4.50.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.50.0", + "@rollup/rollup-linux-arm-musleabihf": "4.50.0", + "@rollup/rollup-linux-arm64-gnu": "4.50.0", + "@rollup/rollup-linux-arm64-musl": "4.50.0", + "@rollup/rollup-linux-loongarch64-gnu": "4.50.0", + "@rollup/rollup-linux-ppc64-gnu": "4.50.0", + "@rollup/rollup-linux-riscv64-gnu": "4.50.0", + "@rollup/rollup-linux-riscv64-musl": "4.50.0", + "@rollup/rollup-linux-s390x-gnu": "4.50.0", + "@rollup/rollup-linux-x64-gnu": "4.50.0", + "@rollup/rollup-linux-x64-musl": "4.50.0", + "@rollup/rollup-openharmony-arm64": "4.50.0", + "@rollup/rollup-win32-arm64-msvc": "4.50.0", + "@rollup/rollup-win32-ia32-msvc": "4.50.0", + "@rollup/rollup-win32-x64-msvc": "4.50.0", "fsevents": "~2.3.2" } }, @@ -4540,9 +4555,9 @@ } }, "node_modules/yargs/node_modules/emoji-regex": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", - "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.5.0.tgz", + "integrity": "sha512-lb49vf1Xzfx080OKA0o6l8DQQpV+6Vg95zyCJX9VB/BqKYlhG7N4wgROUUHRA+ZPUefLnteQOad7z1kT2bV7bg==", "license": "MIT", "peer": true }, diff --git a/src/Generated/AssistantClient.RestClient.cs b/src/Generated/AssistantClient.RestClient.cs index 9722fb6ab..9574819fc 100644 --- a/src/Generated/AssistantClient.RestClient.cs +++ b/src/Generated/AssistantClient.RestClient.cs @@ -16,10 +16,6 @@ public partial class AssistantClient internal virtual PipelineMessage CreateGetAssistantsRequest(int? limit, string order, string after, string before, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/assistants", false); @@ -39,7 +35,8 @@ internal virtual PipelineMessage CreateGetAssistantsRequest(int? limit, string o { uri.AppendQuery("before", before, true); } - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); request.Headers.Set("OpenAI-Beta", "assistants=v2"); message.Apply(options); @@ -48,14 +45,11 @@ internal virtual PipelineMessage CreateGetAssistantsRequest(int? limit, string o internal virtual PipelineMessage CreateCreateAssistantRequest(BinaryContent content, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/assistants", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); request.Headers.Set("OpenAI-Beta", "assistants=v2"); request.Headers.Set("Content-Type", "application/json"); @@ -66,15 +60,12 @@ internal virtual PipelineMessage CreateCreateAssistantRequest(BinaryContent cont internal virtual PipelineMessage CreateGetAssistantRequest(string assistantId, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/assistants/", false); uri.AppendPath(assistantId, true); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); request.Headers.Set("OpenAI-Beta", "assistants=v2"); message.Apply(options); @@ -83,15 +74,12 @@ internal virtual PipelineMessage CreateGetAssistantRequest(string assistantId, R internal virtual PipelineMessage CreateModifyAssistantRequest(string assistantId, BinaryContent content, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/assistants/", false); uri.AppendPath(assistantId, true); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); request.Headers.Set("OpenAI-Beta", "assistants=v2"); request.Headers.Set("Content-Type", "application/json"); @@ -102,15 +90,12 @@ internal virtual PipelineMessage CreateModifyAssistantRequest(string assistantId internal virtual PipelineMessage CreateDeleteAssistantRequest(string assistantId, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "DELETE"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/assistants/", false); uri.AppendPath(assistantId, true); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "DELETE", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); request.Headers.Set("OpenAI-Beta", "assistants=v2"); message.Apply(options); diff --git a/src/Generated/AudioClient.RestClient.cs b/src/Generated/AudioClient.RestClient.cs index 39fab858f..345f28f7a 100644 --- a/src/Generated/AudioClient.RestClient.cs +++ b/src/Generated/AudioClient.RestClient.cs @@ -16,14 +16,11 @@ public partial class AudioClient internal virtual PipelineMessage CreateGenerateSpeechRequest(BinaryContent content, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/audio/speech", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/octet-stream"); request.Headers.Set("Content-Type", "application/json"); request.Content = content; @@ -33,14 +30,11 @@ internal virtual PipelineMessage CreateGenerateSpeechRequest(BinaryContent conte internal virtual PipelineMessage CreateTranscribeAudioRequest(BinaryContent content, string contentType, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/audio/transcriptions", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json, text/event-stream"); request.Headers.Set("Content-Type", contentType); request.Content = content; @@ -50,14 +44,11 @@ internal virtual PipelineMessage CreateTranscribeAudioRequest(BinaryContent cont internal virtual PipelineMessage CreateTranslateAudioRequest(BinaryContent content, string contentType, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/audio/translations", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); request.Headers.Set("Content-Type", contentType); request.Content = content; diff --git a/src/Generated/BatchClient.RestClient.cs b/src/Generated/BatchClient.RestClient.cs index 8fdbafe62..e85662c38 100644 --- a/src/Generated/BatchClient.RestClient.cs +++ b/src/Generated/BatchClient.RestClient.cs @@ -16,14 +16,11 @@ public partial class BatchClient internal virtual PipelineMessage CreateCreateBatchRequest(BinaryContent content, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/batches", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); request.Headers.Set("Content-Type", "application/json"); request.Content = content; @@ -33,10 +30,6 @@ internal virtual PipelineMessage CreateCreateBatchRequest(BinaryContent content, internal virtual PipelineMessage CreateGetBatchesRequest(string after, int? limit, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/batches", false); @@ -48,7 +41,8 @@ internal virtual PipelineMessage CreateGetBatchesRequest(string after, int? limi { uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit, null), true); } - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -56,15 +50,12 @@ internal virtual PipelineMessage CreateGetBatchesRequest(string after, int? limi internal virtual PipelineMessage CreateGetBatchRequest(string batchId, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/batches/", false); uri.AppendPath(batchId, true); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -72,16 +63,13 @@ internal virtual PipelineMessage CreateGetBatchRequest(string batchId, RequestOp internal virtual PipelineMessage CreateCancelBatchRequest(string batchId, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/batches/", false); uri.AppendPath(batchId, true); uri.AppendPath("/cancel", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; diff --git a/src/Generated/ChatClient.RestClient.cs b/src/Generated/ChatClient.RestClient.cs index 898dda5a3..15c0f9f84 100644 --- a/src/Generated/ChatClient.RestClient.cs +++ b/src/Generated/ChatClient.RestClient.cs @@ -17,10 +17,6 @@ public partial class ChatClient internal virtual PipelineMessage CreateGetChatCompletionsRequest(string after, int? limit, string order, IDictionary metadata, string model, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/chat/completions", false); @@ -50,7 +46,8 @@ internal virtual PipelineMessage CreateGetChatCompletionsRequest(string after, i { uri.AppendQuery("model", model, true); } - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -58,14 +55,11 @@ internal virtual PipelineMessage CreateGetChatCompletionsRequest(string after, i internal virtual PipelineMessage CreateCompleteChatRequest(BinaryContent content, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/chat/completions", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); request.Headers.Set("Content-Type", "application/json"); request.Content = content; @@ -75,15 +69,12 @@ internal virtual PipelineMessage CreateCompleteChatRequest(BinaryContent content internal virtual PipelineMessage CreateGetChatCompletionRequest(string completionId, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/chat/completions/", false); uri.AppendPath(completionId, true); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -91,15 +82,12 @@ internal virtual PipelineMessage CreateGetChatCompletionRequest(string completio internal virtual PipelineMessage CreateUpdateChatCompletionRequest(string completionId, BinaryContent content, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/chat/completions/", false); uri.AppendPath(completionId, true); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Content-Type", "application/json"); request.Headers.Set("Accept", "application/json"); request.Content = content; @@ -109,15 +97,12 @@ internal virtual PipelineMessage CreateUpdateChatCompletionRequest(string comple internal virtual PipelineMessage CreateDeleteChatCompletionRequest(string completionId, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "DELETE"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/chat/completions/", false); uri.AppendPath(completionId, true); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "DELETE", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -125,10 +110,6 @@ internal virtual PipelineMessage CreateDeleteChatCompletionRequest(string comple internal virtual PipelineMessage CreateGetChatCompletionMessagesRequest(string completionId, string after, int? limit, string order, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/chat/completions/", false); @@ -146,7 +127,8 @@ internal virtual PipelineMessage CreateGetChatCompletionMessagesRequest(string c { uri.AppendQuery("order", order, true); } - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; diff --git a/src/Generated/ContainerClient.RestClient.cs b/src/Generated/ContainerClient.RestClient.cs index 8b73b8bac..5b38e5b66 100644 --- a/src/Generated/ContainerClient.RestClient.cs +++ b/src/Generated/ContainerClient.RestClient.cs @@ -16,10 +16,6 @@ public partial class ContainerClient internal virtual PipelineMessage CreateGetContainersRequest(int? limit, string order, string after, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/containers", false); @@ -35,7 +31,8 @@ internal virtual PipelineMessage CreateGetContainersRequest(int? limit, string o { uri.AppendQuery("after", after, true); } - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -43,14 +40,11 @@ internal virtual PipelineMessage CreateGetContainersRequest(int? limit, string o internal virtual PipelineMessage CreateCreateContainerRequest(BinaryContent content, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/containers", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Content-Type", "application/json"); request.Headers.Set("Accept", "application/json"); request.Content = content; @@ -60,15 +54,12 @@ internal virtual PipelineMessage CreateCreateContainerRequest(BinaryContent cont internal virtual PipelineMessage CreateGetContainerRequest(string containerId, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/containers/", false); uri.AppendPath(containerId, true); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -76,15 +67,12 @@ internal virtual PipelineMessage CreateGetContainerRequest(string containerId, R internal virtual PipelineMessage CreateDeleteContainerRequest(string containerId, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "DELETE"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/containers/", false); uri.AppendPath(containerId, true); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "DELETE", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -92,16 +80,13 @@ internal virtual PipelineMessage CreateDeleteContainerRequest(string containerId internal virtual PipelineMessage CreateCreateContainerFileRequest(string containerId, BinaryContent content, string contentType, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/containers/", false); uri.AppendPath(containerId, true); uri.AppendPath("/files", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Content-Type", contentType); request.Headers.Set("Accept", "application/json"); request.Content = content; @@ -111,10 +96,6 @@ internal virtual PipelineMessage CreateCreateContainerFileRequest(string contain internal virtual PipelineMessage CreateGetContainerFilesRequest(string containerId, int? limit, string order, string after, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/containers/", false); @@ -132,7 +113,8 @@ internal virtual PipelineMessage CreateGetContainerFilesRequest(string container { uri.AppendQuery("after", after, true); } - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -140,17 +122,14 @@ internal virtual PipelineMessage CreateGetContainerFilesRequest(string container internal virtual PipelineMessage CreateGetContainerFileRequest(string containerId, string fileId, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/containers/", false); uri.AppendPath(containerId, true); uri.AppendPath("/files/", false); uri.AppendPath(fileId, true); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -158,17 +137,14 @@ internal virtual PipelineMessage CreateGetContainerFileRequest(string containerI internal virtual PipelineMessage CreateDeleteContainerFileRequest(string containerId, string fileId, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "DELETE"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/containers/", false); uri.AppendPath(containerId, true); uri.AppendPath("/files/", false); uri.AppendPath(fileId, true); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "DELETE", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -176,10 +152,6 @@ internal virtual PipelineMessage CreateDeleteContainerFileRequest(string contain internal virtual PipelineMessage CreateGetContainerFileContentRequest(string containerId, string fileId, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/containers/", false); @@ -187,7 +159,8 @@ internal virtual PipelineMessage CreateGetContainerFileContentRequest(string con uri.AppendPath("/files/", false); uri.AppendPath(fileId, true); uri.AppendPath("/content", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/octet-stream"); message.Apply(options); return message; diff --git a/src/Generated/EmbeddingClient.RestClient.cs b/src/Generated/EmbeddingClient.RestClient.cs index 4e5b792c5..62d366980 100644 --- a/src/Generated/EmbeddingClient.RestClient.cs +++ b/src/Generated/EmbeddingClient.RestClient.cs @@ -16,14 +16,11 @@ public partial class EmbeddingClient internal virtual PipelineMessage CreateGenerateEmbeddingsRequest(BinaryContent content, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/embeddings", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); request.Headers.Set("Content-Type", "application/json"); request.Content = content; diff --git a/src/Generated/EvaluationClient.RestClient.cs b/src/Generated/EvaluationClient.RestClient.cs index 6512fa0e7..dd065d28d 100644 --- a/src/Generated/EvaluationClient.RestClient.cs +++ b/src/Generated/EvaluationClient.RestClient.cs @@ -19,10 +19,6 @@ public partial class EvaluationClient internal virtual PipelineMessage CreateGetEvalsRequest(string after, int? limit, string order, string orderBy, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/evals", false); @@ -42,7 +38,8 @@ internal virtual PipelineMessage CreateGetEvalsRequest(string after, int? limit, { uri.AppendQuery("order_by", orderBy, true); } - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -50,14 +47,11 @@ internal virtual PipelineMessage CreateGetEvalsRequest(string after, int? limit, internal virtual PipelineMessage CreateCreateEvalRequest(BinaryContent content, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier201; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/evals", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier201); + PipelineRequest request = message.Request; request.Headers.Set("Content-Type", "application/json"); request.Headers.Set("Accept", "application/json"); request.Content = content; @@ -67,15 +61,12 @@ internal virtual PipelineMessage CreateCreateEvalRequest(BinaryContent content, internal virtual PipelineMessage CreateGetEvalRequest(string evalId, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/evals/", false); uri.AppendPath(evalId, true); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -83,15 +74,12 @@ internal virtual PipelineMessage CreateGetEvalRequest(string evalId, RequestOpti internal virtual PipelineMessage CreateUpdateEvalRequest(string evalId, BinaryContent content, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/evals/", false); uri.AppendPath(evalId, true); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Content-Type", "application/json"); request.Headers.Set("Accept", "application/json"); request.Content = content; @@ -101,15 +89,12 @@ internal virtual PipelineMessage CreateUpdateEvalRequest(string evalId, BinaryCo internal virtual PipelineMessage CreateDeleteEvalRequest(string evalId, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "DELETE"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/evals/", false); uri.AppendPath(evalId, true); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "DELETE", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -117,10 +102,6 @@ internal virtual PipelineMessage CreateDeleteEvalRequest(string evalId, RequestO internal virtual PipelineMessage CreateGetEvalRunsRequest(string evalId, string after, int? limit, string order, string status, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/evals/", false); @@ -142,7 +123,8 @@ internal virtual PipelineMessage CreateGetEvalRunsRequest(string evalId, string { uri.AppendQuery("status", status, true); } - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -150,16 +132,13 @@ internal virtual PipelineMessage CreateGetEvalRunsRequest(string evalId, string internal virtual PipelineMessage CreateCreateEvalRunRequest(string evalId, BinaryContent content, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier201; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/evals/", false); uri.AppendPath(evalId, true); uri.AppendPath("/runs", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier201); + PipelineRequest request = message.Request; request.Headers.Set("Content-Type", "application/json"); request.Headers.Set("Accept", "application/json"); request.Content = content; @@ -169,17 +148,14 @@ internal virtual PipelineMessage CreateCreateEvalRunRequest(string evalId, Binar internal virtual PipelineMessage CreateGetEvalRunRequest(string evalId, string runId, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/evals/", false); uri.AppendPath(evalId, true); uri.AppendPath("/runs/", false); uri.AppendPath(runId, true); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -187,17 +163,14 @@ internal virtual PipelineMessage CreateGetEvalRunRequest(string evalId, string r internal virtual PipelineMessage CreateCancelEvalRunRequest(string evalId, string runId, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/evals/", false); uri.AppendPath(evalId, true); uri.AppendPath("/runs/", false); uri.AppendPath(runId, true); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -205,17 +178,14 @@ internal virtual PipelineMessage CreateCancelEvalRunRequest(string evalId, strin internal virtual PipelineMessage CreateDeleteEvalRunRequest(string evalId, string runId, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "DELETE"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/evals/", false); uri.AppendPath(evalId, true); uri.AppendPath("/runs/", false); uri.AppendPath(runId, true); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "DELETE", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -223,10 +193,6 @@ internal virtual PipelineMessage CreateDeleteEvalRunRequest(string evalId, strin internal virtual PipelineMessage CreateGetEvalRunOutputItemsRequest(string evalId, string runId, string after, int? limit, string status, string order, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/evals/", false); @@ -250,7 +216,8 @@ internal virtual PipelineMessage CreateGetEvalRunOutputItemsRequest(string evalI { uri.AppendQuery("order", order, true); } - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -258,10 +225,6 @@ internal virtual PipelineMessage CreateGetEvalRunOutputItemsRequest(string evalI internal virtual PipelineMessage CreateGetEvalRunOutputItemRequest(string evalId, string runId, string outputItemId, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/evals/", false); @@ -270,7 +233,8 @@ internal virtual PipelineMessage CreateGetEvalRunOutputItemRequest(string evalId uri.AppendPath(runId, true); uri.AppendPath("/output_items/", false); uri.AppendPath(outputItemId, true); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; diff --git a/src/Generated/FineTuningClient.RestClient.cs b/src/Generated/FineTuningClient.RestClient.cs index 5208a4590..27e60988a 100644 --- a/src/Generated/FineTuningClient.RestClient.cs +++ b/src/Generated/FineTuningClient.RestClient.cs @@ -16,10 +16,6 @@ public partial class FineTuningClient internal virtual PipelineMessage CreateGetFineTuningCheckpointPermissionsRequest(string fineTunedModelCheckpoint, string after, int? limit, string order, string projectId, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/fine_tuning/checkpoints/", false); @@ -41,7 +37,8 @@ internal virtual PipelineMessage CreateGetFineTuningCheckpointPermissionsRequest { uri.AppendQuery("project_id", projectId, true); } - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -49,16 +46,13 @@ internal virtual PipelineMessage CreateGetFineTuningCheckpointPermissionsRequest internal virtual PipelineMessage CreateCreateFineTuningCheckpointPermissionRequest(string fineTunedModelCheckpoint, BinaryContent content, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/fine_tuning/checkpoints/", false); uri.AppendPath(fineTunedModelCheckpoint, true); uri.AppendPath("/permissions", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Content-Type", "application/json"); request.Headers.Set("Accept", "application/json"); request.Content = content; @@ -68,17 +62,14 @@ internal virtual PipelineMessage CreateCreateFineTuningCheckpointPermissionReque internal virtual PipelineMessage CreateDeleteFineTuningCheckpointPermissionRequest(string fineTunedModelCheckpoint, string permissionId, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "DELETE"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/fine_tuning/checkpoints/", false); uri.AppendPath(fineTunedModelCheckpoint, true); uri.AppendPath("/permissions/", false); uri.AppendPath(permissionId, true); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "DELETE", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -86,14 +77,11 @@ internal virtual PipelineMessage CreateDeleteFineTuningCheckpointPermissionReque internal virtual PipelineMessage CreateCreateFineTuningJobRequest(BinaryContent content, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/fine_tuning/jobs", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); request.Headers.Set("Content-Type", "application/json"); request.Content = content; @@ -103,10 +91,6 @@ internal virtual PipelineMessage CreateCreateFineTuningJobRequest(BinaryContent internal virtual PipelineMessage CreateGetPaginatedFineTuningJobsRequest(string after, int? limit, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/fine_tuning/jobs", false); @@ -118,7 +102,8 @@ internal virtual PipelineMessage CreateGetPaginatedFineTuningJobsRequest(string { uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit, null), true); } - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -126,15 +111,12 @@ internal virtual PipelineMessage CreateGetPaginatedFineTuningJobsRequest(string internal virtual PipelineMessage CreateRetrieveFineTuningJobRequest(string fineTuningJobId, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/fine_tuning/jobs/", false); uri.AppendPath(fineTuningJobId, true); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -142,16 +124,13 @@ internal virtual PipelineMessage CreateRetrieveFineTuningJobRequest(string fineT internal virtual PipelineMessage CreateCancelFineTuningJobRequest(string fineTuningJobId, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/fine_tuning/jobs/", false); uri.AppendPath(fineTuningJobId, true); uri.AppendPath("/cancel", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -159,10 +138,6 @@ internal virtual PipelineMessage CreateCancelFineTuningJobRequest(string fineTun internal virtual PipelineMessage CreateGetFineTuningJobCheckpointsRequest(string fineTuningJobId, string after, int? limit, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/fine_tuning/jobs/", false); @@ -176,7 +151,8 @@ internal virtual PipelineMessage CreateGetFineTuningJobCheckpointsRequest(string { uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit, null), true); } - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -184,10 +160,6 @@ internal virtual PipelineMessage CreateGetFineTuningJobCheckpointsRequest(string internal virtual PipelineMessage CreateGetFineTuningEventsRequest(string fineTuningJobId, string after, int? limit, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/fine_tuning/jobs/", false); @@ -201,7 +173,8 @@ internal virtual PipelineMessage CreateGetFineTuningEventsRequest(string fineTun { uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit, null), true); } - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -209,16 +182,13 @@ internal virtual PipelineMessage CreateGetFineTuningEventsRequest(string fineTun internal virtual PipelineMessage CreatePauseFineTuningJobRequest(string fineTuningJobId, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/fine_tuning/jobs/", false); uri.AppendPath(fineTuningJobId, true); uri.AppendPath("/pause", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -226,16 +196,13 @@ internal virtual PipelineMessage CreatePauseFineTuningJobRequest(string fineTuni internal virtual PipelineMessage CreateResumeFineTuningJobRequest(string fineTuningJobId, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/fine_tuning/jobs/", false); uri.AppendPath(fineTuningJobId, true); uri.AppendPath("/resume", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; diff --git a/src/Generated/GraderClient.RestClient.cs b/src/Generated/GraderClient.RestClient.cs index b34bc8d66..f6dfa5332 100644 --- a/src/Generated/GraderClient.RestClient.cs +++ b/src/Generated/GraderClient.RestClient.cs @@ -16,14 +16,11 @@ public partial class GraderClient internal virtual PipelineMessage CreateRunGraderRequest(BinaryContent content, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/fine_tuning/alpha/graders/run", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Content-Type", "application/json"); request.Headers.Set("Accept", "application/json"); request.Content = content; @@ -33,14 +30,11 @@ internal virtual PipelineMessage CreateRunGraderRequest(BinaryContent content, R internal virtual PipelineMessage CreateValidateGraderRequest(BinaryContent content, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/fine_tuning/alpha/graders/validate", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Content-Type", "application/json"); request.Headers.Set("Accept", "application/json"); request.Content = content; diff --git a/src/Generated/ImageClient.RestClient.cs b/src/Generated/ImageClient.RestClient.cs index 0ecfd8c5b..c9e375eca 100644 --- a/src/Generated/ImageClient.RestClient.cs +++ b/src/Generated/ImageClient.RestClient.cs @@ -16,14 +16,11 @@ public partial class ImageClient internal virtual PipelineMessage CreateGenerateImagesRequest(BinaryContent content, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/images/generations", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); request.Headers.Set("Content-Type", "application/json"); request.Content = content; @@ -33,14 +30,11 @@ internal virtual PipelineMessage CreateGenerateImagesRequest(BinaryContent conte internal virtual PipelineMessage CreateGenerateImageEditsRequest(BinaryContent content, string contentType, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/images/edits", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); request.Headers.Set("Content-Type", contentType); request.Content = content; @@ -50,14 +44,11 @@ internal virtual PipelineMessage CreateGenerateImageEditsRequest(BinaryContent c internal virtual PipelineMessage CreateGenerateImageVariationsRequest(BinaryContent content, string contentType, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/images/variations", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); request.Headers.Set("Content-Type", contentType); request.Content = content; diff --git a/src/Generated/InternalAssistantMessageClient.RestClient.cs b/src/Generated/InternalAssistantMessageClient.RestClient.cs index 7647347f1..ab5d9b32c 100644 --- a/src/Generated/InternalAssistantMessageClient.RestClient.cs +++ b/src/Generated/InternalAssistantMessageClient.RestClient.cs @@ -16,16 +16,13 @@ internal partial class InternalAssistantMessageClient internal virtual PipelineMessage CreateCreateMessageRequest(string threadId, BinaryContent content, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/threads/", false); uri.AppendPath(threadId, true); uri.AppendPath("/messages", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); request.Headers.Set("OpenAI-Beta", "assistants=v2"); request.Headers.Set("Content-Type", "application/json"); @@ -36,10 +33,6 @@ internal virtual PipelineMessage CreateCreateMessageRequest(string threadId, Bin internal virtual PipelineMessage CreateGetMessagesRequest(string threadId, int? limit, string order, string after, string before, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/threads/", false); @@ -61,7 +54,8 @@ internal virtual PipelineMessage CreateGetMessagesRequest(string threadId, int? { uri.AppendQuery("before", before, true); } - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); request.Headers.Set("OpenAI-Beta", "assistants=v2"); message.Apply(options); @@ -70,17 +64,14 @@ internal virtual PipelineMessage CreateGetMessagesRequest(string threadId, int? internal virtual PipelineMessage CreateGetMessageRequest(string threadId, string messageId, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/threads/", false); uri.AppendPath(threadId, true); uri.AppendPath("/messages/", false); uri.AppendPath(messageId, true); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); request.Headers.Set("OpenAI-Beta", "assistants=v2"); message.Apply(options); @@ -89,17 +80,14 @@ internal virtual PipelineMessage CreateGetMessageRequest(string threadId, string internal virtual PipelineMessage CreateModifyMessageRequest(string threadId, string messageId, BinaryContent content, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/threads/", false); uri.AppendPath(threadId, true); uri.AppendPath("/messages/", false); uri.AppendPath(messageId, true); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); request.Headers.Set("OpenAI-Beta", "assistants=v2"); request.Headers.Set("Content-Type", "application/json"); @@ -110,17 +98,14 @@ internal virtual PipelineMessage CreateModifyMessageRequest(string threadId, str internal virtual PipelineMessage CreateDeleteMessageRequest(string threadId, string messageId, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "DELETE"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/threads/", false); uri.AppendPath(threadId, true); uri.AppendPath("/messages/", false); uri.AppendPath(messageId, true); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "DELETE", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); request.Headers.Set("OpenAI-Beta", "assistants=v2"); message.Apply(options); diff --git a/src/Generated/InternalAssistantRunClient.RestClient.cs b/src/Generated/InternalAssistantRunClient.RestClient.cs index 2474836b9..4b08005d3 100644 --- a/src/Generated/InternalAssistantRunClient.RestClient.cs +++ b/src/Generated/InternalAssistantRunClient.RestClient.cs @@ -17,14 +17,11 @@ internal partial class InternalAssistantRunClient internal virtual PipelineMessage CreateCreateThreadAndRunRequest(BinaryContent content, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/threads/runs", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json, text/event-stream"); request.Headers.Set("OpenAI-Beta", "assistants=v2"); request.Headers.Set("Content-Type", "application/json"); @@ -35,10 +32,6 @@ internal virtual PipelineMessage CreateCreateThreadAndRunRequest(BinaryContent c internal virtual PipelineMessage CreateCreateRunRequest(string threadId, BinaryContent content, IEnumerable include, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/threads/", false); @@ -48,7 +41,8 @@ internal virtual PipelineMessage CreateCreateRunRequest(string threadId, BinaryC { uri.AppendQueryDelimited("include[]", include, ",", null, true); } - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json, text/event-stream"); request.Headers.Set("OpenAI-Beta", "assistants=v2"); request.Headers.Set("Content-Type", "application/json"); @@ -59,10 +53,6 @@ internal virtual PipelineMessage CreateCreateRunRequest(string threadId, BinaryC internal virtual PipelineMessage CreateGetRunsRequest(string threadId, int? limit, string order, string after, string before, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/threads/", false); @@ -84,7 +74,8 @@ internal virtual PipelineMessage CreateGetRunsRequest(string threadId, int? limi { uri.AppendQuery("before", before, true); } - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); request.Headers.Set("OpenAI-Beta", "assistants=v2"); message.Apply(options); @@ -93,17 +84,14 @@ internal virtual PipelineMessage CreateGetRunsRequest(string threadId, int? limi internal virtual PipelineMessage CreateGetRunRequest(string threadId, string runId, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/threads/", false); uri.AppendPath(threadId, true); uri.AppendPath("/runs/", false); uri.AppendPath(runId, true); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); request.Headers.Set("OpenAI-Beta", "assistants=v2"); message.Apply(options); @@ -112,17 +100,14 @@ internal virtual PipelineMessage CreateGetRunRequest(string threadId, string run internal virtual PipelineMessage CreateModifyRunRequest(string threadId, string runId, BinaryContent content, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/threads/", false); uri.AppendPath(threadId, true); uri.AppendPath("/runs/", false); uri.AppendPath(runId, true); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); request.Headers.Set("OpenAI-Beta", "assistants=v2"); request.Headers.Set("Content-Type", "application/json"); @@ -133,10 +118,6 @@ internal virtual PipelineMessage CreateModifyRunRequest(string threadId, string internal virtual PipelineMessage CreateCancelRunRequest(string threadId, string runId, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/threads/", false); @@ -144,7 +125,8 @@ internal virtual PipelineMessage CreateCancelRunRequest(string threadId, string uri.AppendPath("/runs/", false); uri.AppendPath(runId, true); uri.AppendPath("/cancel", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); request.Headers.Set("OpenAI-Beta", "assistants=v2"); message.Apply(options); @@ -153,10 +135,6 @@ internal virtual PipelineMessage CreateCancelRunRequest(string threadId, string internal virtual PipelineMessage CreateSubmitToolOutputsToRunRequest(string threadId, string runId, BinaryContent content, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/threads/", false); @@ -164,7 +142,8 @@ internal virtual PipelineMessage CreateSubmitToolOutputsToRunRequest(string thre uri.AppendPath("/runs/", false); uri.AppendPath(runId, true); uri.AppendPath("/submit_tool_outputs", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json, text/event-stream"); request.Headers.Set("OpenAI-Beta", "assistants=v2"); request.Headers.Set("Content-Type", "application/json"); @@ -175,10 +154,6 @@ internal virtual PipelineMessage CreateSubmitToolOutputsToRunRequest(string thre internal virtual PipelineMessage CreateGetRunStepsRequest(string threadId, string runId, int? limit, string order, string after, string before, IEnumerable include, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/threads/", false); @@ -206,7 +181,8 @@ internal virtual PipelineMessage CreateGetRunStepsRequest(string threadId, strin { uri.AppendQueryDelimited("include[]", include, ",", null, true); } - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); request.Headers.Set("OpenAI-Beta", "assistants=v2"); message.Apply(options); @@ -215,10 +191,6 @@ internal virtual PipelineMessage CreateGetRunStepsRequest(string threadId, strin internal virtual PipelineMessage CreateGetRunStepRequest(string threadId, string runId, string stepId, IEnumerable include, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/threads/", false); @@ -231,7 +203,8 @@ internal virtual PipelineMessage CreateGetRunStepRequest(string threadId, string { uri.AppendQueryDelimited("include[]", include, ",", null, true); } - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); request.Headers.Set("OpenAI-Beta", "assistants=v2"); message.Apply(options); diff --git a/src/Generated/InternalAssistantThreadClient.RestClient.cs b/src/Generated/InternalAssistantThreadClient.RestClient.cs index 7608eceaa..d403068a5 100644 --- a/src/Generated/InternalAssistantThreadClient.RestClient.cs +++ b/src/Generated/InternalAssistantThreadClient.RestClient.cs @@ -16,14 +16,11 @@ internal partial class InternalAssistantThreadClient internal virtual PipelineMessage CreateCreateThreadRequest(BinaryContent content, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/threads", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); request.Headers.Set("OpenAI-Beta", "assistants=v2"); request.Headers.Set("Content-Type", "application/json"); @@ -34,15 +31,12 @@ internal virtual PipelineMessage CreateCreateThreadRequest(BinaryContent content internal virtual PipelineMessage CreateGetThreadRequest(string threadId, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/threads/", false); uri.AppendPath(threadId, true); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); request.Headers.Set("OpenAI-Beta", "assistants=v2"); message.Apply(options); @@ -51,15 +45,12 @@ internal virtual PipelineMessage CreateGetThreadRequest(string threadId, Request internal virtual PipelineMessage CreateModifyThreadRequest(string threadId, BinaryContent content, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/threads/", false); uri.AppendPath(threadId, true); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); request.Headers.Set("OpenAI-Beta", "assistants=v2"); request.Headers.Set("Content-Type", "application/json"); @@ -70,15 +61,12 @@ internal virtual PipelineMessage CreateModifyThreadRequest(string threadId, Bina internal virtual PipelineMessage CreateDeleteThreadRequest(string threadId, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "DELETE"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/threads/", false); uri.AppendPath(threadId, true); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "DELETE", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); request.Headers.Set("OpenAI-Beta", "assistants=v2"); message.Apply(options); diff --git a/src/Generated/InternalUploadsClient.RestClient.cs b/src/Generated/InternalUploadsClient.RestClient.cs index 37ec553a5..8330dd50d 100644 --- a/src/Generated/InternalUploadsClient.RestClient.cs +++ b/src/Generated/InternalUploadsClient.RestClient.cs @@ -16,14 +16,11 @@ internal partial class InternalUploadsClient internal virtual PipelineMessage CreateCreateUploadRequest(BinaryContent content, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/uploads", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); request.Headers.Set("Content-Type", "application/json"); request.Content = content; @@ -33,16 +30,13 @@ internal virtual PipelineMessage CreateCreateUploadRequest(BinaryContent content internal virtual PipelineMessage CreateAddUploadPartRequest(string uploadId, BinaryContent content, string contentType, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/uploads/", false); uri.AppendPath(uploadId, true); uri.AppendPath("/parts", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); request.Headers.Set("Content-Type", contentType); request.Content = content; @@ -52,16 +46,13 @@ internal virtual PipelineMessage CreateAddUploadPartRequest(string uploadId, Bin internal virtual PipelineMessage CreateCompleteUploadRequest(string uploadId, BinaryContent content, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/uploads/", false); uri.AppendPath(uploadId, true); uri.AppendPath("/complete", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); request.Headers.Set("Content-Type", "application/json"); request.Content = content; @@ -71,16 +62,13 @@ internal virtual PipelineMessage CreateCompleteUploadRequest(string uploadId, Bi internal virtual PipelineMessage CreateCancelUploadRequest(string uploadId, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/uploads/", false); uri.AppendPath(uploadId, true); uri.AppendPath("/cancel", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; diff --git a/src/Generated/LegacyCompletionClient.RestClient.cs b/src/Generated/LegacyCompletionClient.RestClient.cs index e4a52c7b5..94fff12e4 100644 --- a/src/Generated/LegacyCompletionClient.RestClient.cs +++ b/src/Generated/LegacyCompletionClient.RestClient.cs @@ -16,14 +16,11 @@ internal partial class LegacyCompletionClient internal virtual PipelineMessage CreateCreateCompletionRequest(BinaryContent content, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/completions", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); request.Headers.Set("Content-Type", "application/json"); request.Content = content; diff --git a/src/Generated/ModerationClient.RestClient.cs b/src/Generated/ModerationClient.RestClient.cs index 60dbb8c37..43af16583 100644 --- a/src/Generated/ModerationClient.RestClient.cs +++ b/src/Generated/ModerationClient.RestClient.cs @@ -16,14 +16,11 @@ public partial class ModerationClient internal virtual PipelineMessage CreateClassifyTextRequest(BinaryContent content, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/moderations", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); request.Headers.Set("Content-Type", "application/json"); request.Content = content; diff --git a/src/Generated/OpenAIFileClient.RestClient.cs b/src/Generated/OpenAIFileClient.RestClient.cs index 4df2b028e..30acfa400 100644 --- a/src/Generated/OpenAIFileClient.RestClient.cs +++ b/src/Generated/OpenAIFileClient.RestClient.cs @@ -16,10 +16,6 @@ public partial class OpenAIFileClient internal virtual PipelineMessage CreateGetFilesRequest(string purpose, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/files", false); @@ -27,7 +23,8 @@ internal virtual PipelineMessage CreateGetFilesRequest(string purpose, RequestOp { uri.AppendQuery("purpose", purpose, true); } - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -35,14 +32,11 @@ internal virtual PipelineMessage CreateGetFilesRequest(string purpose, RequestOp internal virtual PipelineMessage CreateUploadFileRequest(BinaryContent content, string contentType, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/files", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); request.Headers.Set("Content-Type", contentType); request.Content = content; @@ -52,15 +46,12 @@ internal virtual PipelineMessage CreateUploadFileRequest(BinaryContent content, internal virtual PipelineMessage CreateDeleteFileRequest(string fileId, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "DELETE"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/files/", false); uri.AppendPath(fileId, true); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "DELETE", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -68,15 +59,12 @@ internal virtual PipelineMessage CreateDeleteFileRequest(string fileId, RequestO internal virtual PipelineMessage CreateGetFileRequest(string fileId, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/files/", false); uri.AppendPath(fileId, true); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -84,16 +72,13 @@ internal virtual PipelineMessage CreateGetFileRequest(string fileId, RequestOpti internal virtual PipelineMessage CreateDownloadFileRequest(string fileId, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/files/", false); uri.AppendPath(fileId, true); uri.AppendPath("/content", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; diff --git a/src/Generated/OpenAIModelClient.RestClient.cs b/src/Generated/OpenAIModelClient.RestClient.cs index 4114b8d72..338b70969 100644 --- a/src/Generated/OpenAIModelClient.RestClient.cs +++ b/src/Generated/OpenAIModelClient.RestClient.cs @@ -15,14 +15,11 @@ public partial class OpenAIModelClient internal virtual PipelineMessage CreateGetModelsRequest(RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/models", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -30,15 +27,12 @@ internal virtual PipelineMessage CreateGetModelsRequest(RequestOptions options) internal virtual PipelineMessage CreateRetrieveModelRequest(string model, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/models/", false); uri.AppendPath(model, true); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -46,15 +40,12 @@ internal virtual PipelineMessage CreateRetrieveModelRequest(string model, Reques internal virtual PipelineMessage CreateDeleteModelRequest(string model, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "DELETE"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/models/", false); uri.AppendPath(model, true); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "DELETE", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; diff --git a/src/Generated/OpenAIResponseClient.RestClient.cs b/src/Generated/OpenAIResponseClient.RestClient.cs index 25c1cd5db..6358d7874 100644 --- a/src/Generated/OpenAIResponseClient.RestClient.cs +++ b/src/Generated/OpenAIResponseClient.RestClient.cs @@ -17,14 +17,11 @@ public partial class OpenAIResponseClient internal virtual PipelineMessage CreateCreateResponseRequest(BinaryContent content, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/responses", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json, text/event-stream"); request.Headers.Set("Content-Type", "application/json"); request.Content = content; @@ -34,10 +31,6 @@ internal virtual PipelineMessage CreateCreateResponseRequest(BinaryContent conte internal virtual PipelineMessage CreateGetResponseRequest(string responseId, IEnumerable includables, bool? stream, int? startingAfter, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/responses/", false); @@ -57,7 +50,8 @@ internal virtual PipelineMessage CreateGetResponseRequest(string responseId, IEn { uri.AppendQuery("starting_after", TypeFormatters.ConvertToString(startingAfter, null), true); } - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json, text/event-stream"); message.Apply(options); return message; @@ -65,15 +59,12 @@ internal virtual PipelineMessage CreateGetResponseRequest(string responseId, IEn internal virtual PipelineMessage CreateDeleteResponseRequest(string responseId, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "DELETE"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/responses/", false); uri.AppendPath(responseId, true); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "DELETE", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -81,16 +72,13 @@ internal virtual PipelineMessage CreateDeleteResponseRequest(string responseId, internal virtual PipelineMessage CreateCancelResponseRequest(string responseId, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/responses/", false); uri.AppendPath(responseId, true); uri.AppendPath("/cancel", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -98,10 +86,6 @@ internal virtual PipelineMessage CreateCancelResponseRequest(string responseId, internal virtual PipelineMessage CreateGetInputItemsRequest(string responseId, int? limit, string order, string after, string before, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/responses/", false); @@ -123,7 +107,8 @@ internal virtual PipelineMessage CreateGetInputItemsRequest(string responseId, i { uri.AppendQuery("before", before, true); } - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; diff --git a/src/Generated/RealtimeClient.RestClient.cs b/src/Generated/RealtimeClient.RestClient.cs index eec778dcb..64de26acf 100644 --- a/src/Generated/RealtimeClient.RestClient.cs +++ b/src/Generated/RealtimeClient.RestClient.cs @@ -16,14 +16,11 @@ public partial class RealtimeClient internal virtual PipelineMessage CreateCreateEphemeralTokenRequest(BinaryContent content, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/realtime/sessions", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Content-Type", "application/json"); request.Headers.Set("Accept", "application/json"); request.Content = content; @@ -33,14 +30,11 @@ internal virtual PipelineMessage CreateCreateEphemeralTokenRequest(BinaryContent internal virtual PipelineMessage CreateCreateEphemeralTranscriptionTokenRequest(BinaryContent content, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/realtime/transcription_sessions", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Content-Type", "application/json"); request.Headers.Set("Accept", "application/json"); request.Content = content; diff --git a/src/Generated/VectorStoreClient.RestClient.cs b/src/Generated/VectorStoreClient.RestClient.cs index 17c4203b8..050c7a367 100644 --- a/src/Generated/VectorStoreClient.RestClient.cs +++ b/src/Generated/VectorStoreClient.RestClient.cs @@ -16,10 +16,6 @@ public partial class VectorStoreClient internal virtual PipelineMessage CreateGetVectorStoresRequest(int? limit, string order, string after, string before, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/vector_stores", false); @@ -39,7 +35,8 @@ internal virtual PipelineMessage CreateGetVectorStoresRequest(int? limit, string { uri.AppendQuery("before", before, true); } - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -47,14 +44,11 @@ internal virtual PipelineMessage CreateGetVectorStoresRequest(int? limit, string internal virtual PipelineMessage CreateCreateVectorStoreRequest(BinaryContent content, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/vector_stores", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); request.Headers.Set("Content-Type", "application/json"); request.Content = content; @@ -64,15 +58,12 @@ internal virtual PipelineMessage CreateCreateVectorStoreRequest(BinaryContent co internal virtual PipelineMessage CreateGetVectorStoreRequest(string vectorStoreId, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/vector_stores/", false); uri.AppendPath(vectorStoreId, true); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -80,15 +71,12 @@ internal virtual PipelineMessage CreateGetVectorStoreRequest(string vectorStoreI internal virtual PipelineMessage CreateModifyVectorStoreRequest(string vectorStoreId, BinaryContent content, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/vector_stores/", false); uri.AppendPath(vectorStoreId, true); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); request.Headers.Set("Content-Type", "application/json"); request.Content = content; @@ -98,15 +86,12 @@ internal virtual PipelineMessage CreateModifyVectorStoreRequest(string vectorSto internal virtual PipelineMessage CreateDeleteVectorStoreRequest(string vectorStoreId, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "DELETE"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/vector_stores/", false); uri.AppendPath(vectorStoreId, true); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "DELETE", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -114,16 +99,13 @@ internal virtual PipelineMessage CreateDeleteVectorStoreRequest(string vectorSto internal virtual PipelineMessage CreateCreateVectorStoreFileBatchRequest(string vectorStoreId, BinaryContent content, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/vector_stores/", false); uri.AppendPath(vectorStoreId, true); uri.AppendPath("/file_batches", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); request.Headers.Set("Content-Type", "application/json"); request.Content = content; @@ -133,17 +115,14 @@ internal virtual PipelineMessage CreateCreateVectorStoreFileBatchRequest(string internal virtual PipelineMessage CreateGetVectorStoreFileBatchRequest(string vectorStoreId, string batchId, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/vector_stores/", false); uri.AppendPath(vectorStoreId, true); uri.AppendPath("/file_batches/", false); uri.AppendPath(batchId, true); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -151,10 +130,6 @@ internal virtual PipelineMessage CreateGetVectorStoreFileBatchRequest(string vec internal virtual PipelineMessage CreateCancelBatchFileJobRequest(string vectorStoreId, string batchId, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/vector_stores/", false); @@ -162,7 +137,8 @@ internal virtual PipelineMessage CreateCancelBatchFileJobRequest(string vectorSt uri.AppendPath("/file_batches/", false); uri.AppendPath(batchId, true); uri.AppendPath("/cancel", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -170,10 +146,6 @@ internal virtual PipelineMessage CreateCancelBatchFileJobRequest(string vectorSt internal virtual PipelineMessage CreateGetFileAssociationsInBatchRequest(string vectorStoreId, string batchId, int? limit, string order, string after, string before, string filter, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/vector_stores/", false); @@ -201,7 +173,8 @@ internal virtual PipelineMessage CreateGetFileAssociationsInBatchRequest(string { uri.AppendQuery("filter", filter, true); } - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -209,10 +182,6 @@ internal virtual PipelineMessage CreateGetFileAssociationsInBatchRequest(string internal virtual PipelineMessage CreateGetFileAssociationsRequest(string vectorStoreId, int? limit, string order, string after, string before, string filter, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/vector_stores/", false); @@ -238,7 +207,8 @@ internal virtual PipelineMessage CreateGetFileAssociationsRequest(string vectorS { uri.AppendQuery("filter", filter, true); } - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -246,16 +216,13 @@ internal virtual PipelineMessage CreateGetFileAssociationsRequest(string vectorS internal virtual PipelineMessage CreateCreateVectorStoreFileRequest(string vectorStoreId, BinaryContent content, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/vector_stores/", false); uri.AppendPath(vectorStoreId, true); uri.AppendPath("/files", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); request.Headers.Set("Content-Type", "application/json"); request.Content = content; @@ -265,17 +232,14 @@ internal virtual PipelineMessage CreateCreateVectorStoreFileRequest(string vecto internal virtual PipelineMessage CreateGetFileAssociationRequest(string vectorStoreId, string fileId, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/vector_stores/", false); uri.AppendPath(vectorStoreId, true); uri.AppendPath("/files/", false); uri.AppendPath(fileId, true); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -283,17 +247,14 @@ internal virtual PipelineMessage CreateGetFileAssociationRequest(string vectorSt internal virtual PipelineMessage CreateRemoveFileFromStoreRequest(string vectorStoreId, string fileId, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "DELETE"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/vector_stores/", false); uri.AppendPath(vectorStoreId, true); uri.AppendPath("/files/", false); uri.AppendPath(fileId, true); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "DELETE", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -301,17 +262,14 @@ internal virtual PipelineMessage CreateRemoveFileFromStoreRequest(string vectorS internal virtual PipelineMessage CreateUpdateVectorStoreFileAttributesRequest(string vectorStoreId, string fileId, BinaryContent content, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/vector_stores/", false); uri.AppendPath(vectorStoreId, true); uri.AppendPath("/files/", false); uri.AppendPath(fileId, true); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Content-Type", "application/json"); request.Headers.Set("Accept", "application/json"); request.Content = content; @@ -321,10 +279,6 @@ internal virtual PipelineMessage CreateUpdateVectorStoreFileAttributesRequest(st internal virtual PipelineMessage CreateRetrieveVectorStoreFileContentRequest(string vectorStoreId, string fileId, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "GET"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/vector_stores/", false); @@ -332,7 +286,8 @@ internal virtual PipelineMessage CreateRetrieveVectorStoreFileContentRequest(str uri.AppendPath("/files/", false); uri.AppendPath(fileId, true); uri.AppendPath("/content", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; @@ -340,16 +295,13 @@ internal virtual PipelineMessage CreateRetrieveVectorStoreFileContentRequest(str internal virtual PipelineMessage CreateSearchVectorStoreRequest(string vectorStoreId, BinaryContent content, RequestOptions options) { - PipelineMessage message = Pipeline.CreateMessage(); - message.ResponseClassifier = PipelineMessageClassifier200; - PipelineRequest request = message.Request; - request.Method = "POST"; ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/vector_stores/", false); uri.AppendPath(vectorStoreId, true); uri.AppendPath("/search", false); - request.Uri = uri.ToUri(); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; request.Headers.Set("Content-Type", "application/json"); request.Headers.Set("Accept", "application/json"); request.Content = content;