Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adding support for openai image edit #54

Merged
merged 2 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion schemas/llm_span_attributes.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@
"llm.retrieval.results": {
"type": "string"
},
"llm.image.size": {
"type": "string"
},
"llm.response_format": {
"type": "string"
},
"http.max.retries": {
"type": "integer",
"format": "int32"
Expand All @@ -150,4 +156,4 @@
"url.full",
"llm.api"
]
}
}
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name="trace-attributes", # Choose a unique name for PyPI
version="4.0.4",
version="4.0.5",
author="Karthik Kalyanaraman",
author_email="[email protected]",
description="LangTrace - Trace Attributes",
Expand Down
1 change: 1 addition & 0 deletions src/python/langtrace/trace_attributes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class Event(Enum):
class OpenAIMethods(Enum):
CHAT_COMPLETION = "openai.chat.completions.create"
IMAGES_GENERATION = "openai.images.generate"
IMAGES_EDIT = "openai.images.edit"
EMBEDDINGS_CREATE = "openai.embeddings.create"


Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# generated by datamodel-codegen:
# filename: llm_span_attributes.json
# timestamp: 2024-05-17T15:49:22+00:00
# timestamp: 2024-06-06T05:12:56+00:00

from __future__ import annotations

Expand Down Expand Up @@ -59,6 +59,8 @@ class LLMSpanAttributes(BaseModel):
llm_embedding_job_name: Optional[str] = Field(None, alias="llm.embedding_job_name")
llm_retrieval_query: Optional[str] = Field(None, alias="llm.retrieval.query")
llm_retrieval_results: Optional[str] = Field(None, alias="llm.retrieval.results")
llm_image_size: Optional[str] = Field(None, alias="llm.image.size")
llm_response_format: Optional[str] = Field(None, alias="llm.response_format")
http_max_retries: Optional[int] = Field(None, alias="http.max.retries")
http_timeout: Optional[int] = Field(None, alias="http.timeout")
langtrace_testId: Optional[str] = Field(None, alias="langtrace.testId")
2 changes: 2 additions & 0 deletions src/typescript/models/llm_span_attributes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ export interface LLMSpanAttributes {
"llm.embedding_job_name"?: string;
"llm.retrieval.query"?: string;
"llm.retrieval.results"?: string;
"llm.image.size"?: string;
"llm.response_format"?: string;
"http.max.retries"?: number;
"http.timeout"?: number;
"langtrace.testId"?: string;
Expand Down
1 change: 1 addition & 0 deletions src/typescript/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export enum Event {
export enum OpenAIMethods {
CHAT_COMPLETION = "openai.chat.completions.create",
IMAGES_GENERATION = "openai.images.generate",
IMAGES_EDIT = "openai.images.edit",
EMBEDDINGS_CREATE = "openai.embeddings.create",
}

Expand Down
Loading