test(test_completion.py): add testing for anthropic vision calling

This commit is contained in:
Krrish Dholakia 2024-03-04 13:34:49 -08:00
parent 33afa53353
commit edda2d9293
4 changed files with 81 additions and 5 deletions

View file

@ -200,6 +200,10 @@ def map_finish_reason(
return "content_filter"
elif finish_reason == "STOP": # vertex ai
return "stop"
elif finish_reason == "end_turn" or finish_reason == "stop_sequence": # anthropic
return "stop"
elif finish_reason == "max_tokens": # anthropic
return "length"
return finish_reason