Closed namjaewook closed 1 year ago
Please open the debug mode with the following command aichat-toggle-debug
, when an error occurs, paste *AICHAT-DEBUG*
buffer here.
Thank you for your quick response. I tried what you suggest, but I did not get the buffer (*AICHAT-DEBUG*
). Do I need to set something?
Make sure your cookies file format is the same as https://github.com/xhcoding/emacs-aichat/blob/main/test/cookies.json
I just pulled newly updated code and copy the example "cookies" file in the test directory to my emacs directory to use it. But it gives the same error.
What is your version of emacs ?
I am using "GNU Emacs 27.2 (build 1, aarch64-apple-darwin21.1.0, NS appkit-2113.00 Version 12.0.1 (Build 21A559)) of 2021-11-10". Many thanks.
Please note that it worked fine a week ago...
You execute the following code and see if there is an error:
(aichat-json-serialize “test”)
I got an message:
lispy--eval-elisp: Wrong type argument: json-value-p, "test"
(I use lispy package. )
OK, I know where the problem is, and I will fix it
I don't have a MacOS environment. Can you help me test whether the following code will report an error @namjaewook
(json-encode-string "test")
Pull the latest commit, the issue should be solved
Many thanks. It works! If you have a time, please let me know what happened. Again, thank you very much for prompt response.
I have a linux machine, which uses GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu) of 2020-09-25. I checked your package with your new commit inside the linux machine. But I got the following error:
(error (error (error (void-function json-serialize))))
I tried to turn on the debug mode but AICHAT-DEBUG buffer is not created.
Also, I execute (json-encode-string "test")
and it seems to work. The result in *Message*
buffer is
"\"test\""
If you have a time, please take a look at this issue.
Many thanks. It works! If you have a time, please let me know what happened. Again, thank you very much for prompt response.
Emacs 27's json-serialize
function cannot handle string, so I switched to json-encode
I have a linux machine, which uses GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu) of 2020-09-25. I checked your package with your new commit inside the linux machine. But I got the following error:
(error (error (error (void-function json-serialize))))
I tried to turn on the debug mode but AICHAT-DEBUG buffer is not created.
Also, I execute
(json-encode-string "test")
and it seems to work. The result in*Message*
buffer is"\"test\""
If you have a time, please take a look at this issue.
Please pull the latest commit
Many thanks. Now both machine works!
ubuntu 22.04, emacs GNU Emacs 29.0.50 (build 9, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0) of 2022-11-07
I got this error
(error (error (json-parse-error invalid token near 'HTTP' <string> 1 4 4)))
*AICHAT-DEBUG*
cur command: (curl --silent --show-error --include --config -), config:
url = "https://edgeservices.bing.com/edgesvc/turing/conversation/create"
request = "GET"
user-agent = "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Mobile Safari/537.36 Edg/111.0.1661.41"
header = "Cookie: SnrOvr=X=rebateson; SRCHUSR=DOB=20230303&T=1679457151000&POEX=W; SUID=A; SRCHHPGUSR=SRCHLANG=en&DM=0&CW=2489&CH=1321&SCW=2489&SCH=1321&BRW=XW&BRH=T&DPR=1.0&UTC=480&PV=5.15.75&PRVCW=360&PRVCH=636&EXLTT=2&HV=1678946709&WTS=63815053692; ANON=A=6261FC78268FAE2BDFF62E33FFFFFFFF&E=1c18&W=1; _SS=SID=034C428B313F62202072505730376347&R=172&RB=172&GB=0&RG=0&RP=169; ipv6=hit=1679460717547&t=4; _U=1QkD12t9tUHv4c9yh3ctC4FH458S_06DwQtOOzieFCIVrnIheH-T4ZLSgho_dAqkSJK29WrjBjHXG-7F3rinul6FSH5c-UWvJmi1oNa9cZ7hcMmf--A7Hzatd31PDguDa7ImW4HR6QR1Cff4GwjzjZ2CfA1oqigrVGp0rFVuIJngcNVbSkEliepjlqGwLa9q0UEFS82XBPQ6sLtzD8eHYcQ; SRCHD=AF=NOFORM; PPLState=1; NAP=V=1.9&E=1bbe&C=11aKZsROqNU4bCdy_mJGBxCQ6dDjLan2xh8P02N5Ujqr749QLuxujg&W=1; _RwBf=mta=0&rc=172&rb=172&gb=0&rg=0&pc=169&mtu=0&rbb=0.0&g=0&cid=&clo=0&v=1&l=2023-03-21T07:00:00.0000000Z&lft=0001-01-01T00:00:00.0000000&aof=0&o=0&p=bingcopilotwaitlist&c=MY00IA&t=8237&s=2023-02-13T18:43:50.2301409+00:00&ts=2023-03-22T03:52:33.1813966+00:00&rwred=0&wls=2&lka=0&lkt=0&TH=&e=rynsTHLh5SZL9Lup1JFA_dPoH0SLQ4Ttw1xmuETgz6rcXPVeTLX62HcU-78F_obsk7C7I5sXcAA57re9xO5Aeao9uL28k-b5C7FzxuHrBxE&A=6261FC78268FAE2BDFF62E33FFFFFFFF&r=1; _UR=QS=0&TQS=0; _EDGE_S=SID=034C428B313F62202072505730376347&ui=en-us; USRLOC=HS=1&ELOC=LAT=22.664276123046875|LON=114.05741119384766|N=Longgang%2C%20Guangdong|ELT=4|; _HPVN=CS=eyJQbiI6eyJDbiI6MSwiU3QiOjAsIlFzIjowLCJQcm9kIjoiUCJ9LCJTYyI6eyJDbiI6MSwiU3QiOjAsIlFzIjowLCJQcm9kIjoiSCJ9LCJReiI6eyJDbiI6MSwiU3QiOjAsIlFzIjowLCJQcm9kIjoiVCJ9LCJBcCI6dHJ1ZSwiTXV0ZSI6dHJ1ZSwiTGFkIjoiMjAyMy0wMy0yMlQwMDowMDowMFoiLCJJb3RkIjowLCJHd2IiOjAsIkRmdCI6bnVsbCwiTXZzIjowLCJGbHQiOjAsIkltcCI6MX0=; KievRPSSecAuth=FABSBBRaTOJILtFsMkpLVWSG6AN6C/svRwNmAAAEgAAACKSDk/d85cptEAR6OeOINnkxgQ4pMNdn0gSN50uHqeULBsfhln/3HIBrSDwIs5Y8y4q1hEMtE4ofd79JDD9STA6f4mWrejZmzST4MlasSpDseqzEuEqLPfcQukYopTu82qCCfUIbpszQ3/6ltz6T2YUrAgyNHkgLTHvGEUOUz3aSsNAK5MZJUQNN6NzhIUXv4s3f2yqiAh0g6TKn/atvYO91V6vVihFBAgkPXBNKtRKh2A9e6ggkqDR56AcAY6KHisEv/7QDlZNYiKrBoXafyGpM6C+W4XEmilRvAdgWeT1h3lVHUZ9QqcZ/1XnaRBO8/6VCQXN9B4iy7ai7WzQXO4d5uZbESX/ZuyxJ9OWfFg+EtyDN7wkByTAfjOzZiEI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CHUID=V=2&GUID=2A1BFB0B81424E29AF92E86527B4441C&dmnchg=1; WLID=SKbKoNfxc6pKc/EtvYkPIVVX5ufPfql2c8Y38TR/6sv7cdHj9mGtM8mErB/CeUyak67sQ7Gr8ju6lTlL4/btrPm38YoTKtYox7+X9VvK6ak=; WLS=C=ae6a57d30678c427&N=%e7%82%8e"
header = "authority: edgeservices.bing.com"
header = "accept: application/json"
header = "accept-language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6"
header = "content-type: application/json"
header = "referer: https://edgeservices.bing.com/edgesvc/chat"
header = "sec-ch-ua: \"Microsoft Edge\"=\"111\", \"Not(A:Brand\";v=\"8\", \"Chromium\";v=\"111\""
header = "sec-ch-ua-mobile: ?0"
header = "sec-ch-ua-platform: \"Windows\""
header = "sec-fetch-dest: empty"
header = "sec-fetch-mode: cors"
header = "sec-fetch-site: same-origin"
header = "x-ms-client-request-id: e7320e0d-2a55-4318-899f-17671d86e272"
header = "x-ms-useragent: azsdk-js-api-client-factory/1.0.0-beta.1 core-rest-pipeline/1.10.0 OS/Win32"
curl filter data:
HTTP/1.1 200 Connection established
[1mProxy-agent[0m: netentsec
[1mConnection[0m: close
curl filter data:
HTTP/2 200
[1mcache-control[0m: private
[1mcontent-length[0m: 243
[1mcontent-type[0m: application/json; charset=utf-8
[1mp3p[0m: CP="NON UNI COM NAV STA LOC CURa DEVa PSAa PSDa OUR IND"
[1mset-cookie[0m: MUIDB=0DA61112D074646E25E303C6D474662B; expires=Mon, 15-Apr-2024 04:45:46 GMT; path=/; HttpOnly
[1mset-cookie[0m: SRCHHPGUSR=SRCHLANG=en&DM=0&CW=2489&CH=1321&SCW=2489&SCH=1321&BRW=XW&BRH=T&DPR=1.0&UTC=480&PV=5.15.75&PRVCW=360&PRVCH=636&EXLTT=2&HV=1678946709&WTS=63815053692; domain=.bing.com; expires=Sat, 22-Mar-2025 04:45:46 GMT; path=/; secure; SameSite=None
[1maccess-control-allow-credentials[0m: true
[1maccess-control-allow-origin[0m: *
[1maccept-ch[0m: Sec-CH-UA-Bitness, Sec-CH-UA-Arch, Sec-CH-UA-Full-Version, Sec-CH-UA-Mobile, Sec-CH-UA-Model, Sec-CH-UA-Platform-Version, Sec-CH-UA-Full-Version-List, Sec-CH-UA-Platform, Sec-CH-UA, UA-Bitness, UA-Arch, UA-Full-Version, UA-Mobile, UA-Model, UA-Platform-Version, UA-Platform, UA
[1museragentreductionoptout[0m: A7kgTC5xdZ2WIVGZEfb1hUoNuvjzOZX3VIV/BA6C18kQOOF50Q0D3oWoAm49k3BQImkujKILc7JmPysWk3CSjwUAAACMeyJvcmlnaW4iOiJodHRwczovL3d3dy5iaW5nLmNvbTo0NDMiLCJmZWF0dXJlIjoiU2VuZEZ1bGxVc2VyQWdlbnRBZnRlclJlZHVjdGlvbiIsImV4cGlyeSI6MTY4NDg4NjM5OSwiaXNTdWJkb21haW4iOnRydWUsImlzVGhpcmRQYXJ0eSI6dHJ1ZX0=
[1mcontent-security-policy-report-only[0m: script-src https: 'strict-dynamic' 'report-sample' 'nonce-n33nILzOD4g7Ya7hb/3iuL0TukTZQFHLDVhXleb+tQQ='; base-uri 'self';report-to csp-endpoint
[1mreport-to[0m: {"group":"csp-endpoint","max_age":86400,"endpoints":[{"url":"https://aefd.nelreports.net/api/report?cat=bingcsp"}]}
[1mx-cache[0m: CONFIG_NOCACHE
[1mx-msedge-ref[0m: Ref A: 0761CFD024784B6693F4221C0A332D79 Ref B: HKBEDGE0507 Ref C: 2023-03-22T04:45:46Z
[1mdate[0m: Wed, 22 Mar 2023 04:45:45 GMT
curl filter data:
{"conversationId":"51D|BingProd|7EB91EAAB6745C7480771D8CF393C36FE6748CC98D39F591F8DCA3DBBD1073A3","clientId":"1055521839948237","conversationSignature":"e4MKdNrLX0d7eYRyXOEdBXVVdjAsJBxiQp/rQQpzbSY=","result":{"value":"Success","message":null}}
curl process sentinel: finished
status:
(200 . Connection established)
headers:
(() ([1mConnection[0m . close) ([1mProxy-agent[0m . netentsec))
body:
HTTP/2 200
[1mcache-control[0m: private
[1mcontent-length[0m: 243
[1mcontent-type[0m: application/json; charset=utf-8
[1mp3p[0m: CP="NON UNI COM NAV STA LOC CURa DEVa PSAa PSDa OUR IND"
[1mset-cookie[0m: MUIDB=0DA61112D074646E25E303C6D474662B; expires=Mon, 15-Apr-2024 04:45:46 GMT; path=/; HttpOnly
[1mset-cookie[0m: SRCHHPGUSR=SRCHLANG=en&DM=0&CW=2489&CH=1321&SCW=2489&SCH=1321&BRW=XW&BRH=T&DPR=1.0&UTC=480&PV=5.15.75&PRVCW=360&PRVCH=636&EXLTT=2&HV=1678946709&WTS=63815053692; domain=.bing.com; expires=Sat, 22-Mar-2025 04:45:46 GMT; path=/; secure; SameSite=None
[1maccess-control-allow-credentials[0m: true
[1maccess-control-allow-origin[0m: *
[1maccept-ch[0m: Sec-CH-UA-Bitness, Sec-CH-UA-Arch, Sec-CH-UA-Full-Version, Sec-CH-UA-Mobile, Sec-CH-UA-Model, Sec-CH-UA-Platform-Version, Sec-CH-UA-Full-Version-List, Sec-CH-UA-Platform, Sec-CH-UA, UA-Bitness, UA-Arch, UA-Full-Version, UA-Mobile, UA-Model, UA-Platform-Version, UA-Platform, UA
[1museragentreductionoptout[0m: A7kgTC5xdZ2WIVGZEfb1hUoNuvjzOZX3VIV/BA6C18kQOOF50Q0D3oWoAm49k3BQImkujKILc7JmPysWk3CSjwUAAACMeyJvcmlnaW4iOiJodHRwczovL3d3dy5iaW5nLmNvbTo0NDMiLCJmZWF0dXJlIjoiU2VuZEZ1bGxVc2VyQWdlbnRBZnRlclJlZHVjdGlvbiIsImV4cGlyeSI6MTY4NDg4NjM5OSwiaXNTdWJkb21haW4iOnRydWUsImlzVGhpcmRQYXJ0eSI6dHJ1ZX0=
[1mcontent-security-policy-report-only[0m: script-src https: 'strict-dynamic' 'report-sample' 'nonce-n33nILzOD4g7Ya7hb/3iuL0TukTZQFHLDVhXleb+tQQ='; base-uri 'self';report-to csp-endpoint
[1mreport-to[0m: {"group":"csp-endpoint","max_age":86400,"endpoints":[{"url":"https://aefd.nelreports.net/api/report?cat=bingcsp"}]}
[1mx-cache[0m: CONFIG_NOCACHE
[1mx-msedge-ref[0m: Ref A: 0761CFD024784B6693F4221C0A332D79 Ref B: HKBEDGE0507 Ref C: 2023-03-22T04:45:46Z
[1mdate[0m: Wed, 22 Mar 2023 04:45:45 GMT
{"conversationId":"51D|BingProd|7EB91EAAB6745C7480771D8CF393C36FE6748CC98D39F591F8DCA3DBBD1073A3","clientId":"1055521839948237","conversationSignature":"e4MKdNrLX0d7eYRyXOEdBXVVdjAsJBxiQp/rQQpzbSY=","result":{"value":"Success","message":null}}
@lyjdwh Please look at https://github.com/xhcoding/emacs-aichat/issues/7
About a week ago, the aichat-bingai-chat feature was working fine for me. However, after a recent update, I'm now encountering an error whenever I try to ask a question using it. The error message I receive is:
I followed the instructions provided in the README file and opted for the second authentication method which required me to download a cookie file. Can you please assist me in resolving this issue?