Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Building LLM Powered  Applications
  • Toc
  • feedback
Building LLM Powered  Applications

Building LLM Powered Applications

By : Valentina Alto
4.2 (22)
close
Building LLM Powered  Applications

Building LLM Powered Applications

4.2 (22)
By: Valentina Alto

Overview of this book

Building LLM Powered Applications delves into the fundamental concepts, cutting-edge technologies, and practical applications that LLMs offer, ultimately paving the way for the emergence of large foundation models (LFMs) that extend the boundaries of AI capabilities. The book begins with an in-depth introduction to LLMs. We then explore various mainstream architectural frameworks, including both proprietary models (GPT 3.5/4) and open-source models (Falcon LLM), and analyze their unique strengths and differences. Moving ahead, with a focus on the Python-based, lightweight framework called LangChain, we guide you through the process of creating intelligent agents capable of retrieving information from unstructured data and engaging with structured data using LLMs and powerful toolkits. Furthermore, the book ventures into the realm of LFMs, which transcend language modeling to encompass various AI tasks and modalities, such as vision and audio. Whether you are a seasoned AI expert or a newcomer to the field, this book is your roadmap to unlock the full potential of LLMs and forge a new era of intelligent machines.
Table of Contents (16 chapters)
close
14
Other Books You May Enjoy
15
Index

Front-end with Streamlit

Now that we have seen the logic behind an LLM-powered DBCopilot, it is now time to give a GUI to our applicatino. To do so, we will once again leverage Streamlit. As always, you can find the whole Python code in the GitHub book repository at https://github.com/PacktPublishing/Building-Large-Language-Model-Applications.As per the previous sections, also in this case you need to create a .py file to run in your terminal via streamlit run file.py. In our case, the file will be named dbcopilot.py.Below the main steps to setup the front-end:

  • Configuring the application webpage:
import streamlit as st
st.set_page_config(page_title="DBCopilot", page_icon="")
st.header(' Welcome to DBCopilot, your copilot for structured databases.')
  • Importing the credentials and establishing the connection towards the Chinook database:
load_dotenv()
#os.environ["HUGGINGFACEHUB_API_TOKEN"]
openai_api_key = os.environ['OPENAI_API_KEY&apos...
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete