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
| """ | |
| FastAPI Intent-Based Tool Execution API | |
| This API receives a user query, matches it to the most relevant intent, | |
| and executes the appropriate tool using LangChain. | |
| """ | |
| from fastapi import FastAPI, HTTPException | |
| from pydantic import BaseModel, Field | |
| from typing import Optional, Dict, Any, List |
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
| const express = require('express'); | |
| const jsonwebtoken = require('jsonwebtoken'); | |
| const app = express(); | |
| const dbs = [ | |
| { | |
| username: 'thinh', | |
| age: 22, | |
| email: 'thinh@gmail.com', |
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 node:alpine | |
| RUN mkdir -p /usr/src/app | |
| COPY . ./usr/src/app | |
| WORKDIR /usr/src/app | |
| RUN npm install |
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
| version: '3.8' | |
| services: | |
| neo4j-service: | |
| image: neo4j | |
| restart: always | |
| environment: | |
| - NEO4J_AUTH=neo4j/neo4j1 | |
| container_name: neo4j-container | |
| ports: |
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
| import java.time.LocalDateTime; | |
| import java.util.concurrent.TimeUnit; | |
| public class ThreadStaticSyncDemo { | |
| public static void main (String[] args) throws InterruptedException { | |
| Thread thread1 = new Thread(() -> { | |
| System.out.println("thread1 before call "+ LocalDateTime.now()); | |
| syncMethod("from thread1"); |