Skip to content

A programming framework for agentic AI

fix: created in ChatCompletion for clients (#2988)

HRUSHIKESH DOKALA20f8ba9cfae4
diff --git a/autogen/oai/anthropic.py b/autogen/oai/anthropic.py
index 9f9203ef2..0bbbec397 100644
--- a/autogen/oai/anthropic.py
+++ b/autogen/oai/anthropic.py
@@ -181,7 +181,7 @@ class AnthropicClient:
response_oai = ChatCompletion(
id=response.id,
model=anthropic_params["model"],
- created=int(time.time() * 1000),
+ created=int(time.time()),
object="chat.completion",
choices=choices,
usage=CompletionUsage(
diff --git a/autogen/oai/gemini.py b/autogen/oai/gemini.py
index 30d4c3fe5..8babb8727 100644
--- a/autogen/oai/gemini.py
+++ b/autogen/oai/gemini.py
@@ -253,7 +253,7 @@ class GeminiClient:
response_oai = ChatCompletion(
id=str(random.randint(0, 1000)),
model=model_name,
- created=int(time.time() * 1000),
+ created=int(time.time()),
object="chat.completion",
choices=choices,
usage=CompletionUsage(
diff --git a/autogen/oai/mistral.py b/autogen/oai/mistral.py
index 832369376..8017e3536 100644
--- a/autogen/oai/mistral.py
+++ b/autogen/oai/mistral.py
@@ -175,7 +175,7 @@ class MistralAIClient:
response_oai = ChatCompletion(
id=mistral_response.id,
model=mistral_response.model,
- created=int(time.time() * 1000),
+ created=int(time.time()),
object="chat.completion",
choices=choices,
usage=CompletionUsage(
diff --git a/autogen/oai/together.py b/autogen/oai/together.py
index ef6c09804..bbbe851ba 100644
--- a/autogen/oai/together.py
+++ b/autogen/oai/together.py
@@ -209,7 +209,7 @@ class TogetherClient:
response_oai = ChatCompletion(
id=response.id,
model=together_params["model"],
- created=int(time.time() * 1000),
+ created=int(time.time()),
object="chat.completion",
choices=choices,
usage=CompletionUsage(