How rkishore1207/artificial-intelligence works
This repository contains AI learning samples and a small ASP.NET AI-agent API. The API’s user workflow accepts a prompt, asks Azure OpenAI to choose and invoke weather or user-detail functions as needed, then returns the model response; a separate endpoint turns text into an embedding. The README also describes broader Azure Agent/RAG concepts, but no corresponding implementation is present in the supplied tree. Edges reflect the sampled controller and service calls; unsampled capabilities are not inferred.
Main entry points: FunctionCalling.cs Chat orchestrator · CustomFunctions.cs Custom functions · AIAgentController.cs Agent controller · VectorEmbedding.cs Embedding service
Components 17
Agent API
- Agent controller
AIAgent/AIAgent/AIAgent/Controllers/AIAgentController.cs - Prompt request
AIAgent/AIAgent/Services/FunctionCalling/Models/PromptRequest.cs
Function Calling
- Chat orchestrator
AIAgent/AIAgent/Services/FunctionCalling/FunctionCalling.cs - Custom functions
AIAgent/AIAgent/Services/FunctionCalling/CustomFunctions.cs - Function contracts
AIAgent/AIAgent/Services/FunctionCalling/ICustomFunctions.cs - Chat contract
AIAgent/AIAgent/Services/FunctionCalling/IFunctionCalling.cs - Weather models
AIAgent/AIAgent/Services/FunctionCalling/Models/Location.cs - Weather response
AIAgent/AIAgent/Services/FunctionCalling/Models/WeatherDetails.cs - User record
AIAgent/AIAgent/Services/FunctionCalling/Models/User.cs
Embeddings
- Embedding service
AIAgent/AIAgent/Services/VectorEmbeddingAgent/VectorEmbedding.cs - Embedding contract
AIAgent/AIAgent/Services/VectorEmbeddingAgent/IVectorEmbedding.cs
External Services
- Azure OpenAI chat
- OpenWeather API
- Azure embeddings
- Ollama sample
AIFor.NET/FunctionCalling/Program.cs - Chat sample
AIFor.NET/ChatApplication/Program.cs
Other components
- API client
Connections 15
- API client → Agent controller: posts prompt
AIAgent/AIAgent/AIAgent/Controllers/AIAgentController.cs - Agent controller → Prompt request: accepts
AIAgent/AIAgent/AIAgent/Controllers/AIAgentController.cs - Agent controller → Chat orchestrator: calls chat
AIAgent/AIAgent/AIAgent/Controllers/AIAgentController.cs - Chat orchestrator → Azure OpenAI chat: requests completion
AIAgent/AIAgent/Services/FunctionCalling/FunctionCalling.cs - Chat orchestrator → Custom functions: dispatches tools
AIAgent/AIAgent/Services/FunctionCalling/FunctionCalling.cs - Custom functions → OpenWeather API: fetches weather
AIAgent/AIAgent/Services/FunctionCalling/CustomFunctions.cs - Custom functions → Weather models: parses location
AIAgent/AIAgent/Services/FunctionCalling/CustomFunctions.cs - Custom functions → Weather response: parses conditions
AIAgent/AIAgent/Services/FunctionCalling/CustomFunctions.cs - Custom functions → User record: creates records
AIAgent/AIAgent/Services/FunctionCalling/CustomFunctions.cs - Agent controller → Embedding service: requests embedding
AIAgent/AIAgent/AIAgent/Controllers/AIAgentController.cs - Embedding service → Azure embeddings: generates vector
AIAgent/AIAgent/Services/VectorEmbeddingAgent/VectorEmbedding.cs - Chat orchestrator → Chat contract: implements
AIAgent/AIAgent/Services/FunctionCalling/IFunctionCalling.cs - Chat orchestrator → Function contracts: uses contract
AIAgent/AIAgent/Services/FunctionCalling/FunctionCalling.cs - Embedding service → Embedding contract: implements
AIAgent/AIAgent/Services/VectorEmbeddingAgent/VectorEmbedding.cs - Ollama sample → API client: streams response
AIFor.NET/FunctionCalling/Program.cs