Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support Coze #2227

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

feat: support Coze #2227

wants to merge 2 commits into from

Conversation

LarryZhu-dev
Copy link

支持 火山 Coze

@LarryZhu-dev
Copy link
Author

feat: #1775

@zemelLeong
Copy link

这样的回复是正常的吗

[INFO][2024-08-15 18:48:20][bridge.py:70] - create bot coze for chat
你好
[INFO][2024-08-15 18:48:23][wechat_channel.py:214] - [WX] sendMsg=Reply(type=TEXT, content=[bot] {"msg_type":"generate_answer_finish","data":"{\"finish_reason\":0}","from_module":null,"from_unit":null}), receiver=@966f86fb0ae81712b3805a50ba2acba2585615333bf852abf18a3c8bb007a603

@LarryZhu-dev
Copy link
Author

这样的回复是正常的吗

[INFO][2024-08-15 18:48:20][bridge.py:70] - create bot coze for chat
你好
[INFO][2024-08-15 18:48:23][wechat_channel.py:214] - [WX] sendMsg=Reply(type=TEXT, content=[bot] {"msg_type":"generate_answer_finish","data":"{\"finish_reason\":0}","from_module":null,"from_unit":null}), receiver=@966f86fb0ae81712b3805a50ba2acba2585615333bf852abf18a3c8bb007a603

不正常,content=[bot] ,[bot] 应该是回复内容,建议看下coze文档,或者先用postman试一下

@byang822
Copy link

Coze maintains conversation, you should create session if not exist and save conversation_id to local session.

@LarryZhu-dev
Copy link
Author

v2 still available,you can try for it or you update to v3 by your self

@LarryZhu-dev
Copy link
Author

LarryZhu-dev commented Aug 22, 2024

Coze maintains conversation, you should create session if not exist and save conversation_id to local session.

this's a MVP demo,it can support base options,if you want more,then you can edit it by your self。

and I guess the owner did not has a plan to merge it

@byang822
Copy link

Coze maintains conversation, you should create session if not exist and save conversation_id to local session.

this's a MVP demo,it can support base options,if you want more,then you can edit it by your self。

and I guess the owner did not has a plan to merge it

Just a kind reminder. We are investigating on this project + Coze too.

@jacob-raoyang
Copy link

jacob-raoyang commented Aug 31, 2024

I've been working on using coze api (non-CN version as coze.com, NOT the CN version as coze.cn) in CoW since early this week but haven't made it through yet. I had the correct key and the server can connect to my bot smoothly, but whenever i tried to activate CoW for a new chat, the request was rejected:

  1. saying I was not authorized when I used url v2: https://api.coze.cn/v2/chat
  2. saying 404 when I used url v3: https://api.coze.cn/v3/chat

@LarryZhu-dev
Copy link
Author

I've been working on using coze api (non-CN version as coze.com, NOT the CN version as coze.cn) in CoW since early this week but haven't made it through yet. I had the correct key and the server can connect to my bot smoothly, but whenever i tried to activate CoW for a new chat, the request was rejected:

  1. saying I was not authorized when I used url v2: https://api.coze.cn/v2/chat
  2. saying 404 when I used url v3: https://api.coze.cn/v3/chat

Coze.com may have different API links,you shuoldn't use the link in my code,just find the correct api and replace it,btw,the coze.com's paramaters & response may diffrent also

@jacob-raoyang
Copy link

I've been working on using coze api (non-CN version as coze.com, NOT the CN version as coze.cn) in CoW since early this week but haven't made it through yet. I had the correct key and the server can connect to my bot smoothly, but whenever i tried to activate CoW for a new chat, the request was rejected:

  1. saying I was not authorized when I used url v2: https://api.coze.cn/v2/chat
  2. saying 404 when I used url v3: https://api.coze.cn/v3/chat

Coze.com may have different API links,you shuoldn't use the link in my code,just find the correct api and replace it,btw,the coze.com's paramaters & response may diffrent also

Sorry for the wrong url here. They were https://api.coze.com/v3/chat and https://api.coze.com/v2/chat .

I made my attempts before searching for relevant discussions on github and I found this one closest to my problem...... A friend of mine made a successful one when V2 was the latest version of url for coze api so I asked him for help yesterday. Things didn't go as he expected when he duplicated exactly what he did a few months ago, either using the /v3/chat one or /v2/chat one.

@byang822
Copy link

byang822 commented Sep 2, 2024

I've been working on using coze api (non-CN version as coze.com, NOT the CN version as coze.cn) in CoW since early this week but haven't made it through yet. I had the correct key and the server can connect to my bot smoothly, but whenever i tried to activate CoW for a new chat, the request was rejected:

  1. saying I was not authorized when I used url v2: https://api.coze.cn/v2/chat
  2. saying 404 when I used url v3: https://api.coze.cn/v3/chat

Coze.com may have different API links,you shuoldn't use the link in my code,just find the correct api and replace it,btw,the coze.com's paramaters & response may diffrent also

Sorry for the wrong url here. They were https://api.coze.com/v3/chat and https://api.coze.com/v2/chat .

I made my attempts before searching for relevant discussions on github and I found this one closest to my problem...... A friend of mine made a successful one when V2 was the latest version of url for coze api so I asked him for help yesterday. Things didn't go as he expected when he duplicated exactly what he did a few months ago, either using the /v3/chat one or /v2/chat one.

You can verify the parameters(including the URL) by 'curl' command, as mentioned here:
https://www.coze.com/docs/developer_guides/coze_api_overview?_lang=en

If you choose v2, the URL would be:
https://api.coze.cn/open_api/v2/chat

And the last one, did you publish your agent to allow API access?
https://www.coze.cn/docs/developer_guides/preparation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants