hugegraph-llm/src/hugegraph_llm/models/llms/openai.py [152:162]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                delta = chunk.choices[0].delta
                if delta.content:
                    token = delta.content
                    if on_token_callback:
                        on_token_callback(token)
                    yield token

        except openai.BadRequestError as e:
            log.critical("Fatal: %s", e)
            yield str(f"Error: {e}")
        except openai.AuthenticationError:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



hugegraph-llm/src/hugegraph_llm/models/llms/openai.py [189:201]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                delta = chunk.choices[0].delta
                if delta.content:
                    token = delta.content
                    if on_token_callback:
                        on_token_callback(token)
                    yield token
            # TODO: log.info("Token usage: %s", completions.usage.model_dump_json())
        # catch context length / do not retry
        except openai.BadRequestError as e:
            log.critical("Fatal: %s", e)
            yield str(f"Error: {e}")
        # catch authorization errors / do not retry
        except openai.AuthenticationError:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



