This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import dev.langchain4j.data.message.SystemMessage; | |
| import dev.langchain4j.data.message.UserMessage; | |
| import dev.langchain4j.http.client.jdk.JdkHttpClient; | |
| import dev.langchain4j.model.chat.response.StreamingChatResponseHandler; | |
| import dev.langchain4j.model.openai.OpenAiStreamingChatModel; | |
| import java.net.http.HttpClient; | |
| import java.util.HashMap; | |
| import java.util.List; | |
| import java.util.Map; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | |
| import com.fasterxml.jackson.annotation.JsonProperty; | |
| import com.fasterxml.jackson.databind.ObjectMapper; | |
| import java.nio.file.Files; | |
| import java.nio.file.Path; | |
| import java.util.List; | |
| import java.util.Map; | |
| @JsonIgnoreProperties(ignoreUnknown = true) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.mycompany.langsample; | |
| import dev.langchain4j.http.client.jdk.JdkHttpClient; | |
| import dev.langchain4j.memory.chat.MessageWindowChatMemory; | |
| import dev.langchain4j.model.openai.OpenAiStreamingChatModel; | |
| import dev.langchain4j.service.AiServices; | |
| import dev.langchain4j.service.TokenStream; | |
| import java.awt.BorderLayout; | |
| import java.awt.event.ActionListener; | |
| import java.io.IOException; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import dev.langchain4j.agent.tool.Tool; | |
| import dev.langchain4j.http.client.jdk.JdkHttpClient; | |
| import dev.langchain4j.model.openai.OpenAiStreamingChatModel; | |
| import dev.langchain4j.service.AiServices; | |
| import dev.langchain4j.service.TokenStream; | |
| import java.awt.BorderLayout; | |
| import java.awt.FlowLayout; | |
| import java.awt.GridLayout; | |
| import java.awt.event.ActionListener; | |
| import java.net.http.HttpClient; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.mycompany.langsample; | |
| import dev.langchain4j.agent.tool.Tool; | |
| import dev.langchain4j.http.client.jdk.JdkHttpClient; | |
| import dev.langchain4j.model.openai.OpenAiStreamingChatModel; | |
| import dev.langchain4j.service.AiServices; | |
| import dev.langchain4j.service.TokenStream; | |
| import java.awt.BorderLayout; | |
| import java.awt.GridLayout; | |
| import java.awt.event.ActionListener; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.mycompany.langsample; | |
| import dev.langchain4j.agent.tool.Tool; | |
| import dev.langchain4j.http.client.jdk.JdkHttpClient; | |
| import dev.langchain4j.model.openai.OpenAiStreamingChatModel; | |
| import dev.langchain4j.service.AiServices; | |
| import dev.langchain4j.service.TokenStream; | |
| import java.awt.BorderLayout; | |
| import java.awt.Color; | |
| import java.awt.Font; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import javax.swing.*; | |
| import java.awt.*; | |
| import java.awt.event.*; | |
| import java.util.ArrayList; | |
| import java.util.List; | |
| import java.util.Random; | |
| import java.awt.geom.RoundRectangle2D; | |
| public class BlockBreaker extends JFrame { | |
| private GamePanel gamePanel; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import javax.swing.*; | |
| import java.awt.*; | |
| import java.awt.event.*; | |
| public class SokobanGUI extends JPanel implements KeyListener { | |
| private static final int TILE_SIZE = 50; | |
| private static char[][] level = { | |
| {'#', '#', '#', '#', '#', '#', '#', '#', '#'}, | |
| {'#', '.', ' ', ' ', '$', ' ', ' ', '.', '#'}, | |
| {'#', ' ', '#', ' ', ' ', ' ', '#', ' ', '#'}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Scanner; | |
| public class Sokoban { | |
| private static char[][] level = { | |
| {'#', '#', '#', '#', '#', '#', '#', '#', '#'}, | |
| {'#', '.', ' ', ' ', '$', ' ', ' ', '.', '#'}, | |
| {'#', ' ', '#', ' ', ' ', ' ', '#', ' ', '#'}, | |
| {'#', ' ', '$', ' ', '@', ' ', '$', ' ', '#'}, | |
| {'#', '#', ' ', '#', ' ', '#', ' ', '#', '#'}, | |
| {'#', ' ', '.', ' ', '$', ' ', ' ', '.', '#'}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package imagesearchwithclip; | |
| import com.fasterxml.jackson.databind.ObjectMapper; | |
| import java.io.IOException; | |
| import java.io.UncheckedIOException; | |
| import java.net.URI; | |
| import java.net.http.HttpClient; | |
| import java.net.http.HttpRequest; | |
| import java.net.http.HttpResponse; | |
| import java.util.Arrays; |