{"id":38213314,"url":"https://github.com/tsjdev-apps/openai-localllm-chat-copilot","last_synced_at":"2026-01-17T00:45:20.750Z","repository":{"id":243634665,"uuid":"812767290","full_name":"tsjdev-apps/openai-localllm-chat-copilot","owner":"tsjdev-apps","description":"Simple .NET console application demonstrating OpenAI NuGet package with OpenAI and local LLMs using Ollama.","archived":false,"fork":false,"pushed_at":"2024-09-08T08:16:39.000Z","size":975,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-09-08T09:28:57.301Z","etag":null,"topics":["copilot-chat","ollama","openai"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tsjdev-apps.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"tsjdev-apps"}},"created_at":"2024-06-09T20:22:36.000Z","updated_at":"2024-09-08T08:16:40.000Z","dependencies_parsed_at":"2024-06-10T10:47:42.249Z","dependency_job_id":"85439f8b-1d8d-4c08-b25f-38c2f3dde87c","html_url":"https://github.com/tsjdev-apps/openai-localllm-chat-copilot","commit_stats":null,"previous_names":["tsjdev-apps/openai-localllm-chat-copilot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tsjdev-apps/openai-localllm-chat-copilot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsjdev-apps%2Fopenai-localllm-chat-copilot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsjdev-apps%2Fopenai-localllm-chat-copilot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsjdev-apps%2Fopenai-localllm-chat-copilot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsjdev-apps%2Fopenai-localllm-chat-copilot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tsjdev-apps","download_url":"https://codeload.github.com/tsjdev-apps/openai-localllm-chat-copilot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsjdev-apps%2Fopenai-localllm-chat-copilot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28490535,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T23:55:29.509Z","status":"ssl_error","status_checked_at":"2026-01-16T23:55:29.108Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["copilot-chat","ollama","openai"],"created_at":"2026-01-17T00:45:20.671Z","updated_at":"2026-01-17T00:45:20.731Z","avatar_url":"https://github.com/tsjdev-apps.png","language":"C#","funding_links":["https://github.com/sponsors/tsjdev-apps"],"categories":[],"sub_categories":[],"readme":"# Using the official OpenAI library for .NET to access local running LLMs ans SLMs using Ollama or llamafiles\n\n![Header](./docs/header-02.png)\n\nIn this repository, we will use the official [OpenAI library for .NET](https://www.nuget.org/packages/OpenAI) to create a simple console application. This application will implement a Shakespearean chat using either *OpenAI*’s models, locally running *LLMs* or *SLMs* with [Ollama](https://ollama.com/) or locally running *LLMs* or *SLMs* as [llamafile](https://github.com/Mozilla-Ocho/llamafile).\n\n## Usage\n\nYou need to create an OpenAI account on this [website](https://platform.openai.com/docs/overview). You have to pay to use the API so make sure that you add your payment information. After that, you can create an API Key [here](https://platform.openai.com/api-keys) for further use.\n\nIf you want to run local LLMs or SLMs simply install [Ollama](https://ollama.com/) and download a desired model.\n\nIf you want to run local LLMs or SLM get a `llamafile` from the official [GitHub Repository](https://github.com/Mozilla-Ocho/llamafile). On Windows you need to replace the file extension `.llamafile` with `.exe` to be able to execute the file.\n\nJust run the app and follow the steps displayed on the screen.\n\n## Screenshots\n\nHere you can see the console application in action:\n\nThe first screenshot shows the host selection.\n\n![Console](./docs/console-01.png)\n\nDepending on your selection, you will be asked for the required parameters. In this case we need to enter the OpenAI key.\n\n![Console](./docs/console-02.png)\n\nNext we need to select the OpenAI model.\n\n![Console](./docs/console-03.png)\n\nFinally you can start chatting with William Shakespeare.\n\n![Console](./docs/console-04.png)\n\nIf you select *Ollama (Local LLM)* as host, you need to specify the downloaded Ollama model.\n\n![Console](./docs/console-05.png)\n\nIn my case I’ve downloaded the famous Phi-3 model provided by Microsoft.\n\n![Console](./docs/console-06.png)\n\nFinally you can start chatting with William Shakespeare.\n\n![Console](./docs/console-07.png)\n\nIf you select *Llamafile (Local LLM)* as host, you can start directly chatting with Shakespeare.\n\n![Console](./docs/console-08.png)\n\n## Blog Post / YouTube Video\n\nIf you are more interested into details, please see the following posts on [medium.com](https://www.medium.com) or in my [personal blog](https://www.tsjdev-apps.de):\n\n- [Using the official OpenAI library for .NET to access llamafile LLMs](https://medium.com/medialesson/using-the-official-openai-library-for-net-to-access-llamafile-llms-c0d8668dbc1d)\n- [Using the official OpenAI library for .NET to access local running LLMs ans SLMs](https://medium.com/medialesson/using-the-official-openai-library-for-net-to-access-local-running-llms-ans-slms-dfdbc0f90404)\n- [Using Ollama to run local LLMs on your computer](https://medium.com/medialesson/using-ollama-to-run-local-llms-on-your-computer-2e2ee6572a13)\n- [Creating a copilot using OpenAI and/or Azure OpenAI](https://medium.com/medialesson/creating-a-copilot-using-openai-and-or-azure-openai-03938fcf7413)\n- [Einrichtung von OpenAI](https://www.tsjdev-apps.de/einrichtung-von-openai/)\n- [Einrichtung von Azure OpenAI](https://www.tsjdev-apps.de/einrichtung-von-azure-openai/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsjdev-apps%2Fopenai-localllm-chat-copilot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftsjdev-apps%2Fopenai-localllm-chat-copilot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsjdev-apps%2Fopenai-localllm-chat-copilot/lists"}