openlit / openlit

OpenLIT: Complete Observability and Evals for the Entire GenAI Stack, from LLMs to GPUs. Improve your LLM apps from playground to production 📈. Supports 20+ monitoring integrations like OpenAI & LangChain. Collect and Send GPU performance, costs, tokens, user activity, LLM traces and metrics to any OpenTelemetry endpoint in just one line of code.

Home Page:https://docs.openlit.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Typo]: Some typos about GenAI Response in SemanticConvetion

CherishCai opened this issue · comments

Are there any typos?

# GenAI Response
GEN_AI_RESPONSE_ID = "gen_ai.response.id"
GEN_AI_RESPONSE_FINISH_REASON = "gen_ai.response.finish_reason"
GEN_AI_RESPONSE_IMAGE = "gen_ai.response.image" # Not used directly in code yet
GEN_AI_RESPONSE_IMAGE_SIZE = "gen_ai.request.image_size"
GEN_AI_RESPONSE_IMAGE_QUALITY = "gen_ai.request.image_quality"
GEN_AI_RESPONSE_IMAGE_STYLE = "gen_ai.request.image_style"

maybe change L66-L68

    GEN_AI_RESPONSE_IMAGE_SIZE = "gen_ai.request.image_size"
    GEN_AI_RESPONSE_IMAGE_QUALITY = "gen_ai.request.image_quality"
    GEN_AI_RESPONSE_IMAGE_STYLE = "gen_ai.request.image_style"

to

    GEN_AI_RESPONSE_IMAGE_SIZE = "gen_ai.response.image_size"
    GEN_AI_RESPONSE_IMAGE_QUALITY = "gen_ai.response.image_quality"
    GEN_AI_RESPONSE_IMAGE_STYLE = "gen_ai.response.image_style"

Hey @CherishCai , Good catch. I

think it needs to be the other way round. the values are correct, the variable names are wrong as its collected from the request metadata itself. So it should be

  GEN_AI_REQUEST_IMAGE_SIZE = "gen_ai.request.image_size"
  GEN_AI_REQUEST_IMAGE_QUALITY = "gen_ai.request.image_quality"
  GEN_AI_REQUEST_IMAGE_STYLE = "gen_ai.request.image_style"

and since this is a variable change, the naming would need to change across the entire SDK code. Lemme know if you wanna contribute it as a PR?

@patcher9 I wanna contribute it as a PR.
And these codes need to be moved to line 55( under GEN_AI_REQUEST_TRAINING_FILE = "gen_ai.request.training_file"), Is that right?

Ill keep this issue open for now until GEN_AI_REQUEST_IMAGE_QUALITY and GEN_AI_REQUEST_IMAGE_STYLE are also updated. Would you also wanna PR these two up?

Ill keep this issue open for now until GEN_AI_REQUEST_IMAGE_QUALITY and GEN_AI_REQUEST_IMAGE_STYLE are also updated. Would you also wanna PR these two up?

@patcher9 It was modified together at #295

yeah this is good to close. I mistakenly just went with the PR title.

Thanks @CherishCai as always!!