> For the complete documentation index, see [llms.txt](https://knowly-ai.gitbook.io/langtorch/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://knowly-ai.gitbook.io/langtorch/processor.md).

# 🔃 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**
