mmdsnb

Results 2 comments of mmdsnb

code in entity_extraction_prompt.py ```python tokens_left = ( max_token_count - num_tokens_from_string(prompt, model=encoding_model) # encoding_model =o200k_base - num_tokens_from_string(entity_types, model=encoding_model) if entity_types else 0 ) ``` ```python def num_tokens_from_string( string: str, model: str...