This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ollama library version here: https://gist.github.com/Andrey862/94c5760d79fe3674f4294a26bab5fdfb | |
from typing import cast | |
from langchain_core.messages.ai import AIMessage | |
from langchain_core.messages.base import BaseMessage | |
from langchain_core.messages.system import SystemMessage | |
from langchain_ollama.chat_models import ChatOllama | |
from pydantic import BaseModel | |
model = ChatOllama(model="qwen3:8b", temperature=0.1, top_k=2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# langchain version here https://gist.github.com/Andrey862/4bb795b3301572f979baa04edff44fa6 | |
from typing import Any, Literal, Mapping, Sequence | |
from ollama import chat | |
from pydantic import BaseModel | |
model = "qwen3:8b" | |
options = {"temperature": 0.1, "top_k": 2} | |