one-api/relay/adaptor
Laisky.Cai 4ba562c63d 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:56 +00:00
..
ai360 chore: reorganize adaptor related package 2024-04-06 01:36:48 +08:00
aiproxy chore: reorganize common package 2024-04-06 02:03:59 +08:00
ali chore: reorganize common package 2024-04-06 02:03:59 +08:00
anthropic feat: support aws bedrockruntime claude3 2024-04-18 03:25:32 +00:00
aws fix: Refactor AWS Adapter for Improved Model Mapping and Error Handling 2024-04-19 02:08:56 +00:00
azure chore: reorganize common package 2024-04-06 02:03:59 +08:00
baichuan chore: reorganize adaptor related package 2024-04-06 01:36:48 +08:00
baidu chore: remove helper & util subpackage for relay 2024-04-06 01:50:12 +08:00
gemini feat: able to change gemini version (close #1211) 2024-04-06 20:48:22 +08:00
groq chore: reorganize adaptor related package 2024-04-06 01:36:48 +08:00
lingyiwanwu chore: reorganize adaptor related package 2024-04-06 01:36:48 +08:00
minimax chore: fix refactor caused typo 2024-04-06 02:12:50 +08:00
mistral chore: reorganize adaptor related package 2024-04-06 01:36:48 +08:00
moonshot chore: reorganize adaptor related package 2024-04-06 01:36:48 +08:00
ollama chore: reorganize adaptor related package 2024-04-06 01:36:48 +08:00
openai feat: add gpt-4-turbo support (close #1304) 2024-04-13 11:39:31 +08:00
palm chore: reorganize adaptor related package 2024-04-06 01:36:48 +08:00
stepfun chore: reorganize adaptor related package 2024-04-06 01:36:48 +08:00
tencent chore: reorganize adaptor related package 2024-04-06 01:36:48 +08:00
xunfei chore: reorganize common package 2024-04-06 02:03:59 +08:00
zhipu chore: reorganize adaptor related package 2024-04-06 01:36:48 +08:00
common.go chore: remove helper & util subpackage for relay 2024-04-06 01:50:12 +08:00
interface.go chore: reorganize adaptor related package 2024-04-06 01:36:48 +08:00