From the course: Foundations of AI and Machine Learning for Java Developers

Unlock this course with a free trial

Join today to access over 24,500 courses taught by industry experts.

Accessing LLMs via stateless REST APIs

Accessing LLMs via stateless REST APIs

- [Instructor] Practically, all of the language models provide REST APIs to their services. This allows developers to access the language model or any of the other services via any programming language. So we could write programs that use gen AI services via Java, JavaScript, Python, C or C++, C#, or even a shell script. REST APIs certainly are an effective technique in a polyglot environment, which is typically true in large companies. This allows you to build gen AI-powered applications for mobile devices, laptops, notebooks, tablets, server-side environments, or even embedded devices like watches or automobiles. Chatbots clearly use these APIs when they hold human-like conversations with users. So these REST APIs are very important. Now, one thing about these language model REST APIs is that they are stateless. This means the network or the server does not maintain any persistent session information, that is state, about the client. Every request is independent and treated as a new…

Contents