diff --git a/Dockerfile b/Dockerfile index e6dd5d24..52f11ff8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,7 @@ ENV PYTHONPATH="${PYTHONPATH}:/app/servers/fastapi" RUN curl -fsSL https://ollama.com/install.sh | sh # Install dependencies for FastAPI -RUN pip install aiohttp aiomysql asyncpg fastapi[standard] \ +RUN pip install aiohttp aiomysql aiosqlite asyncpg fastapi[standard] \ pathvalidate pdfplumber nltk chromadb sqlmodel redis \ anthropic google-genai openai fastmcp RUN pip install docling --extra-index-url https://download.pytorch.org/whl/cpu diff --git a/Dockerfile.dev b/Dockerfile.dev index cb319990..3c9cbd74 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -26,7 +26,7 @@ ENV PYTHONPATH="${PYTHONPATH}:/app/servers/fastapi" RUN curl -fsSL http://ollama.com/install.sh | sh # Install dependencies for FastAPI -RUN pip install aiohttp aiomysql asyncpg fastapi[standard] \ +RUN pip install aiohttp aiomysql aiosqlite asyncpg fastapi[standard] \ pathvalidate pdfplumber nltk chromadb sqlmodel redis \ anthropic google-genai openai fastmcp RUN pip install docling --extra-index-url https://download.pytorch.org/whl/cpu diff --git a/servers/fastapi/get_test_schema.py b/servers/fastapi/get_test_schema.py deleted file mode 100644 index 0ae458b3..00000000 --- a/servers/fastapi/get_test_schema.py +++ /dev/null @@ -1,419 +0,0 @@ -import json -from typing import List, Literal, Optional -from pydantic import BaseModel, Field, HttpUrl, EmailStr - -from models.presentation_layout import PresentationLayoutModel, SlideLayoutModel -from models.presentation_outline_model import PresentationOutlineModel -from utils.dict_utils import get_dict_at_path, get_dict_paths_with_key -from utils.schema_utils import remove_fields_from_schema - - -class ContactInfoModel(BaseModel): - email: Optional[EmailStr] = Field(None, description="Contact email") - phone: Optional[str] = Field( - None, min_length=5, max_length=50, description="Contact phone number" - ) - website: Optional[HttpUrl] = Field(None, description="Website URL") - - -class ImageModel(BaseModel): - __image_url__: str = Field(description="Image URL") - __image_prompt__: str = Field(description="Image prompt") - - -# First Slide Layout -class FirstSlideModel(BaseModel): - title: str = Field( - min_length=3, - max_length=100, - description="Main title of the presentation", - ) - subtitle: Optional[str] = Field( - min_length=10, max_length=200, description="Optional subtitle or tagline" - ) - author: Optional[str] = Field( - min_length=2, - max_length=100, - description="Author or presenter name", - ) - date: Optional[str] = Field(description="Presentation date") - company: Optional[str] = Field( - min_length=2, - max_length=100, - description="Company or organization name", - ) - backgroundImage: Optional[ImageModel] = Field( - description="Background image for the slide" - ) - - -# Bullet Point Slide Layout -class BulletPointSlideModel(BaseModel): - title: str = Field( - min_length=3, - max_length=100, - description="Title of the slide", - ) - subtitle: Optional[str] = Field( - min_length=3, - max_length=150, - description="Optional subtitle or description", - ) - icon: Optional[str] = Field(description="Icon to display in the slide") - bulletPoints: List[str] = Field( - min_length=2, - max_length=8, - description="List of bullet points (2-8 items)", - ) - - -# Image Slide Layout -class ImageSlideModel(BaseModel): - title: str = Field( - min_length=3, - max_length=100, - description="Title of the slide", - ) - subtitle: Optional[str] = Field( - min_length=3, - max_length=150, - description="Optional subtitle or description", - ) - image: HttpUrl = Field( - description="Main image URL", - ) - imageCaption: Optional[str] = Field( - min_length=5, - max_length=200, - description="Optional image caption or description", - ) - content: Optional[str] = Field( - min_length=10, - max_length=600, - description="Optional supporting content text", - ) - backgroundImage: Optional[HttpUrl] = Field( - description="URL to background image for the slide" - ) - - -# Statistics Slide Layout -class StatisticItemModel(BaseModel): - value: str = Field( - min_length=1, - max_length=20, - description="Statistical value (e.g., '250%', '$1.2M', '99.9%')", - ) - label: str = Field( - min_length=3, max_length=100, description="Description of the statistic" - ) - trend: Optional[str] = Field( - description="Trend direction indicator", pattern="^(up|down|neutral)$" - ) - context: Optional[str] = Field( - min_length=5, - max_length=200, - description="Additional context or time period", - ) - - -class StatisticsSlideModel(BaseModel): - title: str = Field( - min_length=3, - max_length=100, - description="Title of the slide", - ) - subtitle: Optional[str] = Field( - min_length=3, - max_length=150, - description="Optional subtitle or description", - ) - statistics: List[StatisticItemModel] = Field( - min_length=2, - max_length=6, - description="List of statistics (2-6 items)", - ) - backgroundImage: Optional[HttpUrl] = Field( - description="URL to background image for the slide" - ) - - -# Quote Slide Layout -class QuoteSlideModel(BaseModel): - title: str = Field( - min_length=3, - max_length=100, - description="Title of the slide", - ) - subtitle: Optional[str] = Field( - min_length=3, - max_length=150, - description="Optional subtitle or description", - ) - quote: str = Field( - min_length=10, - max_length=500, - description="The main quote or testimonial", - ) - author: str = Field( - min_length=2, - max_length=100, - description="Quote author name", - ) - authorTitle: Optional[str] = Field( - min_length=2, max_length=100, description="Author job title or position" - ) - company: Optional[str] = Field( - min_length=2, max_length=100, description="Author company or organization" - ) - authorImage: Optional[HttpUrl] = Field(description="URL to author photo") - backgroundImage: Optional[HttpUrl] = Field( - description="URL to background image for the slide" - ) - - -# Timeline Slide Layout -class TimelineItemModel(BaseModel): - date: str = Field(min_length=2, max_length=50, description="Date or time period") - title: str = Field( - min_length=3, max_length=100, description="Event or milestone title" - ) - description: str = Field( - min_length=10, max_length=300, description="Event description" - ) - status: str = Field( - description="Timeline item status", - pattern="^(completed|current|upcoming)$", - ) - - -class TimelineSlideModel(BaseModel): - title: str = Field( - min_length=3, - max_length=100, - description="Title of the slide", - ) - subtitle: Optional[str] = Field( - min_length=3, - max_length=150, - description="Optional subtitle or description", - ) - timelineItems: List[TimelineItemModel] = Field( - min_length=2, - max_length=6, - description="Timeline events (2-6 items)", - ) - backgroundImage: Optional[HttpUrl] = Field( - description="URL to background image for the slide" - ) - - -# Team Slide Layout -class TeamMemberModel(BaseModel): - name: str = Field(min_length=2, max_length=100, description="Team member name") - title: str = Field(min_length=2, max_length=100, description="Job title or role") - image: Optional[HttpUrl] = Field(description="URL to team member photo") - bio: Optional[str] = Field( - min_length=10, - max_length=300, - description="Brief biography or description", - ) - email: Optional[EmailStr] = Field(description="Contact email") - linkedin: Optional[HttpUrl] = Field(description="LinkedIn profile URL") - - -class TeamSlideModel(BaseModel): - title: str = Field( - min_length=3, - max_length=100, - description="Title of the slide", - ) - subtitle: Optional[str] = Field( - min_length=3, - max_length=150, - description="Optional subtitle or team description", - ) - teamMembers: List[TeamMemberModel] = Field( - min_length=1, - max_length=6, - description="Team members (1-6 people)", - ) - backgroundImage: Optional[HttpUrl] = Field( - description="URL to background image for the slide" - ) - - -# Process Slide Layout -class ProcessStepModel(BaseModel): - step: int = Field(ge=1, le=10, description="Step number") - title: str = Field(min_length=3, max_length=100, description="Step title") - description: str = Field( - min_length=10, max_length=200, description="Step description" - ) - - -class ProcessSlideModel(BaseModel): - title: str = Field( - min_length=3, - max_length=100, - description="Title of the slide", - ) - subtitle: Optional[str] = Field( - min_length=3, - max_length=150, - description="Optional subtitle or description", - ) - processSteps: List[ProcessStepModel] = Field( - min_length=2, - max_length=6, - description="Process steps (2-6 items)", - ) - backgroundImage: Optional[HttpUrl] = Field( - description="URL to background image for the slide" - ) - - -# Two Column Slide Layout -class ColumnContentModel(BaseModel): - title: str = Field(min_length=3, max_length=100, description="Column title") - content: str = Field(min_length=10, max_length=800, description="Column content") - - -class TwoColumnSlideModel(BaseModel): - title: str = Field( - min_length=3, - max_length=100, - description="Title of the slide", - ) - subtitle: Optional[str] = Field( - min_length=3, - max_length=150, - description="Optional subtitle or description", - ) - leftColumn: ColumnContentModel = Field( - description="Left column content", - ) - rightColumn: ColumnContentModel = Field( - description="Right column content", - ) - backgroundImage: Optional[HttpUrl] = Field( - description="URL to background image for the slide" - ) - - -# Conclusion Slide Layout -class ConclusionSlideModel(BaseModel): - title: str = Field( - min_length=3, - max_length=100, - description="Title of the slide", - ) - subtitle: Optional[str] = Field( - min_length=3, - max_length=150, - description="Optional subtitle or description", - ) - keyTakeaways: List[str] = Field( - min_length=2, - max_length=6, - description="Key takeaways or summary points (2-6 items)", - ) - callToAction: Optional[str] = Field( - min_length=5, - max_length=150, - description="Optional call to action or next steps", - ) - contactInfo: Optional[ContactInfoModel] = Field( - description="Optional contact information" - ) - backgroundImage: Optional[HttpUrl] = Field( - description="URL to background image for the slide" - ) - - -# Content Slide Layout -class ContentSlideModel(BaseModel): - title: str = Field( - min_length=3, - max_length=100, - description="Title of the slide", - ) - subtitle: Optional[str] = Field( - min_length=3, - max_length=150, - description="Optional subtitle or description", - ) - content: str = Field( - min_length=10, - max_length=1000, - description="Main content text", - ) - backgroundImage: Optional[HttpUrl] = Field( - description="URL to background image for the slide" - ) - - -# Create the presentation layout with all slide types -presentation_layout = PresentationLayoutModel( - name="Complete Presentation Layout", - slides=[ - SlideLayoutModel( - id="first-slide", - name="First Slide", - json_schema=FirstSlideModel.model_json_schema(), - ), - # SlideLayoutModel( - # id="bullet-point-slide", - # name="Bullet Point Slide", - # json_schema=BulletPointSlideModel.model_json_schema(), - # ), - # SlideLayoutModel( - # id="image-slide", - # name="Image Slide", - # json_schema=ImageSlideModel.model_json_schema(), - # ), - # SlideLayoutModel( - # id="statistics-slide", - # name="Statistics Slide", - # json_schema=StatisticsSlideModel.model_json_schema(), - # ), - # SlideLayoutModel( - # id="quote-slide", - # name="Quote Slide", - # json_schema=QuoteSlideModel.model_json_schema(), - # ), - # SlideLayoutModel( - # id="timeline-slide", - # name="Timeline Slide", - # json_schema=TimelineSlideModel.model_json_schema(), - # ), - # SlideLayoutModel( - # id="team-slide", - # name="Team Slide", - # json_schema=TeamSlideModel.model_json_schema(), - # ), - # SlideLayoutModel( - # id="process-slide", - # name="Process Slide", - # json_schema=ProcessSlideModel.model_json_schema(), - # ), - # SlideLayoutModel( - # id="two-column-slide", - # name="Two Column Slide", - # json_schema=TwoColumnSlideModel.model_json_schema(), - # ), - # SlideLayoutModel( - # id="conclusion-slide", - # name="Conclusion Slide", - # json_schema=ConclusionSlideModel.model_json_schema(), - # ), - # SlideLayoutModel( - # id="content-slide", - # name="Content Slide", - # json_schema=ContentSlideModel.model_json_schema(), - # ), - ], -) - - -print(json.dumps(StatisticsSlideModel.model_json_schema())) diff --git a/servers/fastapi/pyproject.toml b/servers/fastapi/pyproject.toml index 76e61c0f..f0caf8e3 100644 --- a/servers/fastapi/pyproject.toml +++ b/servers/fastapi/pyproject.toml @@ -13,6 +13,7 @@ dependencies = [ "chromadb>=1.0.15", "docling>=2.43.0", "fastapi[standard]>=0.116.1", + "fastmcp>=2.11.0", "google-genai>=1.28.0", "nltk>=3.9.1", "openai>=1.98.0", diff --git a/servers/fastapi/uv.lock b/servers/fastapi/uv.lock index 49d67505..b579f42a 100644 --- a/servers/fastapi/uv.lock +++ b/servers/fastapi/uv.lock @@ -181,6 +181,18 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/77/06/bb80f5f86020c4551da315d78b3ab75e8228f89f0162f2c3a819e407941a/attrs-25.3.0-py3-none-any.whl", hash = "sha256:427318ce031701fea540783410126f03899a97ffc6f61596ad581ac2e40e3bc3", size = 63815, upload-time = "2025-03-13T11:10:21.14Z" }, ] +[[package]] +name = "authlib" +version = "1.6.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "cryptography" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/8e/a1/d8d1c6f8bc922c0b87ae0d933a8ed57be1bef6970894ed79c2852a153cd3/authlib-1.6.1.tar.gz", hash = "sha256:4dffdbb1460ba6ec8c17981a4c67af7d8af131231b5a36a88a1e8c80c111cdfd", size = 159988, upload-time = "2025-07-20T07:38:42.834Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f9/58/cc6a08053f822f98f334d38a27687b69c6655fb05cd74a7a5e70a2aeed95/authlib-1.6.1-py2.py3-none-any.whl", hash = "sha256:e9d2031c34c6309373ab845afc24168fe9e93dc52d252631f52642f21f5ed06e", size = 239299, upload-time = "2025-07-20T07:38:39.259Z" }, +] + [[package]] name = "backoff" version = "2.2.1" @@ -435,6 +447,21 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/f6/34/31a1604c9a9ade0fdab61eb48570e09a796f4d9836121266447b0eaf7feb/cryptography-45.0.5-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:e357286c1b76403dd384d938f93c46b2b058ed4dfcdce64a770f0537ed3feb6f", size = 3331106, upload-time = "2025-07-02T13:06:18.058Z" }, ] +[[package]] +name = "cyclopts" +version = "3.22.5" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "attrs" }, + { name = "docstring-parser" }, + { name = "rich" }, + { name = "rich-rst" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/a3/d5/24c6c894f3833bc93d4944c2064309dfd633c0becf93e16fc79d76edd388/cyclopts-3.22.5.tar.gz", hash = "sha256:fa2450b9840abc41c6aa37af5eaeafc7a1264e08054e3a2fe39d49aa154f592a", size = 74890, upload-time = "2025-07-31T18:18:37.336Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/df/e5/a7b6db64f08cfe065e531ec6b508fa7dac704fab70d05adb5bc0c2c1d1b6/cyclopts-3.22.5-py3-none-any.whl", hash = "sha256:92efb4a094d9812718d7efe0bffa319a19cb661f230dbf24406c18cd8809fb82", size = 84994, upload-time = "2025-07-31T18:18:35.939Z" }, +] + [[package]] name = "dill" version = "0.4.0" @@ -573,6 +600,24 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/b3/51/67365adea9afcd1a923e86e5ebecf10e192e12532486e3677adb72c41be1/docling_parse-4.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:2495b5ebf7669770715c290d5f2ef47a849bc2801e8bb78e71f92ea49322b3b3", size = 15896344, upload-time = "2025-06-24T11:21:06.888Z" }, ] +[[package]] +name = "docstring-parser" +version = "0.17.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/b2/9d/c3b43da9515bd270df0f80548d9944e389870713cc1fe2b8fb35fe2bcefd/docstring_parser-0.17.0.tar.gz", hash = "sha256:583de4a309722b3315439bb31d64ba3eebada841f2e2cee23b99df001434c912", size = 27442, upload-time = "2025-07-21T07:35:01.868Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/55/e2/2537ebcff11c1ee1ff17d8d0b6f4db75873e3b0fb32c2d4a2ee31ecb310a/docstring_parser-0.17.0-py3-none-any.whl", hash = "sha256:cf2569abd23dce8099b300f9b4fa8191e9582dda731fd533daf54c4551658708", size = 36896, upload-time = "2025-07-21T07:35:00.684Z" }, +] + +[[package]] +name = "docutils" +version = "0.22" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e9/86/5b41c32ecedcfdb4c77b28b6cb14234f252075f8cdb254531727a35547dd/docutils-0.22.tar.gz", hash = "sha256:ba9d57750e92331ebe7c08a1bbf7a7f8143b86c476acd51528b042216a6aad0f", size = 2277984, upload-time = "2025-07-29T15:20:31.06Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/44/57/8db39bc5f98f042e0153b1de9fb88e1a409a33cda4dd7f723c2ed71e01f6/docutils-0.22-py3-none-any.whl", hash = "sha256:4ed966a0e96a0477d852f7af31bdcb3adc049fbb35ccba358c2ea8a03287615e", size = 630709, upload-time = "2025-07-29T15:20:28.335Z" }, +] + [[package]] name = "durationpy" version = "0.10" @@ -628,6 +673,18 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/c1/8b/5fe2cc11fee489817272089c4203e679c63b570a5aaeb18d852ae3cbba6a/et_xmlfile-2.0.0-py3-none-any.whl", hash = "sha256:7a91720bc756843502c3b7504c77b8fe44217c85c537d85037f0f536151b2caa", size = 18059, upload-time = "2024-10-25T17:25:39.051Z" }, ] +[[package]] +name = "exceptiongroup" +version = "1.3.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/0b/9f/a65090624ecf468cdca03533906e7c69ed7588582240cfe7cc9e770b50eb/exceptiongroup-1.3.0.tar.gz", hash = "sha256:b241f5885f560bc56a59ee63ca4c6a8bfa46ae4ad651af316d4e81817bb9fd88", size = 29749, upload-time = "2025-05-10T17:42:51.123Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/36/f4/c6e662dade71f56cd2f3735141b265c3c79293c109549c1e6933b0651ffc/exceptiongroup-1.3.0-py3-none-any.whl", hash = "sha256:4d111e6e0c13d0644cad6ddaa7ed0261a0b36971f6d23e7ec9b4b9097da78a10", size = 16674, upload-time = "2025-05-10T17:42:49.33Z" }, +] + [[package]] name = "fastapi" version = "0.116.1" @@ -690,6 +747,28 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/e5/a6/5aa862489a2918a096166fd98d9fe86b7fd53c607678b3fa9d8c432d88d5/fastapi_cloud_cli-0.1.5-py3-none-any.whl", hash = "sha256:d80525fb9c0e8af122370891f9fa83cf5d496e4ad47a8dd26c0496a6c85a012a", size = 18992, upload-time = "2025-07-28T13:30:47.427Z" }, ] +[[package]] +name = "fastmcp" +version = "2.11.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "authlib" }, + { name = "cyclopts" }, + { name = "exceptiongroup" }, + { name = "httpx" }, + { name = "mcp" }, + { name = "openapi-core" }, + { name = "openapi-pydantic" }, + { name = "pydantic", extra = ["email"] }, + { name = "pyperclip" }, + { name = "python-dotenv" }, + { name = "rich" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/c2/02/0701624e938fe4d1f13464de9bdc27be9aba2e4c4d41edab3ea496d31751/fastmcp-2.11.0.tar.gz", hash = "sha256:af0c52988607d8e9197df300e91880169e8fe24fd6ca177dca6a9eb6b245ce3c", size = 2663877, upload-time = "2025-08-01T21:30:11.629Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0c/9a/51108b68e77650a7289b5f1ceff8dc0929ab48a26d1d2015f22121a9d183/fastmcp-2.11.0-py3-none-any.whl", hash = "sha256:8709a04522e66fda407b469fbe4d3290651aa7b06097b91c097e9a973c9b9bb3", size = 256193, upload-time = "2025-08-01T21:30:09.905Z" }, +] + [[package]] name = "filelock" version = "3.18.0" @@ -899,6 +978,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/2a/39/e50c7c3a983047577ee07d2a9e53faf5a69493943ec3f6a384bdc792deb2/httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad", size = 73517, upload-time = "2024-12-06T15:37:21.509Z" }, ] +[[package]] +name = "httpx-sse" +version = "0.4.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/6e/fa/66bd985dd0b7c109a3bcb89272ee0bfb7e2b4d06309ad7b38ff866734b2a/httpx_sse-0.4.1.tar.gz", hash = "sha256:8f44d34414bc7b21bf3602713005c5df4917884f76072479b21f68befa4ea26e", size = 12998, upload-time = "2025-06-24T13:21:05.71Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/25/0a/6269e3473b09aed2dab8aa1a600c70f31f00ae1349bee30658f7e358a159/httpx_sse-0.4.1-py3-none-any.whl", hash = "sha256:cba42174344c3a5b06f255ce65b350880f962d99ead85e776f23c6618a377a37", size = 8054, upload-time = "2025-06-24T13:21:04.772Z" }, +] + [[package]] name = "huggingface-hub" version = "0.34.3" @@ -973,6 +1061,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/a4/ed/1f1afb2e9e7f38a545d628f864d562a5ae64fe6f7a10e28ffb9b185b4e89/importlib_resources-6.5.2-py3-none-any.whl", hash = "sha256:789cfdc3ed28c78b67a06acb8126751ced69a3d5f79c095a98298cd8a760ccec", size = 37461, upload-time = "2025-01-03T18:51:54.306Z" }, ] +[[package]] +name = "isodate" +version = "0.7.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/54/4d/e940025e2ce31a8ce1202635910747e5a87cc3a6a6bb2d00973375014749/isodate-0.7.2.tar.gz", hash = "sha256:4cd1aa0f43ca76f4a6c6c0292a85f40b35ec2e43e315b59f06e6d32171a953e6", size = 29705, upload-time = "2024-10-08T23:04:11.5Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/15/aa/0aca39a37d3c7eb941ba736ede56d689e7be91cab5d9ca846bde3999eba6/isodate-0.7.2-py3-none-any.whl", hash = "sha256:28009937d8031054830160fce6d409ed342816b543597cece116d966c6d99e15", size = 22320, upload-time = "2024-10-08T23:04:09.501Z" }, +] + [[package]] name = "jinja2" version = "3.1.6" @@ -1050,6 +1147,21 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/fe/54/c86cd8e011fe98803d7e382fd67c0df5ceab8d2b7ad8c5a81524f791551c/jsonschema-4.25.0-py3-none-any.whl", hash = "sha256:24c2e8da302de79c8b9382fee3e76b355e44d2a4364bb207159ce10b517bd716", size = 89184, upload-time = "2025-07-18T15:39:42.956Z" }, ] +[[package]] +name = "jsonschema-path" +version = "0.3.4" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pathable" }, + { name = "pyyaml" }, + { name = "referencing" }, + { name = "requests" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/6e/45/41ebc679c2a4fced6a722f624c18d658dee42612b83ea24c1caf7c0eb3a8/jsonschema_path-0.3.4.tar.gz", hash = "sha256:8365356039f16cc65fddffafda5f58766e34bebab7d6d105616ab52bc4297001", size = 11159, upload-time = "2025-01-24T14:33:16.547Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/cb/58/3485da8cb93d2f393bce453adeef16896751f14ba3e2024bc21dc9597646/jsonschema_path-0.3.4-py3-none-any.whl", hash = "sha256:f502191fdc2b22050f9a81c9237be9d27145b9001c55842bece5e94e382e52f8", size = 14810, upload-time = "2025-01-24T14:33:14.652Z" }, +] + [[package]] name = "jsonschema-specifications" version = "2025.4.1" @@ -1105,6 +1217,17 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/83/60/d497a310bde3f01cb805196ac61b7ad6dc5dcf8dce66634dc34364b20b4f/lazy_loader-0.4-py3-none-any.whl", hash = "sha256:342aa8e14d543a154047afb4ba8ef17f5563baad3fc610d7b15b213b0f119efc", size = 12097, upload-time = "2024-04-05T13:03:10.514Z" }, ] +[[package]] +name = "lazy-object-proxy" +version = "1.11.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/57/f9/1f56571ed82fb324f293661690635cf42c41deb8a70a6c9e6edc3e9bb3c8/lazy_object_proxy-1.11.0.tar.gz", hash = "sha256:18874411864c9fbbbaa47f9fc1dd7aea754c86cfde21278ef427639d1dd78e9c", size = 44736, upload-time = "2025-04-16T16:53:48.482Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/51/f6/eb645ca1ff7408bb69e9b1fe692cce1d74394efdbb40d6207096c0cd8381/lazy_object_proxy-1.11.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:090935756cc041e191f22f4f9c7fd4fe9a454717067adf5b1bbd2ce3046b556e", size = 28047, upload-time = "2025-04-16T16:53:34.679Z" }, + { url = "https://files.pythonhosted.org/packages/13/9c/aabbe1e8b99b8b0edb846b49a517edd636355ac97364419d9ba05b8fa19f/lazy_object_proxy-1.11.0-cp311-cp311-win_amd64.whl", hash = "sha256:76ec715017f06410f57df442c1a8d66e6b5f7035077785b129817f5ae58810a4", size = 28440, upload-time = "2025-04-16T16:53:36.113Z" }, + { url = "https://files.pythonhosted.org/packages/e7/1e/fb441c07b6662ec1fc92b249225ba6e6e5221b05623cb0131d082f782edc/lazy_object_proxy-1.11.0-py3-none-any.whl", hash = "sha256:a56a5093d433341ff7da0e89f9b486031ccd222ec8e52ec84d0ec1cdc819674b", size = 16635, upload-time = "2025-04-16T16:53:47.198Z" }, +] + [[package]] name = "lxml" version = "5.4.0" @@ -1169,6 +1292,28 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/fc/b5/20cb1d714596acb553c810009c8004c809823947da63e13c19a7decfcb6c/MarkupSafe-3.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:9ba25a71ebf05b9bb0e2ae99f8bc08a07ee8e98c612175087112656ca0f5c8bf", size = 15542, upload-time = "2024-10-08T17:00:48.736Z" }, ] +[[package]] +name = "mcp" +version = "1.12.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "anyio" }, + { name = "httpx" }, + { name = "httpx-sse" }, + { name = "jsonschema" }, + { name = "pydantic" }, + { name = "pydantic-settings" }, + { name = "python-multipart" }, + { name = "pywin32", marker = "sys_platform == 'win32'" }, + { name = "sse-starlette" }, + { name = "starlette" }, + { name = "uvicorn", marker = "sys_platform != 'emscripten'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/4d/19/9955e2df5384ff5dd25d38f8e88aaf89d2d3d9d39f27e7383eaf0b293836/mcp-1.12.3.tar.gz", hash = "sha256:ab2e05f5e5c13e1dc90a4a9ef23ac500a6121362a564447855ef0ab643a99fed", size = 427203, upload-time = "2025-07-31T18:36:36.795Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/8f/8b/0be74e3308a486f1d127f3f6767de5f9f76454c9b4183210c61cc50999b6/mcp-1.12.3-py3-none-any.whl", hash = "sha256:5483345bf39033b858920a5b6348a303acacf45b23936972160ff152107b850e", size = 158810, upload-time = "2025-07-31T18:36:34.915Z" }, +] + [[package]] name = "mdurl" version = "0.1.2" @@ -1202,6 +1347,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/3a/54/c277475b4102588e6f06b2e9095ee758dfe31a149312cdbf62d39a9f5c30/mmh3-5.2.0-cp311-cp311-win_arm64.whl", hash = "sha256:b5f317a727bba0e633a12e71228bc6a4acb4f471a98b1c003163b917311ea9a9", size = 39336, upload-time = "2025-07-29T07:42:12.209Z" }, ] +[[package]] +name = "more-itertools" +version = "10.7.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ce/a0/834b0cebabbfc7e311f30b46c8188790a37f89fc8d756660346fe5abfd09/more_itertools-10.7.0.tar.gz", hash = "sha256:9fddd5403be01a94b204faadcff459ec3568cf110265d3c54323e1e866ad29d3", size = 127671, upload-time = "2025-04-22T14:17:41.838Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/2b/9f/7ba6f94fc1e9ac3d2b853fdff3035fb2fa5afbed898c4a72b8a020610594/more_itertools-10.7.0-py3-none-any.whl", hash = "sha256:d43980384673cb07d2f7d2d918c616b30c659c089ee23953f601d6609c67510e", size = 65278, upload-time = "2025-04-22T14:17:40.49Z" }, +] + [[package]] name = "mpire" version = "2.10.2" @@ -1395,6 +1549,67 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/a8/fe/f64631075b3d63a613c0d8ab761d5941631a470f6fa87eaaee1aa2b4ec0c/openai-1.98.0-py3-none-any.whl", hash = "sha256:b99b794ef92196829120e2df37647722104772d2a74d08305df9ced5f26eae34", size = 767713, upload-time = "2025-07-30T12:48:01.264Z" }, ] +[[package]] +name = "openapi-core" +version = "0.19.5" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "isodate" }, + { name = "jsonschema" }, + { name = "jsonschema-path" }, + { name = "more-itertools" }, + { name = "openapi-schema-validator" }, + { name = "openapi-spec-validator" }, + { name = "parse" }, + { name = "typing-extensions" }, + { name = "werkzeug" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/b1/35/1acaa5f2fcc6e54eded34a2ec74b479439c4e469fc4e8d0e803fda0234db/openapi_core-0.19.5.tar.gz", hash = "sha256:421e753da56c391704454e66afe4803a290108590ac8fa6f4a4487f4ec11f2d3", size = 103264, upload-time = "2025-03-20T20:17:28.193Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/27/6f/83ead0e2e30a90445ee4fc0135f43741aebc30cca5b43f20968b603e30b6/openapi_core-0.19.5-py3-none-any.whl", hash = "sha256:ef7210e83a59394f46ce282639d8d26ad6fc8094aa904c9c16eb1bac8908911f", size = 106595, upload-time = "2025-03-20T20:17:26.77Z" }, +] + +[[package]] +name = "openapi-pydantic" +version = "0.5.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pydantic" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/02/2e/58d83848dd1a79cb92ed8e63f6ba901ca282c5f09d04af9423ec26c56fd7/openapi_pydantic-0.5.1.tar.gz", hash = "sha256:ff6835af6bde7a459fb93eb93bb92b8749b754fc6e51b2f1590a19dc3005ee0d", size = 60892, upload-time = "2025-01-08T19:29:27.083Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/12/cf/03675d8bd8ecbf4445504d8071adab19f5f993676795708e36402ab38263/openapi_pydantic-0.5.1-py3-none-any.whl", hash = "sha256:a3a09ef4586f5bd760a8df7f43028b60cafb6d9f61de2acba9574766255ab146", size = 96381, upload-time = "2025-01-08T19:29:25.275Z" }, +] + +[[package]] +name = "openapi-schema-validator" +version = "0.6.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "jsonschema" }, + { name = "jsonschema-specifications" }, + { name = "rfc3339-validator" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/8b/f3/5507ad3325169347cd8ced61c232ff3df70e2b250c49f0fe140edb4973c6/openapi_schema_validator-0.6.3.tar.gz", hash = "sha256:f37bace4fc2a5d96692f4f8b31dc0f8d7400fd04f3a937798eaf880d425de6ee", size = 11550, upload-time = "2025-01-10T18:08:22.268Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/21/c6/ad0fba32775ae749016829dace42ed80f4407b171da41313d1a3a5f102e4/openapi_schema_validator-0.6.3-py3-none-any.whl", hash = "sha256:f3b9870f4e556b5a62a1c39da72a6b4b16f3ad9c73dc80084b1b11e74ba148a3", size = 8755, upload-time = "2025-01-10T18:08:19.758Z" }, +] + +[[package]] +name = "openapi-spec-validator" +version = "0.7.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "jsonschema" }, + { name = "jsonschema-path" }, + { name = "lazy-object-proxy" }, + { name = "openapi-schema-validator" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/82/af/fe2d7618d6eae6fb3a82766a44ed87cd8d6d82b4564ed1c7cfb0f6378e91/openapi_spec_validator-0.7.2.tar.gz", hash = "sha256:cc029309b5c5dbc7859df0372d55e9d1ff43e96d678b9ba087f7c56fc586f734", size = 36855, upload-time = "2025-06-07T14:48:56.299Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/27/dd/b3fd642260cb17532f66cc1e8250f3507d1e580483e209dc1e9d13bd980d/openapi_spec_validator-0.7.2-py3-none-any.whl", hash = "sha256:4bbdc0894ec85f1d1bea1d6d9c8b2c3c8d7ccaa13577ef40da9c006c9fd0eb60", size = 39713, upload-time = "2025-06-07T14:48:54.077Z" }, +] + [[package]] name = "opencv-python-headless" version = "4.11.0.86" @@ -1568,6 +1783,24 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/c8/7b/bdcb1ed8fccb63d04bdb7635161d0ec26596d92c9d7a6cce964e7876b6c1/pandas-2.3.1-cp311-cp311-win_amd64.whl", hash = "sha256:b3cd4273d3cb3707b6fffd217204c52ed92859533e31dc03b7c5008aa933aaab", size = 11340212, upload-time = "2025-07-07T19:18:49.293Z" }, ] +[[package]] +name = "parse" +version = "1.20.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/4f/78/d9b09ba24bb36ef8b83b71be547e118d46214735b6dfb39e4bfde0e9b9dd/parse-1.20.2.tar.gz", hash = "sha256:b41d604d16503c79d81af5165155c0b20f6c8d6c559efa66b4b695c3e5a0a0ce", size = 29391, upload-time = "2024-06-11T04:41:57.34Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d0/31/ba45bf0b2aa7898d81cbbfac0e88c267befb59ad91a19e36e1bc5578ddb1/parse-1.20.2-py2.py3-none-any.whl", hash = "sha256:967095588cb802add9177d0c0b6133b5ba33b1ea9007ca800e526f42a85af558", size = 20126, upload-time = "2024-06-11T04:41:55.057Z" }, +] + +[[package]] +name = "pathable" +version = "0.4.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/67/93/8f2c2075b180c12c1e9f6a09d1a985bc2036906b13dff1d8917e395f2048/pathable-0.4.4.tar.gz", hash = "sha256:6905a3cd17804edfac7875b5f6c9142a218c7caef78693c2dbbbfbac186d88b2", size = 8124, upload-time = "2025-01-10T18:43:13.247Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7d/eb/b6260b31b1a96386c0a880edebe26f89669098acea8e0318bff6adb378fd/pathable-0.4.4-py3-none-any.whl", hash = "sha256:5ae9e94793b6ef5a4cbe0a7ce9dbbefc1eec38df253763fd0aeeacf2762dbbc2", size = 9592, upload-time = "2025-01-10T18:43:11.88Z" }, +] + [[package]] name = "pathvalidate" version = "3.3.1" @@ -1668,6 +1901,7 @@ dependencies = [ { name = "chromadb" }, { name = "docling" }, { name = "fastapi", extra = ["standard"] }, + { name = "fastmcp" }, { name = "google-genai" }, { name = "nltk" }, { name = "openai" }, @@ -1688,6 +1922,7 @@ requires-dist = [ { name = "chromadb", specifier = ">=1.0.15" }, { name = "docling", specifier = ">=2.43.0" }, { name = "fastapi", extras = ["standard"], specifier = ">=0.116.1" }, + { name = "fastmcp", specifier = ">=2.11.0" }, { name = "google-genai", specifier = ">=1.28.0" }, { name = "nltk", specifier = ">=3.9.1" }, { name = "openai", specifier = ">=1.98.0" }, @@ -1946,6 +2181,12 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/be/7a/097801205b991bc3115e8af1edb850d30aeaf0118520b016354cf5ccd3f6/pypdfium2-4.30.0-py3-none-win_arm64.whl", hash = "sha256:119b2969a6d6b1e8d55e99caaf05290294f2d0fe49c12a3f17102d01c441bd29", size = 2752118, upload-time = "2024-05-09T18:33:15.489Z" }, ] +[[package]] +name = "pyperclip" +version = "1.9.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/30/23/2f0a3efc4d6a32f3b63cdff36cd398d9701d26cda58e3ab97ac79fb5e60d/pyperclip-1.9.0.tar.gz", hash = "sha256:b7de0142ddc81bfc5c7507eea19da920b92252b548b96186caf94a5e2527d310", size = 20961, upload-time = "2024-06-18T20:38:48.401Z" } + [[package]] name = "pypika" version = "0.48.9" @@ -2162,6 +2403,18 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/3b/5d/63d4ae3b9daea098d5d6f5da83984853c1bbacd5dc826764b249fe119d24/requests_oauthlib-2.0.0-py2.py3-none-any.whl", hash = "sha256:7dd8a5c40426b779b0868c404bdef9768deccf22749cde15852df527e6269b36", size = 24179, upload-time = "2024-03-22T20:32:28.055Z" }, ] +[[package]] +name = "rfc3339-validator" +version = "0.1.4" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "six" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/28/ea/a9387748e2d111c3c2b275ba970b735e04e15cdb1eb30693b6b5708c4dbd/rfc3339_validator-0.1.4.tar.gz", hash = "sha256:138a2abdf93304ad60530167e51d2dfb9549521a836871b88d7f4695d0022f6b", size = 5513, upload-time = "2021-05-12T16:37:54.178Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7b/44/4e421b96b67b2daff264473f7465db72fbdf36a07e05494f50300cc7b0c6/rfc3339_validator-0.1.4-py2.py3-none-any.whl", hash = "sha256:24f6ec1eda14ef823da9e36ec7113124b39c04d50a4d3d3a3c2859577e7791fa", size = 3490, upload-time = "2021-05-12T16:37:52.536Z" }, +] + [[package]] name = "rich" version = "14.1.0" @@ -2175,6 +2428,19 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/e3/30/3c4d035596d3cf444529e0b2953ad0466f6049528a879d27534700580395/rich-14.1.0-py3-none-any.whl", hash = "sha256:536f5f1785986d6dbdea3c75205c473f970777b4a0d6c6dd1b696aa05a3fa04f", size = 243368, upload-time = "2025-07-25T07:32:56.73Z" }, ] +[[package]] +name = "rich-rst" +version = "1.3.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "docutils" }, + { name = "rich" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/b0/69/5514c3a87b5f10f09a34bb011bc0927bc12c596c8dae5915604e71abc386/rich_rst-1.3.1.tar.gz", hash = "sha256:fad46e3ba42785ea8c1785e2ceaa56e0ffa32dbe5410dec432f37e4107c4f383", size = 13839, upload-time = "2024-04-30T04:40:38.125Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/fd/bc/cc4e3dbc5e7992398dcb7a8eda0cbcf4fb792a0cdb93f857b478bf3cf884/rich_rst-1.3.1-py3-none-any.whl", hash = "sha256:498a74e3896507ab04492d326e794c3ef76e7cda078703aa592d1853d91098c1", size = 11621, upload-time = "2024-04-30T04:40:32.619Z" }, +] + [[package]] name = "rich-toolkit" version = "0.14.9" @@ -2470,6 +2736,18 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/16/91/484cd2d05569892b7fef7f5ceab3bc89fb0f8a8c0cde1030d383dbc5449c/sqlmodel-0.0.24-py3-none-any.whl", hash = "sha256:6778852f09370908985b667d6a3ab92910d0d5ec88adcaf23dbc242715ff7193", size = 28622, upload-time = "2025-03-07T05:43:30.37Z" }, ] +[[package]] +name = "sse-starlette" +version = "3.0.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "anyio" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/42/6f/22ed6e33f8a9e76ca0a412405f31abb844b779d52c5f96660766edcd737c/sse_starlette-3.0.2.tar.gz", hash = "sha256:ccd60b5765ebb3584d0de2d7a6e4f745672581de4f5005ab31c3a25d10b52b3a", size = 20985, upload-time = "2025-07-27T09:07:44.565Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ef/10/c78f463b4ef22eef8491f218f692be838282cd65480f6e423d7730dfd1fb/sse_starlette-3.0.2-py3-none-any.whl", hash = "sha256:16b7cbfddbcd4eaca11f7b586f3b8a080f1afe952c15813455b162edea619e5a", size = 11297, upload-time = "2025-07-27T09:07:43.268Z" }, +] + [[package]] name = "starlette" version = "0.47.2" @@ -2809,6 +3087,18 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/fa/a8/5b41e0da817d64113292ab1f8247140aac61cbf6cfd085d6a0fa77f4984f/websockets-15.0.1-py3-none-any.whl", hash = "sha256:f7a866fbc1e97b5c617ee4116daaa09b722101d4a3c170c787450ba409f9736f", size = 169743, upload-time = "2025-03-05T20:03:39.41Z" }, ] +[[package]] +name = "werkzeug" +version = "3.1.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "markupsafe" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/32/af/d4502dc713b4ccea7175d764718d5183caf8d0867a4f0190d5d4a45cea49/werkzeug-3.1.1.tar.gz", hash = "sha256:8cd39dfbdfc1e051965f156163e2974e52c210f130810e9ad36858f0fd3edad4", size = 806453, upload-time = "2024-11-01T16:40:45.462Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ee/ea/c67e1dee1ba208ed22c06d1d547ae5e293374bfc43e0eb0ef5e262b68561/werkzeug-3.1.1-py3-none-any.whl", hash = "sha256:a71124d1ef06008baafa3d266c02f56e1836a5984afd6dd6c9230669d60d9fb5", size = 224371, upload-time = "2024-11-01T16:40:43.994Z" }, +] + [[package]] name = "xlsxwriter" version = "3.2.5" diff --git a/servers/nextjs/components/CustomConfig.tsx b/servers/nextjs/components/CustomConfig.tsx index 41e26fda..54a13456 100644 --- a/servers/nextjs/components/CustomConfig.tsx +++ b/servers/nextjs/components/CustomConfig.tsx @@ -13,18 +13,21 @@ import { import { Popover, PopoverContent, PopoverTrigger } from "./ui/popover"; import { cn } from "@/lib/utils"; import { toast } from "sonner"; +import { Switch } from "./ui/switch"; interface CustomConfigProps { customLlmUrl: string; customLlmApiKey: string; customModel: string; - onInputChange: (value: string, field: string) => void; + toolCalls: boolean; + onInputChange: (value: string | boolean, field: string) => void; } export default function CustomConfig({ customLlmUrl, customLlmApiKey, customModel, + toolCalls, onInputChange, }: CustomConfigProps) { const [customModels, setCustomModels] = useState([]); @@ -225,6 +228,23 @@ export default function CustomConfig({ )} + + {/* Extended Reasoning Toggle */} +
+
+ + onInputChange(checked, "tool_calls")} + /> +
+

