one-api/relay
Laisky.Cai 427739fb76 fix: Refactor AWS Adapter for Improved Model Mapping and Error Handling
* Refactor AWS adapter to improve model management
  - Replace hardcoded model list in `adapter.go` with a function to get models from `awsModelIDMap`
  - Update `GetModelList` function to return model list directly
  - Add `GetChannelName` function to get channel name from `Adaptor` object
* Improve error handling and code organization in main.go
  - Replace switch statement with a map to map AWS model IDs to OpenAI model IDs
  - Return an error if the model is not found in the map
  - Use a single return statement instead of wrapping multiple return statements in the `awsModelID` function
  - Add a new error message for when the model is not found in the map in the `Handler` function
2024-04-19 02:08:27 +00:00
..
adaptor fix: Refactor AWS Adapter for Improved Model Mapping and Error Handling 2024-04-19 02:08:27 +00:00
apitype feat: support aws bedrockruntime claude3 2024-04-18 02:52:26 +00:00
billing Merge commit '7bf61f916504097ac23efb765b938d8f94c342ce' 2024-04-17 05:18:58 +00:00
channel/tencent Refactor codebase, introduce relaymode package, update constants and improve consistency 2024-04-06 05:18:04 +00:00
channeltype feat: support aws bedrockruntime claude3 2024-04-18 02:52:26 +00:00
client Refactor codebase, introduce relaymode package, update constants and improve consistency 2024-04-06 05:18:04 +00:00
constant Refactor codebase, introduce relaymode package, update constants and improve consistency 2024-04-06 05:18:04 +00:00
controller feat: support aws bedrockruntime claude3 2024-04-18 02:52:26 +00:00
meta Refactor codebase, introduce relaymode package, update constants and improve consistency 2024-04-06 05:18:04 +00:00
model Refactor codebase, introduce relaymode package, update constants and improve consistency 2024-04-06 05:18:04 +00:00
relaymode Refactor codebase, introduce relaymode package, update constants and improve consistency 2024-04-06 05:18:04 +00:00
adaptor.go feat: support aws bedrockruntime claude3 2024-04-18 02:52:26 +00:00