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
from clarifai.client import Model | |
model = Model("https://clarifai.com/your-username/local-runner-app/models/local-runner-model") | |
response = model.predict(prompt="Explain retrieval-augmented generation.") | |
print(response) |
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
clarifai model local-runner |
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
pip install -r requirements.txt |
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
clarifai model init --toolkit huggingface --model-name Qwen/Qwen3-1.7B |
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
export HF_TOKEN=YOUR_HF_ACCESS_TOKEN |
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
export CLARIFAI_PAT=YOUR_PERSONAL_ACCESS_TOKEN |
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
clarifai login |
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
pip install --upgrade clarifai |
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
from agno.team import Team | |
from agno.tools.yfinance import YFinanceTools | |
# Web research agent | |
web_agent = Agent( | |
name="Web Research Agent", | |
role="Fetch news and current information", | |
model=OpenAILike( | |
id="openai/chat-completion/models/gpt-oss-120b", | |
api_key=os.environ["CLARIFAI_PAT"], |
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
from agno.knowledge.embedder.openai import OpenAIEmbedder | |
from agno.knowledge.knowledge import Knowledge | |
from agno.vectordb.lancedb import LanceDb, SearchType | |
import nest_asyncio; nest_asyncio.apply() | |
embedder = OpenAIEmbedder( | |
id="openai/embed/models/text-embedding-ada-002", | |
api_key=os.environ["CLARIFAI_PAT"], | |
base_url="https://api.clarifai.com/v2/ext/openai/v1" | |
) |
NewerOlder