File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 1010- [ LangChain > Azure OpenAI] ( https://python.langchain.com/v0.1/docs/integrations/llms/azure_openai/ )
1111- [ Get started with LangSmith] ( https://docs.smith.langchain.com/ )
1212- [ Add message history (memory) > In-memory] ( https://python.langchain.com/v0.1/docs/expression_language/how_to/message_history/#in-memory )
13+ - [ Tool calling agent] ( https://python.langchain.com/v0.1/docs/modules/agents/agent_types/tool_calling/ )
14+ - [ LangChain > Tools > Bing Search] ( https://python.langchain.com/v0.1/docs/integrations/tools/bing_search/ )
1315
1416## Backend
1517
Original file line number Diff line number Diff line change @@ -6,3 +6,6 @@ AZURE_OPENAI_GPT_MODEL = "gpt-4o"
66
77LANGCHAIN_TRACING_V2 = "true"
88LANGCHAIN_API_KEY = "<your-api-key>"
9+
10+ BING_SUBSCRIPTION_KEY = "<your-api-key>"
11+ BING_SEARCH_URL = "https://api.bing.microsoft.com/v7.0/search"
Original file line number Diff line number Diff line change @@ -22,6 +22,15 @@ def get_session_history(session_id: str) -> BaseChatMessageHistory:
2222 return store [session_id ]
2323
2424
25+ def run_bing_search (
26+ query : str ,
27+ k = 1 ,
28+ ) -> str :
29+ from langchain_community .utilities import BingSearchAPIWrapper
30+
31+ return BingSearchAPIWrapper (k = k ).run (query = query )
32+
33+
2534def start (
2635 backend_url : str ,
2736 log_level : int ,
You can’t perform that action at this time.
0 commit comments