semantic kernel semanticsearch
1.0.0
ตัวอย่างการใช้งานคำถามและคำตอบโดยใช้เคอร์เนลความหมาย
สิ่งนี้ใช้ sqlite เพื่อจัดเก็บ embeddings (ข้อควรระวัง: sqlite ไม่ใช่เวกเตอร์ที่ปรับให้เหมาะสม!) และ openai เพื่อตอบคำถามตามข้อความที่พบในฐานข้อมูล ฐานข้อมูลมีการเติมตาม URL จากการกำหนดค่า
appsettings.json หรือความลับของผู้ใช้ ( OpenAI:ApiKey )appsettings.json ( Urls รายการ)dotnet run Enter a question or press enter to quit: What is sk?
?: Semantic Kernel (SK) is a lightweight SDK that lets you easily mix conventional programming languages with the latest in Large Language Model (LLM) AI "prompts" with templating, chaining, and planning capabilities out-of-the-box.
Enter a question or press enter to quit: What systems cann SK connect to?
?: SK can connect to external APIs, MS Graph Connector Kit, Bing search query, OpenXML streams, and SQLite.
Enter a question or press enter to quit: Shoe me an example of creating a kernel
?: using Microsoft.SemanticKernel;
var myKernel = Kernel.Builder.Build();
Enter a question or press enter to quit: Was bedeutet SK?
?: SK steht für Semantic Kernel.
Enter a question or press enter to quit: ¿Qué significa SK?
?: SK significa Kernel Semántico.
appsettings.json ) Use the following pieces of context to answer the question at the end. If you don't know the answer, don't try to make up an answer and answer with 'I don't know'. Answer in the langauge that used for the question.
{{$context}}
Question: {{$input}}
Answer: