Download llm.py from mlops-pltf/hf-agents-final-assignment: direct link, hf CLI and curl.
- Browser
- Download file 384 Bytes
-
https://huggingface.co/spaces/mlops-pltf/hf-agents-final-assignment/resolve/main/llm.py
- Command line
-
hf download hf://spaces/mlops-pltf/hf-agents-final-assignment/llm.py
-
curl -L -o llm.py https://huggingface.co/spaces/mlops-pltf/hf-agents-final-assignment/resolve/main/llm.py
384 Bytes
| from langchain_openai import ChatOpenAI | |
| from langchain_openai import OpenAIEmbeddings | |
| embedding_llm = OpenAIEmbeddings( | |
| model="text-embedding-3-large", | |
| # With the `text-embedding-3` class | |
| # of models, you can specify the size | |
| # of the embeddings you want returned. | |
| # dimensions=1024 | |
| ) | |
| vision_llm = ChatOpenAI(model="gpt-4o") | |
| chat_llm = ChatOpenAI(model="gpt-4o") |