mirror of
https://github.com/microsoft/semantic-kernel.git
synced 2026-10-12 02:19:06 +00:00
Merge branch 'java-v1' of github.com:microsoft/semantic-kernel into dsgrieve/v1-javadoc
This commit is contained in:
@@ -4,12 +4,12 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.microsoft.semantic-kernel</groupId>
|
||||
<artifactId>samples</artifactId>
|
||||
<version>1.0.0-alpha.1-SNAPSHOT</version>
|
||||
<artifactId>semantickernel-samples-parent</artifactId>
|
||||
<version>1.0.0-alpha.2-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>sample-code</artifactId>
|
||||
<artifactId>semantickernel-sample-code</artifactId>
|
||||
<name>Semantic Kernel Samples</name>
|
||||
<description>Sample code for using the Semantic Kernel project</description>
|
||||
<packaging>jar</packaging>
|
||||
@@ -71,7 +71,7 @@
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.microsoft.semantic-kernel</groupId>
|
||||
<artifactId>aiservices-openai</artifactId>
|
||||
<artifactId>semantickernel-aiservices-openai</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
-43
@@ -11,49 +11,6 @@ import java.time.format.DateTimeFormatter;
|
||||
import java.time.format.TextStyle;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* Description: TimeSkill provides a set of functions to get the current time and date.
|
||||
*
|
||||
* <p>Usage: kernel.importSkill(new TimeSkill(), "time");
|
||||
*
|
||||
* <p>Examples:
|
||||
*
|
||||
* <p>{{time.date}} => Sunday, 12 January, 2031
|
||||
*
|
||||
* <p>{{time.today}} => Sunday, 12 January, 2031
|
||||
*
|
||||
* <p>{{time.now}} => Sunday, January 12, 2031 9:15 PM
|
||||
*
|
||||
* <p>{{time.utcNow}} => Sunday, January 13, 2031 5:15 AM
|
||||
*
|
||||
* <p>{{time.time}} => 09:15:07 PM
|
||||
*
|
||||
* <p>{{time.year}} => 2031
|
||||
*
|
||||
* <p>{{time.month}} => January
|
||||
*
|
||||
* <p>{{time.monthNumber}} => 01
|
||||
*
|
||||
* <p>{{time.day}} => 12
|
||||
*
|
||||
* <p>{{time.dayOfWeek}} => Sunday
|
||||
*
|
||||
* <p>{{time.hour}} => 9 PM
|
||||
*
|
||||
* <p>{{time.hourNumber}} => 21
|
||||
*
|
||||
* <p>{{time.days_ago $days}} => Sunday, 7 May, 2023
|
||||
*
|
||||
* <p>{{time.last_matching_day $dayName}} => Sunday, 7 May, 2023
|
||||
*
|
||||
* <p>{{time.minute}} => 15
|
||||
*
|
||||
* <p>{{time.second}} => 7
|
||||
*
|
||||
* <p>{{time.timeZoneOffset}} => -08:00
|
||||
*
|
||||
* <p>{{time.timeZoneName}} => Pacific Time
|
||||
*/
|
||||
public class TimePlugin {
|
||||
|
||||
public static final String DAY_MONTH_DAY_YEAR = "EEEE, MMMM d, yyyy";
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ package com.microsoft.semantickernel.samples.syntaxexamples;
|
||||
import com.microsoft.semantickernel.plugins.text.TextPlugin;
|
||||
|
||||
/**
|
||||
* Demonstrates a native function from the {@code com.microsoft.semantickernel.coreskills} package.
|
||||
* Demonstrates a native function.
|
||||
*/
|
||||
public class Example01_NativeFunctions {
|
||||
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ public class Example03_Arguments {
|
||||
public static void main(String[] args) {
|
||||
Kernel kernel = Kernel.builder().build();
|
||||
|
||||
// Load native skill
|
||||
// Load native plugin
|
||||
KernelPlugin functionCollection =
|
||||
KernelPluginFactory.createFromObject(new StaticTextPlugin(), "text");
|
||||
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ import com.sun.jna.StringArray;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
/**
|
||||
* Demonstrate the {@code com.microsoft.semantickernel.coreskills.ConversationSummarySkill}
|
||||
* Demonstrate the {@see com.microsoft.semantickernel.samples.plugins.ConversationSummaryPlugin} plugin.
|
||||
* <p>
|
||||
* Refer to the <a href=
|
||||
* "https://github.com/microsoft/semantic-kernel/blob/experimental-java/java/samples/sample-code/README.md">
|
||||
|
||||
Reference in New Issue
Block a user