Skip to content

Latest commit

 

History

17 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

omop-llm

Shared chat/embedding backend contract for the OMOP stack, built on any-llm. One typed ModelBackend interface (sync and async methods, both real), a closed set of supported providers (local: ollama, llamacpp, vllm; cloud: openai, anthropic, gemini), and explicit capability declarations instead of provider-name guessing. Extended documentation can be found here.

from omop_llm import build_model_backend, Capabilities

backend = build_model_backend(
    provider="ollama", model="llama3:8b", base_url="http://localhost:11434",
    model_capabilities=Capabilities(),  # plain chat only -- nothing else needed here
)

# async
response = await backend.async_complete([{"role": "user", "content": "Hello"}])

# sync
response = backend.complete([{"role": "user", "content": "Hello"}])

Or resolved from an oa-configurator stack config:

from oa_configurator import Resolver, load_stack_config
from omop_llm import build_model_backend_from_resolved

resolved = Resolver(load_stack_config()).resolve_model("embed-default")
backend = build_model_backend_from_resolved(resolved)

See docs/index.md for the full design (provider registry, capability model, structured extraction).

About

LLM infrastructure for embedding and instructor tasks

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages