Incorrect configuration code for micrometer springboot prometheus

I have executed a query ::
micrometer springboot prometheus code. the configuration code that it returned to me is incorrect.
chatGPT code:
@Configuration
public class MetricsConfiguration {

@Bean
public PrometheusConfig prometheusConfig() {
    return new PrometheusConfig();
}

@Bean
public MeterRegistry meterRegistry(PrometheusConfig prometheusConfig) {
    return new PrometheusMeterRegistry(prometheusConfig, Clock.SYSTEM);
}

@Bean
public JvmGcMetrics jvmGcMetrics() {
    return new JvmGcMetrics();
}

@Bean
public JvmMemoryMetrics jvmMemoryMetrics() {
    return new JvmMemoryMetrics();
}

@Bean
public JvmThreadMetrics jvmThreadMetrics() {
    return new JvmThreadMetrics();
}

@Bean
public ClassLoaderMetrics classLoaderMetrics() {
    return new ClassLoaderMetrics();
}

}

In this
@Bean
public PrometheusConfig prometheusConfig() {
return new PrometheusConfig();
}

it is trying to create object of interface PrometheusConfig.

please check what issue is with chatgpt and why it is giving incorrect code. either it should give information that is legitimate or should not give, but should not give incorrect answer