Langchain contd
- Runnable interface and Refer Here for key methods
- Models in Langchain
- Text Models
- Chat Models
- For our purpose we use chat models & all chat models are derived from BaseChatModel, here we get additional capabilities rather than just invoke and stream we can

- Chat Models have a method which is bind tools which is for external tool executions, but ensure your model supports this.
SLMs
- We have many models which are SLMs which can be finetuned to perform a specific task which runs on your own servers.
-
We have options such as
- Microsoft phi
- Google Gemma
- Mistral
- LLAMA
- DeepSeek
-
Running a SLM on your system (Ubuntu Linux)
- WSL (Windows Subsystem for linux)
- Virtual Machine
Steps for GCP Vm Configuration
- Create a firewall rull called as open-all as described in the class
- Now on your local system
ssh-keygen
- This create public key and private in
~/.ssh/id_ed25519.puband~/.ssh/id_ed25519 - Create a vm and copy the ssh public key in ssh-keys section of gcp
- Now lets install ollama on ubuntu
Ollama pull <model>to get and run the model in the background & communicate with model via command lineollmama run <model>

