# 🔃 Processor

We introduce the concept of "**Processor**".

If you are sending requests to an LLM provider, such as OpenAI, think about the processor as a restful API wrapper that takes a request(Input), sends the request to the provider(i.e. OpenAIService), and returns the response(Output).

Take OpenAI API as an example, there are so many endpoints, such as [completion](https://platform.openai.com/docs/api-reference/completions/create), [chat completion](https://platform.openai.com/docs/api-reference/chat/create), [embedding creation](https://platform.openai.com/docs/api-reference/embeddings/create), etc.

Each of them is a processor as they have different input types, different processing logic, and different output types.

```java
public interface Processor<I extends Input, O extends Output> {
  O run(I inputData);
  ListeanbleFuture<O> runAsync(I inputData);
}
```

The **processor** takes an **Input** and generates **Output**

