Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 6 of 6 for addSource (0.2 seconds)

  1. logger/slog_test.go

    import (
    	"bytes"
    	"context"
    	"log/slog"
    	"strings"
    	"testing"
    	"time"
    )
    
    func TestSlogLogger(t *testing.T) {
    	buf := &bytes.Buffer{}
    	handler := slog.NewTextHandler(buf, &slog.HandlerOptions{AddSource: true})
    	logger := NewSlogLogger(slog.New(handler), Config{LogLevel: Info})
    
    	logger.Trace(context.Background(), time.Now(), func() (string, int64) {
    		return "select count(*) from users", 0
    	}, nil)
    
    Created: Sun Apr 05 09:35:12 GMT 2026
    - Last Modified: Thu Oct 30 10:56:26 GMT 2025
    - 782 bytes
    - Click Count (0)
  2. src/main/java/org/codelibs/fess/entity/ChatMessage.java

            this.sources = sources;
        }
    
        /**
         * Adds a source to the message.
         *
         * @param source the source to add
         */
        public void addSource(final ChatSource source) {
            if (sources == null) {
                sources = new ArrayList<>();
            }
            sources.add(source);
        }
    
        /**
         * Checks if this is a user message.
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Thu Mar 12 04:52:31 GMT 2026
    - 10.1K bytes
    - Click Count (0)
  3. src/test/java/org/codelibs/fess/chat/ChatClientTest.java

            doc1.put("title", "Installation Guide");
            doc1.put("url", "http://example.com/install");
            msg.addSource(new ChatSource(1, doc1));
            final Map<String, Object> doc2 = new HashMap<>();
            doc2.put("title", "Quick Start");
            doc2.put("url", "http://example.com/start");
            msg.addSource(new ChatSource(2, doc2));
    
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Sat Mar 21 06:04:58 GMT 2026
    - 40.6K bytes
    - Click Count (0)
  4. api/go1.21.txt

    pkg log/slog, type Handler interface, WithAttrs([]Attr) Handler #56345
    pkg log/slog, type Handler interface, WithGroup(string) Handler #56345
    pkg log/slog, type HandlerOptions struct #56345
    pkg log/slog, type HandlerOptions struct, AddSource bool #56345
    pkg log/slog, type HandlerOptions struct, Level Leveler #56345
    pkg log/slog, type HandlerOptions struct, ReplaceAttr func([]string, Attr) Attr #56345
    pkg log/slog, type JSONHandler struct #56345
    Created: Tue Apr 07 11:13:11 GMT 2026
    - Last Modified: Mon Aug 07 09:39:17 GMT 2023
    - 25.6K bytes
    - Click Count (0)
  5. src/test/java/org/codelibs/fess/entity/ChatMessageTest.java

            final ChatMessage message = new ChatMessage();
            final ChatSource source = new ChatSource();
            source.setIndex(1);
            source.setTitle("Test Document");
    
            message.addSource(source);
    
            assertEquals(1, message.getSources().size());
            assertEquals("Test Document", message.getSources().get(0).getTitle());
        }
    
        @Test
        public void test_addSourceWithNullSources() {
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Wed Jan 14 14:29:07 GMT 2026
    - 9.2K bytes
    - Click Count (0)
  6. src/main/java/org/codelibs/fess/chat/ChatClient.java

                final ChatSource source = new ChatSource(i + 1, sourceList.get(i));
                source.setGoUrl(buildGoUrl(contextPath, source.getDocId(), queryId, requestedTime, i));
                assistantMessage.addSource(source);
            }
        }
    
        /**
         * Populates the url_link field in the document map if not already present.
         *
         * @param doc the document map
         */
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Sat Mar 21 06:04:58 GMT 2026
    - 56.6K bytes
    - Click Count (0)
Back to Top