Skip to content

kurtismassey/constellation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WIP Checks

Constellation

API Routes

Router::new()
    .route("/", get(routes::root::get))
    .route("/health", get(routes::health::get))
    .route("/query", post(routes::query::post))

Request

curl http://localhost:8080/
Response
{
  "message": "Welcome to Constellation!"
}

Query endpoint

The query endpoint utilises a web research agent to provide cited responses to queries, the agent is built using rig-core .

let research_agent = llm
    .agent(openai::GPT_4)
    .preamble(include_str!("prompts/research.txt"))
    .tool(WebSearch)
    .build();

Query Request

curl -X POST -H "Content-Type: application/json" -d '{"query": "what is a constellation?"}' http://localhost:8080/query

Query Response

{
  "message": "Query received",
  "query": "what is a constellation?",
  "response": "A constellation often refers to a group of stars that, when lines are drawn between them, resemble a certain shape that has been named. These stars are far from Earth and are not connected to each other. Some stars in a constellation may be close together, while others are very distant. However, if you were to draw lines in the sky between the stars—like a dot-to-dot puzzle—and use a lot of imagination, the picture would look like a specific object, animal, or person[^1^].\n\nOver time and across different cultures, constellations have been given various names, largely based on what people thought the star patterns resembled. Constellations are influenced by geographical location and time of the year. Nowadays, astronomers still use constellations to name stars and meteor showers[^1^].\n\n[^1^]: https://spaceplace.nasa.gov/constellations/en/"
}

About

Constellation is an agentic web research application built in Rust and NextJS.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors