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 llama_cpp import Llama | |
| from search import search_faiss | |
| from colorama import Fore, Style, init | |
| from langchain_huggingface import HuggingFaceEmbeddings | |
| from langchain_community.vectorstores import FAISS | |
| from langchain.document_loaders import PyPDFLoader, TextLoader, CSVLoader | |
| from langchain.text_splitter import CharacterTextSplitter | |
| import argparse | |
| import sys |
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
| opensearch_host=$1 | |
| pipeline_name=neural_pipeline | |
| tmp_file=/tmp/output.$$ | |
| # AT FIRST, READ https://qiita.com/myu65/items/97a66dc8d06be9d99c74 | |
| # THEN, EDIT FOLLOWING VARIABLES FOR YOUR MODEL | |
| model_name=intfloat/multilingual-e5-large-instruct | |
| dimension=1024 | |
| space_type=cosinesimil | |
| framework_type=huggingface_transformers |
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
| # ベースイメージとしてPython 3.10を使用 | |
| FROM python:3.10-slim | |
| # 作業ディレクトリを設定 | |
| WORKDIR /app | |
| # 必要なシステムパッケージをインストール | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| && rm -rf /var/lib/apt/lists/* |
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 typing import Any | |
| import asyncio | |
| import httpx | |
| from mcp.server.fastmcp import FastMCP | |
| # Initialize FastMCP server | |
| mcp = FastMCP("fess-mcp") | |
| # Constants | |
| FESS_API_BASE = "http://localhost:8080/api/v1" |
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
| def hoge(): | |
| print "hoge" | |
| def test_hoge(capsys): | |
| hoge() | |
| out, err = capsys.readouterr() | |
| assert out == "hoge\n" |