Skip to content
This repository was archived by the owner on Feb 11, 2025. It is now read-only.

[FEATURE] Add support for Chat Completion Input Audio #53

Closed
sergioverde90 opened this issue Jan 27, 2025 · 3 comments · Fixed by #54
Closed

[FEATURE] Add support for Chat Completion Input Audio #53

sergioverde90 opened this issue Jan 27, 2025 · 3 comments · Fixed by #54

Comments

@sergioverde90
Copy link
Contributor

Is your feature request related to a problem? Please describe.
As discussed in langchain4j/langchain4j#2434 (comment), the base code for Content.java has to be updated in order to support the input_audio content type.

Describe the solution you'd like

public enum ContentType {

    @JsonProperty("text")
    TEXT,
    @JsonProperty("image_url")
    IMAGE_URL,
    
   // NEW!
    @JsonProperty("input_audio")
    AUDIO
}

...

@JsonDeserialize(builder = InputAudio.Builder.class)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public class InputAudio {

    private String data;
    private String format;

...
@sergioverde90
Copy link
Contributor Author

Hi guys,

I'm trying to implement this but as far as I see the unit tests are using the real OpenAI API, so I need a "subscription" (add the payment method and take into account the tokens) in order to run the unit tests locally, am I right?

@dliubarskyi
Copy link
Contributor

Hi @sergioverde90, yes, you need an API key to test. I can provide a temporary one if you'll ping me via email: [email protected].
How do you plan to use this feature though? Which LLM provider do you plan to use?

@sergioverde90
Copy link
Contributor Author

sergioverde90 commented Jan 28, 2025

Thanks @dliubarskyi,

Because I want to contribute with something useful to this project, my aim is to solve langchain4j/langchain4j#2434 because it looks a good starting point. So answering your question I only plan to use the key to pass the tests locally, but maybe there are some alternatives to that. And becasue the original issue points to OpenAI that's the provider I would use.

It's almost implemented btw, but I want (and have) to run the tests to verify that everything is working as expected.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants