-
Notifications
You must be signed in to change notification settings - Fork 4
feat: provide the chat of the rag by MCP #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
a-klos
wants to merge
22
commits into
main
Choose a base branch
from
feature/mcp
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 7 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
466bb7f
add mcp server
MelvinKl c84f25b
Merge branch 'main' into feature/mcp
a-klos 1fed3b8
chore: megre
a-klos 6d5186b
Merge branch 'main' into feature/mcp
a-klos 02a558f
feat: update MCP server configuration and dependencies, refactor chat…
a-klos 1483c09
fix: update .gitignore to exclude all notebook files
a-klos dadf160
chore: update submodules to latest main
github-actions[bot] 80f15c8
Update Tiltfile
a-klos 4a5ba8f
Update mcp-server/Dockerfile
a-klos 9542222
Update mcp-server/src/dependency_container.py
a-klos c6d304b
feat: update version and description in pyproject.toml; refactor tran…
a-klos 4705662
Merge branch 'feature/mcp' of github.com:stackitcloud/rag-template in…
a-klos 58f2201
feat: update flake8 exclusions, refactor chat handling in RagMcpServe…
a-klos 2baa80e
chore: update submodules to latest main
github-actions[bot] f870b08
chore: update subproject commit in rag-infrastructure
a-klos 2c923bc
chore: update submodules to latest main
github-actions[bot] 6fe1dcb
feat: enhance MCP server with chat functionalities, update documentat…
a-klos bc3ea76
chore: update subproject commit in rag-infrastructure
a-klos ae9a5ac
Merge branch 'feature/mcp' of github.com:stackitcloud/rag-template in…
a-klos a6dfb55
chore: update submodules to latest main
github-actions[bot] 3bd1d76
feat: add build and push step for mcp-server in Makefile
a-klos b4dba97
Merge branch 'feature/mcp' of github.com:stackitcloud/rag-template in…
a-klos File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
FROM --platform=linux/amd64 python:3.11.7-bookworm AS build | ||
|
||
ARG dev=0 | ||
ENV POETRY_VIRTUALENVS_PATH=/app/mcp-server/.venv | ||
ENV POETRY_VERSION=1.8.3 | ||
|
||
WORKDIR /app | ||
|
||
RUN DEBIAN_FRONTEND=noninteractive apt-get update \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential --no-install-recommends make && \ | ||
python3 -m venv "${POETRY_VIRTUALENVS_PATH}" \ | ||
&& $POETRY_VIRTUALENVS_PATH/bin/pip install "poetry==${POETRY_VERSION}" | ||
ENV PATH="${POETRY_VIRTUALENVS_PATH}/bin:$PATH" | ||
|
||
|
||
WORKDIR /app/mcp-server | ||
COPY mcp-server/pyproject.toml mcp-server/poetry.lock ./ | ||
|
||
RUN mkdir log && chmod 700 log | ||
RUN touch /app/mcp-server/log/logfile.log && chmod 600 /app/mcp-server/log/logfile.log | ||
|
||
RUN poetry config virtualenvs.create false &&\ | ||
if [ "$dev" = "1" ]; then \ | ||
poetry install --no-interaction --no-ansi --no-root --with dev; \ | ||
else \ | ||
poetry install --no-interaction --no-ansi --no-root; \ | ||
fi | ||
|
||
FROM --platform=linux/amd64 python:3.11.7-bookworm | ||
ARG dev=0 | ||
|
||
RUN adduser --disabled-password --gecos "" --uid 65532 nonroot | ||
|
||
ENV POETRY_VIRTUALENVS_PATH=/app/mcp-server/.venv | ||
COPY --from=build --chown=nonroot:nonroot ${POETRY_VIRTUALENVS_PATH} ${POETRY_VIRTUALENVS_PATH} | ||
COPY --from=build /usr/local/bin/ /usr/local/bin/ | ||
COPY --from=build /usr/bin/make /usr/bin/make | ||
COPY --from=build /usr/local/lib/ /usr/local/lib/ | ||
|
||
WORKDIR /app/mcp-server | ||
COPY --chown=nonroot:nonroot mcp-server . | ||
|
||
|
||
a-klos marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# cleanup | ||
RUN apt-get clean autoclean | ||
RUN apt-get autoremove --yes | ||
|
||
RUN if [ "$dev" = "0" ]; then \ | ||
while read -r shell; do rm -f "$shell"; done < /etc/shells; \ | ||
rm -rf /var/lib/{apt,dpkg,cache,log}/ \ | ||
else \ | ||
echo "POETRY_VIRTUALENVS_PATH=/app/mcp-server/.venv" >> /etc/environment;\ | ||
export POETRY_VIRTUALENVS_PATH=/app/mcp-server/.venv;\ | ||
export PATH="${POETRY_VIRTUALENVS_PATH}/bin:$PATH";\ | ||
fi | ||
|
||
|
||
USER nonroot | ||
COPY --from=build --chown=nonroot:nonroot /app/mcp-server/log /app/mcp-server/log | ||
|
||
ENV PATH="${POETRY_VIRTUALENVS_PATH}/bin:${PATH}" | ||
|
||
CMD [ "poetry", "run", "python", "src/main.py" ] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
|
||
docker run --user $(id -u):$(id -g) --rm -v $PWD:/local openapitools/openapi-generator-cli@sha256:b35aee2d0f6ffadadcdad9d8fc3c46e8d48360c20b5731a5f47c809d51f67a04 generate -i /local/rag-core-library/rag-core-api/openapi.yaml -g python -o /local/mcp-server/src --additional-properties=generateSourceCodeOnly=True,packageName=rag_backend_client.openapi_client | ||
cd ./mcp-server | ||
black . | ||
cd .. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.