tabbyAPI-ollama/OAI/types
kingbri 5ae2a91c04 Tree: Use unwrap and coalesce for optional handling
Python doesn't have proper handling of optionals. The only way to
handle them is checking via an if statement if the value is None or
by using the "or" keyword to unwrap optionals.

Previously, I used the "or" method to unwrap, but this caused issues
due to falsy values falling back to the default. This is especially
the case with booleans were "False" changed to "True".

Instead, add two new functions: unwrap and coalesce. Both function
to properly implement a functional way of "None" coalescing.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-12-09 21:52:17 -05:00
..
chat_completion.py OAI: Fix chat completion streaming 2023-12-01 00:14:24 -05:00
common.py Tree: Use unwrap and coalesce for optional handling 2023-12-09 21:52:17 -05:00
completion.py Adding token usage support 2023-11-27 20:05:05 -08:00
lora.py Implement lora support (#24) 2023-12-08 23:38:08 -05:00
model.py API: Fix model load endpoint with draft 2023-12-06 18:05:55 -05:00
token.py Api: Add ban_eos_token and add_bos_token support 2023-11-15 00:55:15 -05:00