Chat model usage
Here is a minimal setup example for using PydanticAI chat models with Anaconda AI:server/<server-name> as the model name:
Embedding model usage
server/<server-name> as the model name:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
from pydantic import BaseModel
from anaconda_ai.integrations.pydantic_ai import AnacondaChatModel
class UserInfo(BaseModel):
name: str
age: int
model = AnacondaChatModel(
"OpenHermes-2.5-Mistral-7B_Q4_K_M.gguf",
extra_options={
'ctx_size': 4096,
'n_gpu_layers': 20,
'temp': 0.7
}
)
server/<server-name> as the model name:
model = AnacondaChatModel("server/my-server")
from anaconda_ai.integrations.pydantic_ai import AnacondaEmbeddingModel
embed = AnacondaEmbeddingModel(
"sentence-transformers/bge-small-en-v1.5/q4_k_m"
)
result = await embed.embed("cat", input_type="document")
server/<server-name> as the model name:
embed = AnacondaEmbeddingModel("server/my-server")
Was this page helpful?