MCPcopy Create free account
hub / github.com/LangGraph-GUI/LangGraph-GUI-backend / process_string

Function process_string

src/main.py:47–58  ·  view source on GitHub ↗
(request: Request, username: str)

Source from the content-addressed store, hash-verified

45
46@app.post('/chatbot/{username}')
47async def process_string(request: Request, username: str):
48 # Get the JSON data from the request
49 data = await request.json()
50 input_string = data.get('input_string', '')
51 llm_model = data.get('llm_model', '') # Default to 'gemma2' if not provided
52 api_key = data.get('api_key', '')
53
54 # Process the string using the dynamically provided llm_model and api_key
55 result = await ChatBot(get_llm(llm_model, api_key), input_string)
56
57 # Return the result as JSON
58 return JSONResponse(content={'result': result})
59
60
61@app.post('/run/{username}')

Callers

nothing calls this directly

Calls 2

ChatBotFunction · 0.85
get_llmFunction · 0.85

Tested by

no test coverage detected