LangchainCoordinator

gitinsp.application.LangchainCoordinator
See theLangchainCoordinator companion object

Main coordinator for the Langchain application Handles all interactions with the AI services and repositories

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Type members

Types

type StreamingResponse = Source[ServerSentEvent, NotUsed]

Value members

Abstract methods

def chat(msg: String, indexNameOpt: Option[String]): Try[StreamingResponse]

Performs a chat interaction with an AI service

Performs a chat interaction with an AI service

Value parameters

indexNameOpt

Optional name of the index to use for RAG context

msg

The user's message to send to the AI

Attributes

Returns

A streaming response containing AI-generated content wrapped in a Try

def deleteIndex(indexName: String): Try[String]

Deletes an index from the system

Deletes an index from the system

Value parameters

indexName

Name of the index to delete

Attributes

Returns

A JSON string containing the result of the deletion wrapped in a Try

def fetchRepository(link: String, format: String, extension: String): Try[String]

Fetches repository content

Fetches repository content

Value parameters

extension

File extensions to filter for

format

Format of the content to retrieve

link

URL of the repository to fetch

Attributes

Returns

Repository content as a string wrapped in a Try

def generateIndex(repoUrl: String, languages: String): Try[String]

Generates a new index for a repository

Generates a new index for a repository

Value parameters

languages

Comma-separated list of file extensions to include

repoUrl

URL of the repository to index

Attributes

Returns

A JSON string with the result and index name wrapped in a Try

def listIndexes(): Try[String]

Retrieves a list of all available indexes in the system

Retrieves a list of all available indexes in the system

Attributes

Returns

A JSON string containing the list of index names wrapped in a Try

def start(routes: Route): Unit

Starts the HTTP server with the specified routes

Starts the HTTP server with the specified routes

Value parameters

routes

The configured API routes

Attributes