Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
6c3a3de
chore: update environment configuration, Dockerfile, and requirements…
kevingoh Feb 28, 2025
8f48c4d
chore: update Dockerfile to use slim Python image and add pydantic to…
kevingoh Feb 28, 2025
6104b4d
fix: specify pydantic version constraint in requirements.txt
kevingoh Feb 28, 2025
bab6cc4
feat: implement module patching for FixedConversationHistory and upda…
kevingoh Feb 28, 2025
df61a04
fix: set default values for env and debug in BaseConfig
kevingoh Feb 28, 2025
da165a6
fix: add debug print statement for skill config in init function
kevingoh Feb 28, 2025
df9ae25
fix: replace credential extraction with hardcoded values in init func…
kevingoh Feb 28, 2025
0b7e8cf
fix: replace dynamic credential extraction with hardcoded values in s…
kevingoh Feb 28, 2025
f197f03
fix: update .gitignore to include experimental test directory
kevingoh Feb 28, 2025
2fff294
refactor: replace mock functions with actual implementations in FakeN…
kevingoh Mar 2, 2025
61d5ae6
refactor: replace gemini service with gemini_agent and update imports…
kevingoh Mar 2, 2025
911a10f
test
kevingoh Mar 2, 2025
90ca22a
refactor: move gemini_agent to mocks and update imports in FakeNLPSer…
kevingoh Mar 2, 2025
5080fc8
feat: add welcome message and response handling in FakeNLPService
kevingoh Mar 2, 2025
1e5a16b
refactor: enhance welcome response with annotations and handle None c…
kevingoh Mar 2, 2025
aebb26e
fix: change endConversation flag to False in execute response
kevingoh Mar 2, 2025
cdc3400
feat: add debug print statement for request in execute function
kevingoh Mar 2, 2025
253c9d8
feat: enhance request logging by including user intent and skill conf…
kevingoh Mar 2, 2025
ce76a70
comment print out
kevingoh Mar 2, 2025
d51551f
more debug info
kevingoh Mar 2, 2025
46c7921
feat: update chatbot instructions and welcome message for bilingual s…
kevingoh Mar 2, 2025
80a0193
feat: update system instructions to include YouTube video suggestion …
kevingoh Mar 3, 2025
0e7946c
feat: allow agent to provide YouTube video link for association intro…
kevingoh Mar 3, 2025
33f9aa5
feat: update system instruction to reflect the correct association na…
kevingoh Mar 3, 2025
f44b679
feat: clarify instructions for introducing the association with YouTu…
kevingoh Mar 3, 2025
fe65d71
feat: reduce max output tokens for generation and add debug print for…
kevingoh Mar 3, 2025
c953d67
feat: reduce max output tokens and enhance system instructions for NS…
kevingoh Mar 3, 2025
5cb7849
feat: enhance system instructions to include YouTube video links for …
kevingoh Mar 3, 2025
b3b4e6f
feat: refine system instruction to specify the content of the YouTube…
kevingoh Mar 3, 2025
eeee5e9
feat: update system instructions and video references for NSCCCI Chamber
kevingoh Mar 3, 2025
af9949e
updated youtube links
kevingoh Mar 3, 2025
b24d3fe
feat: update video references and system instructions for NSCCCI Chamber
kevingoh Mar 3, 2025
5910a9f
feat: enhance system instructions to include video references for NSC…
kevingoh Mar 3, 2025
a2f4110
feat: update model version in gemini_agent to 2.0-flash-001
kevingoh Mar 3, 2025
6f3b7de
feat: enhance system instructions to include video playback capabilities
kevingoh Mar 3, 2025
626fc98
feat: append YouTube link to response text in gemini_agent
kevingoh Mar 3, 2025
83278bf
feat: call allocated_resources method during agent initialization
kevingoh Mar 3, 2025
a884da5
feat: modify response generation to include previous message context
kevingoh Mar 3, 2025
5ea65fe
feat: update YouTube links to enable autoplay and refine system instr…
kevingoh Mar 3, 2025
bed51d0
feat: remove autoplay from YouTube links in gemini_agent and adjust r…
kevingoh Mar 3, 2025
af24563
feat: refine response instructions for gemini_agent to focus on NSCCC…
kevingoh Mar 3, 2025
8c514a0
change tool
kevingoh Mar 3, 2025
f45c9f5
feat: improve response text clarity in gemini_agent instructions
kevingoh Mar 3, 2025
92d2535
feat: update YouTube link for chamber of commerce video to enable aut…
kevingoh Mar 6, 2025
731e9b2
test autoplay
kevingoh Mar 11, 2025
fcecb0d
test show video card
kevingoh Mar 11, 2025
086e6b6
test content 2
kevingoh Mar 11, 2025
d12298f
feat: handle case where cards are present without annotations in resp…
kevingoh Mar 11, 2025
744a0b0
fix: update response construction logic to handle cases with and with…
kevingoh Mar 11, 2025
9cd45ee
feat: add video handling and introductory messages for NSCCCI responses
kevingoh Mar 11, 2025
b26289b
fix: clarify instruction for user video preference in response schema
kevingoh Mar 12, 2025
cba44ee
fix: update video URLs for vision valley in gemini_agent mock
kevingoh Mar 12, 2025
1b73530
feat: implement endpoint to store and retrieve person data with threa…
kevingoh Apr 7, 2025
f051f26
feat: refactor face detection handler to store person data asynchrono…
kevingoh Apr 7, 2025
421eff1
feat: implement person data handling with global state management in …
kevingoh Apr 7, 2025
c1fc7f2
feat: add logging for setting person data and face detection handling
kevingoh Apr 7, 2025
c29030e
feat: enhance system instruction for N.S.C.C.C.I and update grounding…
kevingoh Apr 17, 2025
fb46c3c
back to datastore grounding before transiting to google genai
kevingoh Apr 17, 2025
5dfeb75
feat: update gemini_agent and fake_nlp_service to improve system inst…
kevingoh Apr 22, 2025
d6cd87f
feat: enable google-genai in requirements for enhanced functionality
kevingoh Apr 22, 2025
5f1a221
feat: update pydantic version in requirements for compatibility
kevingoh Apr 22, 2025
06b0c88
fix: update ragCorpus and tool initialization for correct resource ha…
kevingoh Apr 22, 2025
ed5d153
fallback to vertexai sdk due to dependancy problem. to update soulmac…
kevingoh Apr 22, 2025
22553e7
fix: update DATA_STORE_ID and adjust grounding_tool configuration for…
kevingoh Apr 22, 2025
f1864fe
fix: update system_instruction to include Chinese name and enhance co…
kevingoh Apr 23, 2025
36f920a
feat: add goodbye and idle response functions; enhance state manageme…
kevingoh Apr 26, 2025
8c19160
fix: refactor state management to use global variable for _fake_nlp_s…
kevingoh Apr 26, 2025
aad4d46
fix: refactor state management in FakeNLPService to use getter and se…
kevingoh Apr 26, 2025
0196e68
fix: update system_instruction to include Malay language support for …
kevingoh Apr 26, 2025
13cb1cb
fix: update system_instruction to clarify default language usage and …
kevingoh Apr 26, 2025
5730511
fix: update video introduction text and add Malay language support in…
kevingoh Apr 26, 2025
db7d124
fix: update send method to manage state for "Welcome" input and retur…
kevingoh Apr 27, 2025
be2b62b
fix: manage state for "Welcome" input in send method and return idle …
kevingoh Apr 27, 2025
ab90441
fix: reorganize state management in send method for improved flow
kevingoh Apr 27, 2025
e98b3cf
fix: add get_person_data function and correct video introduction text
kevingoh Apr 27, 2025
0e9a3c4
fix: adjust generation configuration parameters for improved response…
kevingoh Apr 27, 2025
f740133
fix: enhance get_person_data function to provide contextual information
kevingoh Apr 27, 2025
b9f45b2
fix: update system instruction for improved clarity on NSCCCI and Neg…
kevingoh Apr 27, 2025
0fab902
fix: adjust temperature setting in generation configuration for impro…
kevingoh Apr 27, 2025
c38d435
fix: integrate RAG retrieval tool for enhanced data sourcing in chatbot
kevingoh Apr 27, 2025
65cbd7c
fix: update prompt formatting in chatbot response for improved clarity
kevingoh Apr 27, 2025
406bab3
fix: comment out rag retrieval configuration for future reference
kevingoh Apr 27, 2025
7e99f9f
fix: toggle model version and grounding tool configurations for testing
kevingoh Apr 27, 2025
e9718f2
fix: update chatbot response instructions for clarity and language co…
kevingoh Apr 27, 2025
2c6e9f5
fix: enhance language consistency in chatbot responses by clarifying …
kevingoh Apr 27, 2025
4bda662
fix: update grounding tool configuration for chatbot to use rag retri…
kevingoh Apr 27, 2025
39cab99
fix: update grounding tool configuration in Chatbot class for testing…
kevingoh Apr 27, 2025
4e05bc1
fix: update model version and enhance system instructions for clarity
kevingoh Apr 27, 2025
c0ec906
fix: update grounding tool configuration in Chatbot class to use rag …
kevingoh Apr 27, 2025
baddc45
fix: update grounding tool configuration in Chatbot class and enhance…
kevingoh Apr 27, 2025
729babb
fix: update system instructions in gemini_agent.py to include histori…
kevingoh Apr 27, 2025
f822cd9
fix: update rag retrieval configuration in gemini_agent.py for improv…
kevingoh Apr 27, 2025
6c54d9c
fix: refine system instructions in gemini_agent.py for improved user …
kevingoh Apr 27, 2025
12d9c0c
fix: refine system instructions in gemini_agent.py to enhance user en…
kevingoh Apr 28, 2025
5c34359
fix: update system instructions in gemini_agent.py for improved clari…
kevingoh Apr 28, 2025
52e7e0b
fix: comment out rag retrieval configuration in gemini_agent.py for c…
kevingoh Apr 28, 2025
cc379b1
fix: enhance system instructions in gemini_agent.py for improved clar…
kevingoh Apr 28, 2025
a06fa2b
fix: refine system instructions in gemini_agent.py for improved clari…
kevingoh Apr 28, 2025
bce1b29
fix: update system instructions in gemini_agent.py to enhance user en…
kevingoh Apr 28, 2025
f8d3e8f
for opening
kevingoh May 12, 2025
6ca7bf9
fix: correct spelling in system instructions and add quiet mode to go…
kevingoh May 12, 2025
ed6dcb8
fix: update user input handling in FakeNLPService to manage state tra…
kevingoh May 12, 2025
72c8d52
fix: update system instructions in gemini_agent.py to include specifi…
kevingoh May 13, 2025
445418a
fix: enhance welcome message in get_hello_response to improve user en…
kevingoh May 13, 2025
139ee5a
fix: improve welcome message in get_hello_response for clarity and ac…
kevingoh May 13, 2025
9af9ccb
fix: enhance welcome message in get_hello_response to clarify AI role…
kevingoh May 13, 2025
e5454f6
fix: refine welcome message in get_hello_response for improved clarit…
kevingoh May 13, 2025
36c0670
fix: update system instructions to improve user query handling and cl…
kevingoh May 13, 2025
3d15710
fix: update system instruction to include agent name and improve user…
kevingoh May 13, 2025
73213f0
fix: update idle response message for improved clarity and user engag…
kevingoh May 13, 2025
ab47d9c
fix: update response language in prompt to ensure consistent English …
kevingoh May 13, 2025
c551c26
fix: update welcome message in get_hello_response for improved accuracy
kevingoh May 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .env_example

This file was deleted.

5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,7 @@ dmypy.json
# Pyre type checker
.pyre/

.DS_Store
.DS_Store

# experimental
.tests/
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.11.0
FROM python:3.11-slim

ENV VIRTUAL_ENV=venv
RUN python3 -m venv $VIRTUAL_ENV
Expand All @@ -7,11 +7,13 @@ ENV PATH="$VIRTUAL_ENV/bin:$PATH"
COPY ./requirements.txt /app/requirements.txt
WORKDIR /app

RUN pip install --upgrade pip
RUN pip install -r requirements.txt
#RUN pip install --upgrade pip
RUN pip install --trusted-host pypi.python.org -r requirements.txt

COPY . /app

EXPOSE 3000
EXPOSE 8080

CMD [ "python", "manage.py", "run" ]

#ENTRYPOINT ["python", "webhook.py"]
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,7 @@ This repository is licensed under the Apache License, Version 2.0. See
[LICENSE](./LICENSE) for the full license text.

## Issues
For any issues, please reach out to one of our Customer Success team members.
For any issues, please reach out to one of our Customer Success team members.

## REFs
* [nlp skill](https://docs.soulmachines.com/skills-api/getting-started/nlp-adapter-skill)
50 changes: 50 additions & 0 deletions app/app.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,53 @@
#for pydantic > 2
"""
import sys
import importlib.util
import importlib.machinery
import types
from typing import List
#from pydantic import RootModel

# Define our fixed class
class FixedConversationHistory(RootModel):
root: List # Will be properly typed later

# Function to patch the module
def patch_api_module():
# Get the spec
spec = importlib.util.find_spec('smskillsdk.models.api')
if not spec:
raise ImportError("Module smskillsdk.models.api not found")

# Create a new module object
module = types.ModuleType('smskillsdk.models.api')

# Add it to sys.modules early
sys.modules['smskillsdk.models.api'] = module

# Load the source code as a string
source = spec.loader.get_source('smskillsdk.models.api')

# Modify the source code to remove or fix the problematic class
modified_source = source.replace(
"class ConversationHistory(BaseModel):",
"# Original ConversationHistory commented out"
).replace(
" __root__: List[HistoryItem]",
" # __root__: List[HistoryItem]"
)

# Compile and execute the modified source
code = compile(modified_source, spec.origin, 'exec')
exec(code, module.__dict__)

# Now inject our fixed class
module.ConversationHistory = FixedConversationHistory

return module """

# Patch the module before anyone else imports it
#patched_module = patch_api_module()

from fastapi import FastAPI
from .views import skill

Expand Down
6 changes: 3 additions & 3 deletions app/config/base_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ class BaseConfig(BaseSettings):
Base application configuration
"""

port: int = 3000
env: str
debug: bool
port: int = 8080
env: str = "DEVELOPMENT"
debug: bool = True

class Config:
env_file = ".env"
Loading