Skip to content

Additional suffix to return response #2657

@leminhnguyen

Description

@leminhnguyen

Confirm this is an issue with the Python library and not an underlying OpenAI API

  • This is an issue with the Python library

Describe the bug

  • When I create embedding using openai sdk, I passed model="text-embedding-ada-002" as the parameter, but in the response model has an additional suffix -v2. Don't know why this happen which will break the post process code in my application.

To Reproduce

Run the code snippet below

Code snippets

from openai import OpenAI
import os
from dotenv import load_dotenv
load_dotenv()

openai_client = OpenAI(
    api_key=os.getenv("OPENAI_API_KEY")
)

response = openai_client.embeddings.create(
    input=["Hello world", "Bonjour le monde"],
    model="text-embedding-ada-002"
)

print(response.model)
# print text-embedding-ada-002-v2

OS

linux

Python version

3.11.13

Library version

1.108.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions