Skip to content
Nicolay Rusnachenko edited this page Dec 14, 2024 · 7 revisions

API

from bulk_chain.infer import iter_content

responses_it = iter_content(
    # 1. Your iterator of dictionaries
    data_it,
    # 2. Your third-party model implementation.
    llm=Replicate(model_name="meta/meta-llama-3-8b-instruct", 
                  api_token="<API-TOKEN>"),
    # 3. Your schema.              
    schema="ext/schema/default.json")
    
for data in responses_it:
    # Handle your LLM responses here ...
Clone this wiki locally