+ + Enable extended reasoning for more detailed and thorough responses +

+
); } \ No newline at end of file diff --git a/servers/nextjs/components/LLMSelection.tsx b/servers/nextjs/components/LLMSelection.tsx index 2a83e4c5..78cbced5 100644 --- a/servers/nextjs/components/LLMSelection.tsx +++ b/servers/nextjs/components/LLMSelection.tsx @@ -188,6 +188,7 @@ export default function LLMProviderSelection({ customLlmUrl={llmConfig.CUSTOM_LLM_URL || ""} customLlmApiKey={llmConfig.CUSTOM_LLM_API_KEY || ""} customModel={llmConfig.CUSTOM_MODEL || ""} + toolCalls={llmConfig.TOOL_CALLS || false} onInputChange={input_field_changed} /> diff --git a/servers/nextjs/utils/providerUtils.ts b/servers/nextjs/utils/providerUtils.ts index 0d1ac62c..23ff1b8f 100644 --- a/servers/nextjs/utils/providerUtils.ts +++ b/servers/nextjs/utils/providerUtils.ts @@ -37,6 +37,7 @@ export interface LLMConfig { CUSTOM_LLM_URL?: string; CUSTOM_LLM_API_KEY?: string; CUSTOM_MODEL?: string; + TOOL_CALLS?: boolean; // Image providers IMAGE_PROVIDER?: string; @@ -75,6 +76,7 @@ export const updateLLMConfig = ( custom_llm_url: "CUSTOM_LLM_URL", custom_llm_api_key: "CUSTOM_LLM_API_KEY", custom_model: "CUSTOM_MODEL", + tool_calls: "TOOL_CALLS", pexels_api_key: "PEXELS_API_KEY", pixabay_api_key: "PIXABAY_API_KEY", image_provider: "IMAGE_PROVIDER",