kaxil commented on code in PR #69867:
URL: https://github.com/apache/airflow/pull/69867#discussion_r3581052183


##########
providers/common/ai/docs/self_hosted_models.rst:
##########
@@ -0,0 +1,269 @@
+ .. Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+ ..   http://www.apache.org/licenses/LICENSE-2.0
+
+ .. Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+.. _howto/self_hosted_models:
+
+Self-hosted models
+===================
+
+This guide serves an open model on your own infrastructure, points
+:class:`~airflow.providers.common.ai.hooks.pydantic_ai.PydanticAIHook` at it
+instead of a cloud provider, runs a ``@task.llm`` task and an
+``AgentOperator`` with tool calling against it, and then routes the same
+setup through a bearer-token AI gateway instead of talking to the server
+directly. Running a model locally keeps prompt and response data inside your
+own infrastructure, avoids per-call cost, and works offline.
+
+Before you start
+------------------
+
+This guide assumes a working :doc:`apache-airflow:installation/index`
+(Airflow 3.0+) already exists. Its job stops at wiring Airflow to a server
+that's already running -- it doesn't cover installing or operating the
+model-serving stack itself.
+
+Prerequisites
+^^^^^^^^^^^^^
+
+You need an OpenAI-compatible model server reachable from where Airflow
+runs, and hardware able to run the model you pick:
+
+- `Ollama <https://ollama.com/>`__ -- the server used throughout this guide;
+  see its `hardware support docs <https://docs.ollama.com/gpu>`__ for
+  GPU/CPU requirements.
+- `vLLM <https://docs.vllm.ai/>`__ -- a higher-throughput alternative,
+  commonly GPU-hosted; see its
+  `GPU installation requirements 
<https://docs.vllm.ai/en/latest/getting_started/installation/gpu/>`__.
+- `LM Studio <https://lmstudio.ai/>`__ -- a desktop app with a built-in
+  OpenAI-compatible server; see its
+  `system requirements <https://lmstudio.ai/docs/app/system-requirements>`__.
+
+Any other OpenAI-compatible server works the same way -- see pydantic-ai's
+`OpenAI-compatible models docs <https://ai.pydantic.dev/models/openai/>`__

Review Comment:
   Did you mean to link to 
https://pydantic.dev/docs/ai/models/overview/#openai-compatible-providers



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to