Send message need to update model from claude-2 to claude-2.1
Error response:
{
"error": {
"type": "permission_error",
"message": "Invalid model",
"code": "model_not_allowed"
}
}
Chrome browser fetch:
{
"completion": {
"prompt": "Hi",
"timezone": "Asia/Shanghai",
"model": "claude-2.1" # update here
},
"organization_uuid": "xxxxxx",
"conversation_uuid": "xxxxxx",
"text": "Hi",
"attachments": []
}
=-=-=-=-= 2023/11/22 =-=-=-=-= Claude model name seems to be updated to 'claude-2.1' on 2023/11/22.
=-=-=-=-= 2023/11/21 =-=-=-=-= Claude model name seems to be updated to 'claude-2.0-magenta' on 2023/11/21.
Hi nt1r, did you try to update your code?
It shows this error today, not sure if it is related
Traceback (most recent call last):
File "/home/xxx/Claude-API/usecases/console_chat.py", line 32, in
Hi nt1r, did you try to update your code? It shows this error today, not sure if it is related
@wmcaeddy Hi, there. I'm not sure if this error is caused by the model name change. I'm not very good at Python, sorry I can't help you locate the error. Recently I've been referencing the code from this project and refactoring it using the Kotlin language. Today when I was writing the Ktor server side code I came across this Error, so I decided to open this Issue here.
Translated by Claude.
PS: You can checkout the pull request I submitted today and see if the error has been resolved.
@nt1r thank you, this is useful
Thanks for the update! I encountered a similar problem and your solution successfully solved the problem!
Traceback (most recent call last):
File "E:\0nlp\Claude-API-main\usecases\console_chat.py", line 43, in <module>
main()
File "E:\0nlp\Claude-API-main\usecases\console_chat.py", line 36, in main
response = claude.send_message(user_input, conversation_id, timeout=600)
File "E:\0nlp\Claude-API-main\claude-api\claude_api.py", line 137, in send_message
data = json.loads(json_str)
File "C:\Users\14416\AppData\Local\Programs\Python\Python39\lib\json\__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "C:\Users\14416\AppData\Local\Programs\Python\Python39\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\14416\AppData\Local\Programs\Python\Python39\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
It seems that the model has been updated, claude-2.1
It seems that the model has been updated, claude-2.1
you are right. thanks
Hi nt1r, did you try to update your code? It shows this error today, not sure if it is related
@wmcaeddy Hi, there. I'm not sure if this error is caused by the model name change. I'm not very good at Python, sorry I can't help you locate the error. Recently I've been referencing the code from this project and refactoring it using the Kotlin language. Today when I was writing the Ktor server side code I came across this Error, so I decided to open this Issue here.
Translated by Claude.
PS: You can checkout the pull request I submitted today and see if the error has been resolved.
Hello, do you have the the API translated in kotlin? May I ask if I can get a copy, I'm working on my school project, it will helps a lot. Thanks
Hello, do you have the the API translated in kotlin? May I ask if I can get a copy, I'm working on my school project, it will helps a lot. Thanks
here I have not yet added a readme.md file in the project. You can take a look at the ktor related documentation.
It seems that the model has been updated:claude-2.0
Reference https://github.com/KoushikNavuluri/Claude-API/issues/91
Bro,I had the same problem when using "send_message", the problem still exists after updating model, it is still in debug. If a brother found a solution, can you share it?
I think they updated their API, can't seem to see POST request in the network console, anyone can look up if there is changes?