one-api/relay/channel/anthropic
Laisky.Cai fdde066252 Refactor: Anthropic model response proto update
- Refactor content response

- Update channel adaptor to support `claude_model`
- Remove `null` stop reasons from content responses
- Add logging for error responses
- Change content start, ping, and message delta types to return true
- Set stop reason to end turn when response does not include a stop reason
- Set content response stop reason to null
- Add error handling for unmarshalling stream responses
- Rename `Completion` to `Text` in type definitions and `StopReason` to `Delta.StopReason`
- Count tokens in the `Delta.Text` field of the response instead of `Completion`
- Remove `Model` from the full text response
- Trim \r from incoming data
2024-03-05 05:05:57 +00:00
..
adaptor.go Refactor: Anthropic model response proto update 2024-03-05 05:05:57 +00:00
constants.go refactor: use adaptor to do relay & test 2024-02-18 00:15:31 +08:00
main.go Refactor: Anthropic model response proto update 2024-03-05 05:05:57 +00:00
model.go Refactor: Anthropic model response proto update 2024-03-05 05:05:57 +00:00