├── .github ├── dependabot.yml └── workflows │ ├── dotnet.yml │ └── pull-request.yml ├── .gitignore ├── LICENSE ├── Poe.sln ├── README.md ├── assets └── nuget_icon.png └── src ├── Directory.Build.props ├── key.snk ├── libs ├── Directory.Build.props └── Poe │ ├── Models │ ├── Payload.cs │ └── PayloadItem.cs │ ├── PayloadGenerator.cs │ ├── Poe.csproj │ ├── PoeApi.Authorization.cs │ ├── PoeApi.Constructors.cs │ ├── PoeApi.cs │ └── Resources │ └── queries.json └── tests └── Poe.IntegrationTests ├── Poe.IntegrationTests.csproj └── Tests.cs /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: "nuget" # See documentation for possible values 9 | directory: "/" # Location of package manifests 10 | schedule: 11 | interval: "weekly" 12 | groups: 13 | all: 14 | patterns: 15 | - "*" 16 | -------------------------------------------------------------------------------- /.github/workflows/dotnet.yml: -------------------------------------------------------------------------------- 1 | name: Build, test and publish 2 | on: 3 | push: 4 | branches: 5 | - main 6 | 7 | jobs: 8 | build-test-publish: 9 | name: Build, test and publish 10 | uses: HavenDV/workflows/.github/workflows/dotnet_build-test-publish.yml@main 11 | with: 12 | generate-build-number: false 13 | conventional-commits-publish-conditions: false 14 | additional-test-arguments: '--logger GitHubActions' 15 | secrets: 16 | nuget-key: ${{ secrets.NUGET_KEY }} -------------------------------------------------------------------------------- /.github/workflows/pull-request.yml: -------------------------------------------------------------------------------- 1 | name: Build and test 2 | on: 3 | pull_request: 4 | branches: 5 | - main 6 | 7 | jobs: 8 | build-test: 9 | name: Build abd test 10 | uses: HavenDV/workflows/.github/workflows/dotnet_build-test-publish.yml@main 11 | with: 12 | generate-build-number: false 13 | conventional-commits-publish-conditions: false 14 | enable-caching: false 15 | additional-test-arguments: '--logger GitHubActions' -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Ww][Ii][Nn]32/ 27 | [Aa][Rr][Mm]/ 28 | [Aa][Rr][Mm]64/ 29 | bld/ 30 | [Bb]in/ 31 | [Oo]bj/ 32 | [Ll]og/ 33 | [Ll]ogs/ 34 | 35 | # Visual Studio 2015/2017 cache/options directory 36 | .vs/ 37 | # Uncomment if you have tasks that create the project's static files in wwwroot 38 | #wwwroot/ 39 | 40 | # Visual Studio 2017 auto generated files 41 | Generated\ Files/ 42 | 43 | # MSTest test Results 44 | [Tt]est[Rr]esult*/ 45 | [Bb]uild[Ll]og.* 46 | 47 | # NUnit 48 | *.VisualState.xml 49 | TestResult.xml 50 | nunit-*.xml 51 | 52 | # Build Results of an ATL Project 53 | [Dd]ebugPS/ 54 | [Rr]eleasePS/ 55 | dlldata.c 56 | 57 | # Benchmark Results 58 | BenchmarkDotNet.Artifacts/ 59 | 60 | # .NET Core 61 | project.lock.json 62 | project.fragment.lock.json 63 | artifacts/ 64 | 65 | # ASP.NET Scaffolding 66 | ScaffoldingReadMe.txt 67 | 68 | # StyleCop 69 | StyleCopReport.xml 70 | 71 | # Files built by Visual Studio 72 | *_i.c 73 | *_p.c 74 | *_h.h 75 | *.ilk 76 | *.meta 77 | *.obj 78 | *.iobj 79 | *.pch 80 | *.pdb 81 | *.ipdb 82 | *.pgc 83 | *.pgd 84 | *.rsp 85 | *.sbr 86 | *.tlb 87 | *.tli 88 | *.tlh 89 | *.tmp 90 | *.tmp_proj 91 | *_wpftmp.csproj 92 | *.log 93 | *.tlog 94 | *.vspscc 95 | *.vssscc 96 | .builds 97 | *.pidb 98 | *.svclog 99 | *.scc 100 | 101 | # Chutzpah Test files 102 | _Chutzpah* 103 | 104 | # Visual C++ cache files 105 | ipch/ 106 | *.aps 107 | *.ncb 108 | *.opendb 109 | *.opensdf 110 | *.sdf 111 | *.cachefile 112 | *.VC.db 113 | *.VC.VC.opendb 114 | 115 | # Visual Studio profiler 116 | *.psess 117 | *.vsp 118 | *.vspx 119 | *.sap 120 | 121 | # Visual Studio Trace Files 122 | *.e2e 123 | 124 | # TFS 2012 Local Workspace 125 | $tf/ 126 | 127 | # Guidance Automation Toolkit 128 | *.gpState 129 | 130 | # ReSharper is a .NET coding add-in 131 | _ReSharper*/ 132 | *.[Rr]e[Ss]harper 133 | *.DotSettings.user 134 | 135 | # TeamCity is a build add-in 136 | _TeamCity* 137 | 138 | # DotCover is a Code Coverage Tool 139 | *.dotCover 140 | 141 | # AxoCover is a Code Coverage Tool 142 | .axoCover/* 143 | !.axoCover/settings.json 144 | 145 | # Coverlet is a free, cross platform Code Coverage Tool 146 | coverage*.json 147 | coverage*.xml 148 | coverage*.info 149 | 150 | # Visual Studio code coverage results 151 | *.coverage 152 | *.coveragexml 153 | 154 | # NCrunch 155 | _NCrunch_* 156 | .*crunch*.local.xml 157 | nCrunchTemp_* 158 | 159 | # MightyMoose 160 | *.mm.* 161 | AutoTest.Net/ 162 | 163 | # Web workbench (sass) 164 | .sass-cache/ 165 | 166 | # Installshield output folder 167 | [Ee]xpress/ 168 | 169 | # DocProject is a documentation generator add-in 170 | DocProject/buildhelp/ 171 | DocProject/Help/*.HxT 172 | DocProject/Help/*.HxC 173 | DocProject/Help/*.hhc 174 | DocProject/Help/*.hhk 175 | DocProject/Help/*.hhp 176 | DocProject/Help/Html2 177 | DocProject/Help/html 178 | 179 | # Click-Once directory 180 | publish/ 181 | 182 | # Publish Web Output 183 | *.[Pp]ublish.xml 184 | *.azurePubxml 185 | # Note: Comment the next line if you want to checkin your web deploy settings, 186 | # but database connection strings (with potential passwords) will be unencrypted 187 | *.pubxml 188 | *.publishproj 189 | 190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 191 | # checkin your Azure Web App publish settings, but sensitive information contained 192 | # in these scripts will be unencrypted 193 | PublishScripts/ 194 | 195 | # NuGet Packages 196 | *.nupkg 197 | # NuGet Symbol Packages 198 | *.snupkg 199 | # The packages folder can be ignored because of Package Restore 200 | **/[Pp]ackages/* 201 | # except build/, which is used as an MSBuild target. 202 | !**/[Pp]ackages/build/ 203 | # Uncomment if necessary however generally it will be regenerated when needed 204 | #!**/[Pp]ackages/repositories.config 205 | # NuGet v3's project.json files produces more ignorable files 206 | *.nuget.props 207 | *.nuget.targets 208 | 209 | # Microsoft Azure Build Output 210 | csx/ 211 | *.build.csdef 212 | 213 | # Microsoft Azure Emulator 214 | ecf/ 215 | rcf/ 216 | 217 | # Windows Store app package directories and files 218 | AppPackages/ 219 | BundleArtifacts/ 220 | Package.StoreAssociation.xml 221 | _pkginfo.txt 222 | *.appx 223 | *.appxbundle 224 | *.appxupload 225 | 226 | # Visual Studio cache files 227 | # files ending in .cache can be ignored 228 | *.[Cc]ache 229 | # but keep track of directories ending in .cache 230 | !?*.[Cc]ache/ 231 | 232 | # Others 233 | ClientBin/ 234 | ~$* 235 | *~ 236 | *.dbmdl 237 | *.dbproj.schemaview 238 | *.jfm 239 | *.pfx 240 | *.publishsettings 241 | orleans.codegen.cs 242 | 243 | # Including strong name files can present a security risk 244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 245 | #*.snk 246 | 247 | # Since there are multiple workflows, uncomment next line to ignore bower_components 248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 249 | #bower_components/ 250 | 251 | # RIA/Silverlight projects 252 | Generated_Code/ 253 | 254 | # Backup & report files from converting an old project file 255 | # to a newer Visual Studio version. Backup files are not needed, 256 | # because we have git ;-) 257 | _UpgradeReport_Files/ 258 | Backup*/ 259 | UpgradeLog*.XML 260 | UpgradeLog*.htm 261 | ServiceFabricBackup/ 262 | *.rptproj.bak 263 | 264 | # SQL Server files 265 | *.mdf 266 | *.ldf 267 | *.ndf 268 | 269 | # Business Intelligence projects 270 | *.rdl.data 271 | *.bim.layout 272 | *.bim_*.settings 273 | *.rptproj.rsuser 274 | *- [Bb]ackup.rdl 275 | *- [Bb]ackup ([0-9]).rdl 276 | *- [Bb]ackup ([0-9][0-9]).rdl 277 | 278 | # Microsoft Fakes 279 | FakesAssemblies/ 280 | 281 | # GhostDoc plugin setting file 282 | *.GhostDoc.xml 283 | 284 | # Node.js Tools for Visual Studio 285 | .ntvs_analysis.dat 286 | node_modules/ 287 | 288 | # Visual Studio 6 build log 289 | *.plg 290 | 291 | # Visual Studio 6 workspace options file 292 | *.opt 293 | 294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 295 | *.vbw 296 | 297 | # Visual Studio 6 auto-generated project file (contains which files were open etc.) 298 | *.vbp 299 | 300 | # Visual Studio 6 workspace and project file (working project files containing files to include in project) 301 | *.dsw 302 | *.dsp 303 | 304 | # Visual Studio 6 technical files 305 | *.ncb 306 | *.aps 307 | 308 | # Visual Studio LightSwitch build output 309 | **/*.HTMLClient/GeneratedArtifacts 310 | **/*.DesktopClient/GeneratedArtifacts 311 | **/*.DesktopClient/ModelManifest.xml 312 | **/*.Server/GeneratedArtifacts 313 | **/*.Server/ModelManifest.xml 314 | _Pvt_Extensions 315 | 316 | # Paket dependency manager 317 | .paket/paket.exe 318 | paket-files/ 319 | 320 | # FAKE - F# Make 321 | .fake/ 322 | 323 | # CodeRush personal settings 324 | .cr/personal 325 | 326 | # Python Tools for Visual Studio (PTVS) 327 | __pycache__/ 328 | *.pyc 329 | 330 | # Cake - Uncomment if you are using it 331 | # tools/** 332 | # !tools/packages.config 333 | 334 | # Tabs Studio 335 | *.tss 336 | 337 | # Telerik's JustMock configuration file 338 | *.jmconfig 339 | 340 | # BizTalk build output 341 | *.btp.cs 342 | *.btm.cs 343 | *.odx.cs 344 | *.xsd.cs 345 | 346 | # OpenCover UI analysis results 347 | OpenCover/ 348 | 349 | # Azure Stream Analytics local run output 350 | ASALocalRun/ 351 | 352 | # MSBuild Binary and Structured Log 353 | *.binlog 354 | 355 | # NVidia Nsight GPU debugger configuration file 356 | *.nvuser 357 | 358 | # MFractors (Xamarin productivity tool) working folder 359 | .mfractor/ 360 | 361 | # Local History for Visual Studio 362 | .localhistory/ 363 | 364 | # Visual Studio History (VSHistory) files 365 | .vshistory/ 366 | 367 | # BeatPulse healthcheck temp database 368 | healthchecksdb 369 | 370 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 371 | MigrationBackup/ 372 | 373 | # Ionide (cross platform F# VS Code tools) working folder 374 | .ionide/ 375 | 376 | # Fody - auto-generated XML schema 377 | FodyWeavers.xsd 378 | 379 | # VS Code files for those working on multiple tools 380 | .vscode/* 381 | !.vscode/settings.json 382 | !.vscode/tasks.json 383 | !.vscode/launch.json 384 | !.vscode/extensions.json 385 | *.code-workspace 386 | 387 | # Local History for Visual Studio Code 388 | .history/ 389 | 390 | # Windows Installer files from build outputs 391 | *.cab 392 | *.msi 393 | *.msix 394 | *.msm 395 | *.msp 396 | 397 | # JetBrains Rider 398 | *.sln.iml 399 | /.idea/ 400 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 tryAGI 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Poe.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.30204.135 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{E793AF18-4371-4EBD-96FC-195EB1798855}" 7 | ProjectSection(SolutionItems) = preProject 8 | .gitignore = .gitignore 9 | src\Directory.Build.props = src\Directory.Build.props 10 | .github\workflows\dotnet.yml = .github\workflows\dotnet.yml 11 | LICENSE = LICENSE 12 | README.md = README.md 13 | .github\workflows\pull-request.yml = .github\workflows\pull-request.yml 14 | EndProjectSection 15 | EndProject 16 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "libs", "libs", "{61E7E11E-4558-434C-ACE8-06316A3097B3}" 17 | ProjectSection(SolutionItems) = preProject 18 | src\libs\Directory.Build.props = src\libs\Directory.Build.props 19 | EndProjectSection 20 | EndProject 21 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{AAA11B78-2764-4520-A97E-46AA7089A588}" 22 | EndProject 23 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Poe", "src\libs\Poe\Poe.csproj", "{B83B3177-EA27-4470-B859-B45507FC9F01}" 24 | EndProject 25 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Poe.IntegrationTests", "src\tests\Poe.IntegrationTests\Poe.IntegrationTests.csproj", "{0BBF80F4-1ED3-4082-BCDA-15FA073111D8}" 26 | EndProject 27 | Global 28 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 29 | Debug|Any CPU = Debug|Any CPU 30 | Release|Any CPU = Release|Any CPU 31 | EndGlobalSection 32 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 33 | {B83B3177-EA27-4470-B859-B45507FC9F01}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 34 | {B83B3177-EA27-4470-B859-B45507FC9F01}.Debug|Any CPU.Build.0 = Debug|Any CPU 35 | {B83B3177-EA27-4470-B859-B45507FC9F01}.Release|Any CPU.ActiveCfg = Release|Any CPU 36 | {B83B3177-EA27-4470-B859-B45507FC9F01}.Release|Any CPU.Build.0 = Release|Any CPU 37 | {0BBF80F4-1ED3-4082-BCDA-15FA073111D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 38 | {0BBF80F4-1ED3-4082-BCDA-15FA073111D8}.Debug|Any CPU.Build.0 = Debug|Any CPU 39 | {0BBF80F4-1ED3-4082-BCDA-15FA073111D8}.Release|Any CPU.ActiveCfg = Release|Any CPU 40 | {0BBF80F4-1ED3-4082-BCDA-15FA073111D8}.Release|Any CPU.Build.0 = Release|Any CPU 41 | EndGlobalSection 42 | GlobalSection(SolutionProperties) = preSolution 43 | HideSolutionNode = FALSE 44 | EndGlobalSection 45 | GlobalSection(NestedProjects) = preSolution 46 | {B83B3177-EA27-4470-B859-B45507FC9F01} = {61E7E11E-4558-434C-ACE8-06316A3097B3} 47 | {0BBF80F4-1ED3-4082-BCDA-15FA073111D8} = {AAA11B78-2764-4520-A97E-46AA7089A588} 48 | EndGlobalSection 49 | GlobalSection(ExtensibilityGlobals) = postSolution 50 | SolutionGuid = {CED9A020-DBA5-4BE6-8096-75E528648EC1} 51 | EndGlobalSection 52 | EndGlobal 53 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Poe 2 | 3 | [![Nuget package](https://img.shields.io/nuget/vpre/Poe)](https://www.nuget.org/packages/Poe/) 4 | [![dotnet](https://github.com/tryAGI/Poe/actions/workflows/dotnet.yml/badge.svg?branch=main)](https://github.com/tryAGI/Poe/actions/workflows/dotnet.yml) 5 | [![License: MIT](https://img.shields.io/github/license/tryAGI/Poe)](https://github.com/tryAGI/Poe/blob/main/LICENSE.txt) 6 | [![Discord](https://img.shields.io/discord/1115206893015662663?label=Discord&logo=discord&logoColor=white&color=d82679)](https://discord.gg/Ca2xhfBf3v) 7 | 8 | A reverse engineered C# API wrapper for Quora's Poe, which provides access to ChatGPT, GPT-4, and Claude. 9 | 10 | ### Usage 11 | ```csharp 12 | using Poe; 13 | 14 | using var httpClient = new HttpClient(); 15 | var api = new PoeApi(apiKey, httpClient); 16 | ``` 17 | 18 | ## Support 19 | 20 | Priority place for bugs: https://github.com/tryAGI/Poe/issues 21 | Priority place for ideas and general questions: https://github.com/tryAGI/Poe/discussions 22 | Discord: https://discord.gg/Ca2xhfBf3v -------------------------------------------------------------------------------- /assets/nuget_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tryAGI/Poe/06588ae5f89deee387cd931634122692b005fcea/assets/nuget_icon.png -------------------------------------------------------------------------------- /src/Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | preview 5 | enable 6 | enable 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/key.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tryAGI/Poe/06588ae5f89deee387cd931634122692b005fcea/src/key.snk -------------------------------------------------------------------------------- /src/libs/Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | true 7 | $(MSBuildThisFileDirectory)../key.snk 8 | 9 | 10 | 11 | 12 | <_Parameter1>false 13 | 14 | 15 | 16 | 17 | 0.1.0 18 | true 19 | true 20 | tryAGI and contributors 21 | MIT 22 | nuget_icon.png 23 | README.md 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | true 33 | $(MSBuildThisFileDirectory)../../../LocalPackages 34 | 35 | 36 | 37 | 38 | all 39 | runtime; build; native; contentfiles; analyzers; buildtransitive 40 | 41 | 42 | 43 | 44 | true 45 | latest 46 | All 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /src/libs/Poe/Models/Payload.cs: -------------------------------------------------------------------------------- 1 | namespace Poe.Models; 2 | 3 | /// 4 | /// 5 | /// 6 | public class Payload 7 | { 8 | /// 9 | /// 10 | /// 11 | public IReadOnlyDictionary Extensions { get; set; } = new Dictionary(); 12 | 13 | /// 14 | /// 15 | /// 16 | public string QueryName { get; set; } = string.Empty; 17 | 18 | /// 19 | /// 20 | /// 21 | public IReadOnlyDictionary Variables { get; set; } = new Dictionary(); 22 | } -------------------------------------------------------------------------------- /src/libs/Poe/Models/PayloadItem.cs: -------------------------------------------------------------------------------- 1 | namespace Poe.Models; 2 | 3 | /// 4 | /// 5 | /// 6 | public class PayloadItem 7 | { 8 | /// 9 | /// 10 | /// 11 | public string Category { get; set; } = String.Empty; 12 | 13 | /// 14 | /// 15 | /// 16 | public IReadOnlyDictionary Data { get; set; } = new Dictionary(); 17 | } -------------------------------------------------------------------------------- /src/libs/Poe/PayloadGenerator.cs: -------------------------------------------------------------------------------- 1 | using Poe.Models; 2 | 3 | namespace Poe; 4 | 5 | /// 6 | /// 7 | /// 8 | public class PayloadGenerator 9 | { 10 | private readonly Dictionary _queries = 11 | JsonSerializer.Deserialize>(H.Resources.queries_json.AsString()) ?? 12 | throw new InvalidOperationException("Failed to deserialize queries.json"); 13 | 14 | private readonly Random _random = new(); 15 | 16 | /// 17 | /// 18 | /// 19 | /// 20 | /// 21 | /// 22 | public object GeneratePayload(string queryName, Dictionary variables) 23 | { 24 | if (queryName == "recv") 25 | { 26 | return GenerateRecvPayload(variables); 27 | } 28 | 29 | return new Payload 30 | { 31 | Extensions = new Dictionary 32 | { 33 | ["hash"] = _queries[queryName], 34 | }, 35 | QueryName = queryName, 36 | Variables = variables, 37 | }; 38 | } 39 | 40 | private IReadOnlyCollection GenerateRecvPayload(IReadOnlyDictionary variables) 41 | { 42 | var payloads = new List 43 | { 44 | new() 45 | { 46 | Category = "poe/bot_response_speed", 47 | Data = variables, 48 | }, 49 | }; 50 | 51 | if (_random.NextDouble() > 0.9) 52 | { 53 | payloads.Add(new PayloadItem 54 | { 55 | Category = "poe/statsd_event", 56 | Data = new Dictionary 57 | { 58 | { "key", "poe.speed.web_vitals.INP" }, 59 | { "value", _random.Next(100, 126) }, 60 | { "category", "time" }, 61 | { "path", "/[handle]" }, 62 | { "extra_data", new Dictionary() }, 63 | } 64 | }); 65 | } 66 | 67 | return payloads; 68 | } 69 | } -------------------------------------------------------------------------------- /src/libs/Poe/Poe.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0;net4.6.2;net6.0;net7.0 5 | $(NoWarn);CA5394 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | A reverse engineered C# API wrapper for Quora's Poe, which provides free access to ChatGPT, GPT-4, and Claude. 14 | api;client;sdk;dotnet;swagger;openapi;specification;poe 15 | 16 | 17 | 18 | 19 | all 20 | runtime; build; native; contentfiles; analyzers; buildtransitive 21 | 22 | 23 | all 24 | runtime; build; native; contentfiles; analyzers; buildtransitive 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /src/libs/Poe/PoeApi.Authorization.cs: -------------------------------------------------------------------------------- 1 | using System.Net.Http.Headers; 2 | using System.Text; 3 | 4 | // ReSharper disable UnusedParameter.Local 5 | // ReSharper disable MemberCanBeMadeStatic.Local 6 | 7 | #pragma warning disable CA1822 8 | 9 | namespace Poe; 10 | 11 | public partial class PoeApi 12 | { 13 | private string ApiKey { get; } = string.Empty; 14 | 15 | private Task PrepareRequestAsync(HttpClient client, HttpRequestMessage request, string url, CancellationToken cancellationToken) 16 | { 17 | if (!string.IsNullOrWhiteSpace(ApiKey)) 18 | { 19 | request.Headers.Authorization = new AuthenticationHeaderValue( 20 | scheme: "Bearer", 21 | parameter: ApiKey); 22 | } 23 | 24 | return Task.CompletedTask; 25 | } 26 | 27 | private Task PrepareRequestAsync(HttpClient client, HttpRequestMessage request, StringBuilder builder, CancellationToken cancellationToken) 28 | { 29 | return Task.CompletedTask; 30 | } 31 | 32 | private Task ProcessResponseAsync(HttpClient client, HttpResponseMessage message, CancellationToken cancellationToken) 33 | { 34 | return Task.CompletedTask; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/libs/Poe/PoeApi.Constructors.cs: -------------------------------------------------------------------------------- 1 | namespace Poe; 2 | 3 | /// 4 | /// Class providing methods for API access. 5 | /// 6 | public partial class PoeApi 7 | { 8 | /// 9 | /// Sets the selected apiKey as a default header for the HttpClient. 10 | /// 11 | /// 12 | /// 13 | public PoeApi(string apiKey, HttpClient httpClient) 14 | { 15 | ApiKey = apiKey ?? throw new ArgumentNullException(nameof(apiKey)); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/libs/Poe/PoeApi.cs: -------------------------------------------------------------------------------- 1 | // using System.Text.RegularExpressions; 2 | // 3 | // namespace Poe; 4 | // 5 | // /// 6 | // /// Class providing methods for API access. 7 | // /// 8 | // public partial class PoeApi 9 | // { 10 | // string gqlUrl = "https://poe.com/api/gql_POST"; 11 | // string gqlRecvUrl = "https://poe.com/api/receive_POST"; 12 | // string homeUrl = "https://poe.com"; 13 | // string settingsUrl = "https://poe.com/api/settings"; 14 | // bool wsConnecting = false; 15 | // bool wsConnected = false; 16 | // bool wsError = false; 17 | // int connectCount = 0; 18 | // int setupCount = 0; 19 | // string token; 20 | // string deviceId; 21 | // string proxy; 22 | // string clientIdentifier; 23 | // Dictionary activeMessages = new Dictionary(); 24 | // Dictionary> messageQueues = new Dictionary>(); 25 | // Dictionary> suggestionCallbacks = new Dictionary>(); 26 | // Dictionary headers = new Dictionary() 27 | // { 28 | // {"User-Agent", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36"}, 29 | // {"Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"}, 30 | // {"Accept-Encoding", "gzip, deflate, br"}, 31 | // {"Accept-Language", "en-US,en;q=0.9"}, 32 | // {"Sec-Ch-Ua", "\"Not.A/Brand\";v=\"8\", \"Chromium\";v=\"112\""}, 33 | // {"Sec-Ch-Ua-Mobile", "?0"}, 34 | // {"Sec-Ch-Ua-Platform", "\"Linux\""}, 35 | // {"Upgrade-Insecure-Requests", "1"} 36 | // }; 37 | // string formkeySalt = null; 38 | // string formkey = null; 39 | // 40 | // //... other fields 41 | // 42 | // public Client(string token, string proxy = null, string deviceId = null, string clientIdentifier = "chrome112", string formkey = null){ 43 | // this.token = token; 44 | // this.deviceId = deviceId; 45 | // this.proxy = proxy; 46 | // this.clientIdentifier = clientIdentifier; 47 | // this.formkey = formkey; 48 | // ConnectWs(); 49 | // } 50 | // 51 | // public void SetupSession(){ 52 | // Console.WriteLine("Setting up session..."); 53 | // // Here you would create a new instance of HttpClient and set its headers and cookies 54 | // 55 | // // Please note, you will need a separate library in order to handle proxies with HttpClient, such as HttpClientFactory 56 | // } 57 | // 58 | // public async Task RequestWithRetries(HttpMethod method, string requestUri, HttpContent content = null, int attempts = 10){ 59 | // for (int i = 0; i < attempts; i++){ 60 | // // Here would be the logic to execute the request and check its response status 61 | // 62 | // // When handling exceptions for failed requests, you will throw the appropriate HttpExceptions instead of RuntimeError 63 | // } 64 | // throw new Exception($"Failed to download {requestUri} too many times."); 65 | // } 66 | // 67 | // public async Task SendMessage(string chatbot, string message, bool withChatBreak = false, 68 | // int timeout = 20, bool asyncRecv = true, Action suggestCallback = null) { 69 | // // Same concept and logic applies here with adjustments made for C# syntax and functionality 70 | // 71 | // // Note: C# has an async/await pattern that can replace many of the threading things going on in the Python version. 72 | // } 73 | // 74 | // public (string, string) ExtractFormKey(string html, string appScript) 75 | // { 76 | // Regex scriptRegex = new Regex(""); 77 | // Regex varsRegex = new Regex("window\\._([a-zA-Z0-9]{10})=\"([a-zA-Z0-9]{10})\""); 78 | // 79 | // Match match = varsRegex.Match(appScript); 80 | // string key = match.Groups[1].Value; 81 | // string value = match.Groups[2].Value; 82 | // 83 | // string scriptText = @" 84 | // let QuickJS = undefined, process = undefined; 85 | // let window = { 86 | // document: {a:1}, 87 | // navigator: { 88 | // userAgent: ""a"" 89 | // } 90 | // }; 91 | // "; 92 | // scriptText += $"window._{key} = '{value}';"; 93 | // foreach (Match m in scriptRegex.Matches(html)) 94 | // { 95 | // scriptText += m.Groups[1].Value; 96 | // } 97 | // 98 | // Regex functionRegex = new Regex("(window\\.[a-zA-Z0-9]{17})=function"); 99 | // string functionText = functionRegex.Match(scriptText).Groups[1].Value; 100 | // scriptText += $"{functionText}();"; 101 | // 102 | // // C# does not include an embedded JavaScript parser/interpreter. 103 | // // The line QuickJSCore context = new QuickJSCore(); 104 | // // assumes the existence of a class QuickJSCore that provides the necessary JavaScript handling. 105 | // // You'd need to use a library like Jint, ClearScript, or similar, or design your own handler. 106 | // //QuickJSCore context = new QuickJSCore(); 107 | // string formkey = string.Empty;//context.Eval(scriptText); 108 | // 109 | // string salt = null; 110 | // try 111 | // { 112 | // Regex saltFunctionRegex = new Regex("function (.)\\(_0x[0-9a-f]{6},_0x[0-9a-f]{6},_0x[0-9a-f]{6}\\)"); 113 | // string saltFunction = saltFunctionRegex.Match(scriptText).Groups[1].Value; 114 | // string saltScript = $"{saltFunction}(a=>a, '', '');"; 115 | // salt = string.Empty;// context.Eval(saltScript); 116 | // } 117 | // catch (Exception e) 118 | // { 119 | // Console.WriteLine($"Failed to obtain poe-tag-id salt: {e.Message}"); 120 | // } 121 | // 122 | // return (formkey, salt); 123 | // } 124 | // } 125 | -------------------------------------------------------------------------------- /src/libs/Poe/Resources/queries.json: -------------------------------------------------------------------------------- 1 | { 2 | "AddEmailMutation": "6d9ff3c8ed7badced30cfdad97492d4c21719931e8c44c5601abfa429b62ded7", 3 | "AddMessageBreakEdgeMutation": "9450e06185f46531eca3e650c26fa8524f876924d1a8e9a3fb322305044bdac3", 4 | "AddPhoneNumber": "26ae865f0686a910a86759c069eb1c0085d78b55a8abf64444ec63b03c76fb58", 5 | "AnnotateWithIdsProviderQuery": "b4e6992c3af8f208ab2b3979dce48889835736ed29f623ea9f609265018d0d8f", 6 | "AvailableBotsListModalPaginationQuery": "3be373baa573ccd196b9d71c94953b1d1bc586625bd64efe51655d75e68bbfb7", 7 | "AvailableBotsSelectorModalPaginationQuery": "cb23667c6c2a13501275d0e958e54e705da6f361dd90a0166994c18b20ec8965", 8 | "BotInfoFormRunCheckMutation": "87d55551061151b852fd7c53ec34dbb1ae784516b0ba2df5255b201f0d4e1444", 9 | "BotInfoModalQuery": "d84c9e2fb3d698edb3c82b9eeca9ceee08ba6461a19bfcfd971f5c60c2dd9012", 10 | "BotLandingPageQuery": "f77b0d0e1a14a7d8a8c84398c146a4d721efd1f7a2ff911bf6d7b27d3341c14c", 11 | "BotSelectorModalQuery": "95e4c0fec4247d24a2c4c2eb6aa87845fca627e53254a133e964ba5c2e4fb6e0", 12 | "BotSwitcherModalQuery": "54023ee8b691543982b2819491532532c317b899918e049617928137c26d47f5", 13 | "ChatDeleteConfirmationModalQuery": "d697a075bcc5a027db5fe5777c9434053210a81c4e29f6f4380de1b21bd3f8c3", 14 | "ChatHelpersSendNewChatMessageMutation": "c11a9745cf18811287e03fc81e766fbeeaa6c65cbf4e54648f7400ee09f90ebc", 15 | "ChatHistoryFilteredListPaginationQuery": "7aeedfea3592a32ae1870f854eb713587b0d0fa7cfbaf8c1d19271d7f2773e4f", 16 | "ChatHistoryListPaginationQuery": "dd949d5d1497f1456587a3836eab106c0a0726c8e253dd2acfb3fa178a3f6a3f", 17 | "ChatListPaginationQuery": "8e36816f3aa12b6d5508cfca1cc44c5128d5df0405cfbdf01cfd1b666354db1f", 18 | "ChatPageBotBotsPagination": "ed9017f85fe2fedbf02b2d000cb4b551d2ec870715d0c7bce6d54a0f3f9b657b", 19 | "ChatPageQuery": "85e6209451ddf1bc7d019eb73fb9b7072689aadb85b1a75f60a56185861286c7", 20 | "ChatSetTitle": "4b499ec70041141714a0ba1ae8ab6c9595d73845735715a7d4b86ae679a87696", 21 | "ChatSettingsModalQuery": "5e8357fd21ed24988015b2cb9ca0bffee6512740d403ead43ea46605059180e7", 22 | "ChatSubscriptionPaywallModalQuery": "1cba8b9a13ffa600c7b3a02ad0c1a7f1609b8f877d56d3b8517db2bb0d1294bb", 23 | "ChatTitleUpdated": "59a6bb3b783e392aaa18ed2baf3a3be65605a7e4760e1c9c687e217e3446127c", 24 | "ChatsHistoryPageQuery": "d1c0dd48f6ffd960c95995a92c899859e35b82e687d915d2510f89a22d944633", 25 | "ContinueChatFromPoeShare": "da387c7cce806a5a0820d31314eb77ea16c8b78d740d94a3aee26823afad467a", 26 | "ContinueChatIndexPageQuery": "a7eea6eebd14aa355723514558762315d0b4df46205b70f825d288d5ed1635ec", 27 | "ContinueChatPageQuery": "fe3a4d2006b1c4bb47ac6dea0639bc9128ad983cf37cbc0006c33efab372a19d", 28 | "CreateBotIndexPageQuery": "6bd24eb031dd0d427ddeef0c4113d9b3800aa44b62aed25143d6a95251765e38", 29 | "CreateBotPageQuery": "4fa5e0703c416fc6b40c5e2fcfcac66301ed0c8d32bafb5d69300e7553ef1f8f", 30 | "CreateChatMutation": "a55432622aaaf7f7277ab12f07725a0c88c5ca36434c909208973189c4c7aa24", 31 | "CreateChatWithTitle": "ccede193610b2b0243192ad2fc13cadc3f8103b6439b7920da1ca643f109243e", 32 | "CreateCheckoutSession": "5eb43e7c83974acc6680e1abe4c169296d0b346c42cc20d487762163402ea8e5", 33 | "CreateCustomerPortalSession": "4d43136f33aba6b6dea2ac8cd295e03bd841b7c99bf772940fa06a623a331786", 34 | "CreateMessagesToContinueChatMutation": "00b66f0117fab1ab6cdcf7e98819c1e3196736253b6a158316a49f587b964d25", 35 | "DeleteAccountMutation": "4e9651277464843d4d42fbfb5b4ccb1c348e3efe090d6971fa7a3c2cabc7ea5c", 36 | "DeleteChat": "5df4cb75c0c06e086b8949890b1871a9f8b9e431a930d5894d08ca86e9260a18", 37 | "DeleteMessageMutation": "8d1879c2e851ba163badb6065561183600fc1b9de99fc8b48b654eb65af92bed", 38 | "DeleteUserMessagesMutation": "3f60d527c3f636f308b3a26fc3a0012be34ea1a201e47a774b4513d8a1ba8912", 39 | "DismissDismissible": "b133084411c0a7a2353f6cfacd3d115260c34ddc5d97cf7f19a16e8cb4410803", 40 | "EditBotIndexPageQuery": "52c3db81cca5f44ae4de3705633488511bf7baa773c3fe2cb16b148f5b5cf55e", 41 | "EditBotPageQuery": "67c96902edcb66854106892671c816d9f7c3d8910f5a6b364f8b9f3c2bc7a37a", 42 | "EmailUnsubscribe": "eacf2ae89b7a30460619ccfb0d5a4e6007cfbcf0286ec7684c24192527a00263", 43 | "EmbedLoggedOutPageQuery": "e81580f4126215186e8a5d18bdedcf7c056b634d4d864f54b948765c8c21aef9", 44 | "ExploreBotsCarouselContainerQuery": "80c1bd803ee711eb68d76396aca794da2c57156adaed5ce3307882af7bb7cdaf", 45 | "ExploreBotsCarouselLazyLoadedContainerQuery": "8041cd32aa1e73e1d82fcb0f7b8b758b5201a032153fb1e96b0d9f8dee029a8a", 46 | "ExploreBotsCarouselPagedContainerPaginationQuery": "6a159c606fade78cfa8a1164290a822361f7d24ce16b07bca66ab19b24a639ce", 47 | "ExploreBotsIndexPageQuery": "5b1e4a5bc7b213e43e16dd1b8d0823853fb8006806a3ee9e2070fffc33b30b57", 48 | "ExploreBotsListPaginationQuery": "983be13fda71b7926b77f461ae7e8925c4e696cdd578fbfd42cb0d14103993ac", 49 | "ExploreBotsPageQuery": "170190a4ef153475c9b7cdcc7780d6f120e1402cc0bf239e23414db2bb2838d1", 50 | "ExploreBotsSidebarQuery": "00f42e3842c63cfcfcebad6402cdaa1df1c3fa7ffe3efbe0437a08a151eca87e", 51 | "GenerateAppleAuthNonceMutation": "c3e0c1b990cd17322716d0fa943a8ddc0ffecf45294ad013ccc883954c2171fc", 52 | "HandleBotChatEmbedPageQuery": "399775041662f58cd339ffb60895f45601c83f4f688e1e8aeaf36396f40466fd", 53 | "HandleBotChatPageQuery": "6008bbe2fd26c9799a4e0ecb758ee55b6935270839a628383d35177eb16e8bbc", 54 | "HandleProfileIndexPageQuery": "0243e1784c33ae913d8a3ad20fc1252b930b6741ff9d78bd776e2df4f93f55ee", 55 | "HandleProfilePageQuery": "4605a49a28aa5647b96f437d61a8b9318e2619d9974c61759b0ec82b201befb7", 56 | "IntroMainQuery": "47f2c9bb41be5238968c81c82f2d2cff4100c73fcc70a9f592825bb40c0efc8d", 57 | "LayoutLeftSidebarQuery": "6c1c2fef7e2da327140c0a84b752915d410c31c38dd84136537255dba68697fa", 58 | "LayoutRightSidebarQuery": "71a5fc350dd717477e1ab28426879dcf2531e67df71283fe15d3bfe4889e6a23", 59 | "LoginPageQuery": "2599cb7b73e689206ae0e28902d743eacae29cef1198d2b3c491c414227e295e", 60 | "LoginWithVerificationCodeMutation": "0d5aecd57239d518c25dc972569ee77dd9610a114610a6a3e87b87fdd8f1ba90", 61 | "LogoutAllSessionsMutation": "1e62b26302959ca753def8678e817b2c1ad94efdb21872dbf0f8bffcb892aed4", 62 | "LogoutMutation": "1d2e52b19e15a6aa0ec93d8e4a3a9653b9ceb4c1f365c7d9c4451d835505eef2", 63 | "MarkAndroidAppDownloadPromptSeen": "ed6891c8913983cc4fd0bfed9760e9738743419712ce6681841217ed0bb8c915", 64 | "MarkMultiplayerNuxCompleted": "c1b1f2ce72d9f8e9cd7bbe1eecbf6e3bed3366df6a18b179b07ddfd9f1f8b3b1", 65 | "MessageAdded": "343d50a327e93b9104af175f1320fe157a377f1dbb33eaeb18c6a95a11d1b512", 66 | "MessageCancel": "59b10f19930cf95d3120612e72d271e3346a7fc9599e47183a593a05b68c617e", 67 | "MessageCancelled": "dfcedd9e0304629c22929725ff6544e1cb32c8f20b0c3fd54d966103ccbcf9d3", 68 | "MessageDeleted": "91f1ea046d2f3e21dabb3131898ec3c597cb879aa270ad780e8fdd687cde02a3", 69 | "MessageLimitUpdated": "38a2aada35e6cf3c47d9062c84533373cad2ec9205b37919a4ba8e5386115a17", 70 | "MessageUnvoteMutation": "af2b91f09ab2ccf53ba9176a86b9934b98a865adf228b2ac3a548d6397f382f3", 71 | "MessageVoteMutation": "07458e93fab951a4127f7c69743269a0d21c00ed2fdf593cba2aa8050c09a760", 72 | "NewLandingPageQuery": "003af54e7fdde83cb0118a405a079085073b3aee3b8d2111a138f3b6e2958b71", 73 | "NumTokensFromPromptQuery": "1d9bef79811f3b2ddca5ce4027b7eaa31a51bbeed1edf8b6f72e2e0d09d80609", 74 | "NuxInitialModalQuery": "f8cd0d8494afe3b5dbb349baa28d3ac21f2219ce699e2d59a2345c864905e0c3", 75 | "OnboardingBestOfPoeModalQuery": "d144c16d74fd85eeeae43331109dcd3fc86f8956e580f740cf4d239a0029c225", 76 | "OnboardingSubscribeImageModalQuery": "468a5303bca4d4a4fa03ebc3d4fe49138fc9151257661570f40dd0eac82b03ca", 77 | "OnboardingSubscribeModalQuery": "f766345663b0b26d23c70525c2a7209468245164c2459fde26c36c798bff6f9a", 78 | "OptimisticChatLoaderQuery": "2bbb2b9b1878d56cde5cac5a37019373d7e8230cf8367436563acd3d9ba60c13", 79 | "PageBlockerQuery": "d1ab792fce4d3f91777b49856d44b2d9cbb6ad1231e1116c407a0208604181e1", 80 | "PagesBotNameQuery": "a156136af92b189768540f864445f0b8d9191584530def6b1a5502c843539cfb", 81 | "PagesDefaultBotChatPageQuery": "27a2fb791e8e680f2ad8966b181fb4abbff333654ab138cf39a4607ec6c3c82d", 82 | "PoeBotCreate": "fcc424e9f56e141a2f6386b00ea102be2c83f71121bd3f4aead1131659413290", 83 | "PoeBotDelete": "c5e5ee2fdac007b02d074ce7882a0631bfbccc73d8833ba8765297c5ea782bb6", 84 | "PoeBotEdit": "eb93047f1b631df35bd446e0e03555fcc61c8ad83d54047770cd4c2c418f8187", 85 | "PoeBotFollow": "efa3f25f6cd67f9dea757be50305c0caa6a4e51f52ffba7e4a1c1f2c84d6dbd0", 86 | "PoeBotUnfollow": "db2281f3efa305db62d38964b640e982076491c2c59d5be3303feae343fe8914", 87 | "PoeRemoveBotFromUserList": "89e756b668b2318fa73c2a9dde4608a4529c74844667417c0cfb245e7e04e96e", 88 | "PoeSetBio": "66fb99ec59fa17bc4487f944d116bc920161faced58a3ce99e82cb61af61468e", 89 | "PoeSetHandle": "b57a53d5ae7a881e81616c0dd70e7b9d1d9ba4118a9969653cadc6284d89cf7f", 90 | "PoeSetName": "c406a46fe6ff244ab2d665ea953fc8655d6816f1731505d830863d9b9c5021bf", 91 | "PoeSetProfilePhoto": "13106f2433e5d48a53e6804b76022e80c0fc9bf018eb5b5404d9e0a4acd94f1f", 92 | "PoeUserSetFollow": "dcc26e4e36b47af8af6bd0296ff85dfa8fc77a9c374ea5989afd0bf39ae4d35e", 93 | "PostIdPostPageQuery": "28f6a6063fddab39b5f9e9af8cd3208163eafbe2c8bb998ae61f0da55134de6a", 94 | "ProfileIndexPageQuery": "4044ca7eb203e613f19dc76a4a05ca1df25bfdb2ff761a9d6dced6b0d61f219a", 95 | "ProfilePageQuery": "9505daf59f885463e5bd3bb2a1a9fc088e8634fbc7d5a0682f2ece11ee7548dd", 96 | "RemoveEmailMutation": "63750a7e41cc0ad3f6da0be1fdae9c243f1afab83cf44bb5c3df14243074681d", 97 | "RemoveUserPhoneNumberMutation": "7dadad6ac75a8a4e5c54479524c7821e748c043242476958262bb39fa60ccddb", 98 | "SaveContinueChatInfoMutation": "ae56678376401ae45dbba61aa6b1a55564877edc33605db6283e1dc3bdb0c8ff", 99 | "SearchResultsListPaginationQuery": "03ce30a457ef8fed9f7677ed642eed8eadd86ca1c7c034f69cb16feb79f5fad2", 100 | "SearchResultsMainQuery": "b904ab9c97ee1535c1b9b2fa1851b7735f7b4638e535c3230d2a0e235bc78024", 101 | "SelectorTestPageQuery": "9ec86fe8e3d0d3b264d0fab0feb73e38c86d616c7c3d8340d7a6146bd8445ed3", 102 | "SendMessageMutation": "5fd489242adf25bf399a95c6b16de9665e521b76618a97621167ae5e11e4bce4", 103 | "SendVerificationCodeMutation": "1b3d5a8c7fd8b187b14552d3d1ab13b19d5ea263e9716a207fedc23853c0b98a", 104 | "SetPrimaryEmailMutation": "01e75a6d937351b304ca9cc0b231e43587a5923e7f8618863bdf996df38d28b5", 105 | "SettingsDefaultBotSectionMutation": "4084604e8741af8650ac6b4236cdfa13c91a70cf1c63ad8a368706a386d0887e", 106 | "SettingsIndexPageQuery": "50722a6de168bf92d20b00674c981cd5450f88d62348f51076fce32a0898c965", 107 | "SettingsPageQuery": "fb6399e5fbefb4a2c493381aa5f93c8d306f6dd3aa30a363d07799c4ad645830", 108 | "ShareCodeSharePageQuery": "689890279054b2a76d6fa6dd63267df03242ae6db39c3d8508f9642ed37a8dc9", 109 | "ShareMessageMutation": "2491190f42c1f5265d8dbaaaf7220dbfa094044fdfb2429fd7f2e35f863bc5e1", 110 | "SignupOrLoginWithAppleMutation": "074bf2533767ae06ced2046b538299b0ca7d8934da22ce6b7de51b666ffbfa30", 111 | "SignupOrLoginWithGoogleMutation": "253e1f712eff09e801f6cf85140b400e7b949d27b5d410c803d69ce7cf65131b", 112 | "SignupOrLoginWithQuoraMutation": "ee2498e8837e7b975806613401f5aa4ba18d03fdcc9fde0c59efc75717103df5", 113 | "SignupWallModalInnerQuery": "d70ff1ffe0efe1fe0f92e73e50e6b703e4f790225abcefe3067a32d9da7f7c32", 114 | "SignupWithVerificationCodeMutation": "9d6dcfd41abc43c13010988224ae680fa6b09733d990a4b5393a78124481d94a", 115 | "StaticContentQuery": "15267bf130fbe298a6f60334f57ccf62bc16ff06c74d5778ba54b4b4f21f8d0c", 116 | "SubscriptionTosQuery": "c3bf58b2f81083b0def2f51b4fec2a2e2a5e7abe1c7df635f3efeb7b44469f8a", 117 | "SubscriptionsMutation": "61c1bfa1ba167fd0857e3f6eaf9699e847e6c3b09d69926b12b5390076fe36e6", 118 | "UniversalLinkPageQuery": "ec7c629dd6ec79f9d26dda9c4ef9cb1e24aa41d7b92090596b6639eeee5e6cc8", 119 | "UpdatePhoneNumber": "c49f5f64947c2946f8007f366bbc0ca5b1f0bbbdc6b72ad97be90533f0e83c28", 120 | "UseBotSelectorViewerBotsPaginationQuery": "97fdae8981da0b3528df63b86f303378abf0320341866905e6cba500b5e0db96", 121 | "UseStopMessageAndSendChatBreak": "9b95c61cd6cb41230a51fb360896454dde1ae6d1edb6f075504cb83a52422bc9", 122 | "UserEditBioModalQuery": "b78089f19d1071ad9440d5a2696588b0e82a012f6b40dca68f071cc0a49727f2", 123 | "UserEditHandleModalQuery": "ecee1f772c401f6e429ba7ebe088eedc0aa6d24dfa4cae0ec6f54bb3c5a5c653", 124 | "UserEditNameModalQuery": "dd72d69698a46097386b73b19677a84b6bcba51b3df3790e67d804b6da686787", 125 | "UserEditProfilePicModalQuery": "7f69ff6407a1360570863b09a9c02bf0a4bdbd8de2b04e5dde4eec031a6f62e5", 126 | "UserFolloweesListModalQuery": "b219f7e8b7c8d21aaa0979d44bfc3935501719e3fe18cbe86b459eced5f290d2", 127 | "UserFollowersListModalQuery": "86b007fa15b2de6f7eb527050832d342dde837aaedfb61bfdd1bf1201b860b61", 128 | "UserProfileConfigurePreviewModalQuery": "abec61f90eebcc3b914487db0ba35ff6ec53c1f7c29f40f59222cee5b8832a52", 129 | "ViewerStateUpdated": "ee640951b5670b559d00b6928e20e4ac29e33d225237f5bdfcb043155f16ef54", 130 | "WebSpeedUpsellQuery": "d8556da659d21dc2c583248c1c617ca20492b64c6948ae4a16256c0848f9c32e", 131 | "WebSubscriptionPaywallModalQuery": "dedc399e9fa52dc43c05bd183032c541fa655690222e37a7cf2dbb37cf46c365", 132 | "WebSubscriptionPaywallWrapperQuery": "210dc63dc4b2bfba2e0a4a1288013097cc920f3a26e9988cb191836541d26458" 133 | } -------------------------------------------------------------------------------- /src/tests/Poe.IntegrationTests/Poe.IntegrationTests.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net7.0 5 | 6 | 7 | 8 | 9 | all 10 | runtime; build; native; contentfiles; analyzers; buildtransitive 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/tests/Poe.IntegrationTests/Tests.cs: -------------------------------------------------------------------------------- 1 | using Poe; 2 | 3 | namespace tryAGI.OpenAI.IntegrationTests; 4 | 5 | [TestClass] 6 | public class GeneralTests 7 | { 8 | [TestMethod] 9 | public void Generate() 10 | { 11 | var apiKey = 12 | Environment.GetEnvironmentVariable("POE_API_KEY") ?? 13 | throw new AssertInconclusiveException("POE_API_KEY environment variable is not found."); 14 | 15 | using var client = new HttpClient(); 16 | var api = new PoeApi(apiKey, client); 17 | } 18 | } 19 | --------------------------------------------------------------------------------