add aws opus (#363)

# PR Checklist
- [x] Did you check if it works normally in all models? *ignore this
when it dosen't uses models*
- [x] Did you check if it works normally in all of web, local and node
hosted versions? if it dosen't, did you blocked it in those versions?
- [x] Did you added a type def?

# Description

![image](https://github.com/kwaroran/RisuAI/assets/133192207/863f5f58-69ff-4e81-97fb-c7212f1f8503)
This commit is contained in:
kwaroran
2024-04-17 10:45:29 +09:00
committed by GitHub

View File

@@ -1710,9 +1710,10 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model'
"anthropic.claude-v2:1",
"anthropic.claude-3-haiku-20240307-v1:0",
"anthropic.claude-3-sonnet-20240229-v1:0",
"anthropic.claude-3-opus-20240229-v1:0"
];
const awsModel = raiModel.includes("haiku") ? modelIDs[2] : modelIDs[3];
const awsModel = raiModel.includes("opus") ? modelIDs[4] : raiModel.includes("sonnet") ? modelIDs[3] : modelIDs[2];
const url = `https://${host}/model/${awsModel}/invoke${stream ? "-with-response-stream" : ""}`
const params = {