using of the variable #20136
Closed
manasa143231
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
def get_incidents_by_user(service_now_uri, username, password, assigned_to):
class GetIncidentsByUserInput(BaseModel):
assigned_to: str
class GetIncidentsByUserTool(BaseTool):
name = "get_incidents_by_user"
response = get_incidents_by_user(service_now_uri_main, service_now_username, service_now_password, assigned_to)
app = Flask(name)
tools = [CreateServiceRequestTool(), CreateIncidentTool(), GetIncidentsByUserTool()]
@api.route('/chat')
class Chat(Resource):
@api.expect(chat_model)
def post(self):
try:
userinfo = request.json['userinfo']
message_history = RedisChatMessageHistory(
url=" ", ttl=300, session_id=session_id
)
This is my sample code
I want to use the variable userinfo in the get_incidents_by_user() without make it as global variable
Beta Was this translation helpful? Give feedback.
All reactions