HackerTrans
热门最新趋势评论往期问答秀出招聘

engineerick

no profile record

提交

Show HN: A Simple Web Crawler with Spring, Postgres and Redis

github.com
3 分·作者 engineerick·2年前·1 评论

Bootiful Spring Boot 3.x by Josh Long Spring I/O 2024 [video]

youtube.com
2 分·作者 engineerick·2年前·0 评论

Ask HN: Seeking Advice – Navigating Career and Financial Challenges in Tech

1 分·作者 engineerick·2年前·0 评论

Bootiful Spring Boot in 2024

spring.io
2 分·作者 engineerick·2年前·0 评论

Show HN: LLMdantic: Structured Output Is All You Need

github.com
8 分·作者 engineerick·2年前·2 评论

ChatGPT Generating Racist Content

old.reddit.com
1 分·作者 engineerick·2年前·1 评论

Ask HN: Seeking Advice – Relocating to Canada as a Software Engineer

16 分·作者 engineerick·3年前·26 评论

评论

engineerick
·2年前·讨论
Thanks for the comment and suggestion on Postgres. I agree about the additional surface area of maintenance. However, the reason I used Redis was to become familiar with Redis in the Spring ecosystem. After writing in Python, Go, and Swift, I came back to Java and decided to become a strong Spring & Java developer. That's why I am writing Spring projects to solve different problems with different tech stacks. But now, because you mentioned it, I am interested in using Postgres as a message queue, and I will definitely try it in my future projects.
engineerick
·2年前·讨论
Have you ever seen the https://streamlit.io/ ? I think this is what you are looking for.

Example: https://llm-examples.streamlit.app/
engineerick
·2年前·讨论
Hello, I'm glad you find it useful. I aimed to create something that would serve a purpose. If you can provide me details about use case you are trying to solve, I may add a feature to llmdantic to support it. Right now:

After initialize llmdantic you can get the prompt by running the following command:

""" from llmdantic import LLMdantic, LLMdanticConfig

from langchain_openai import ChatOpenAI

llm = ChatOpenAI()

config: LLMdanticConfig = LLMdanticConfig( objective="Summarize the text", inp_schema=SummarizeInput, out_schema=SummarizeOutput, retries=3, )

llmdantic = LLMdantic(llm=llm, config=config)

input_data: SummarizeInput = SummarizeInput( text="The quick brown fox jumps over the lazy dog." )

prompt: str = llmdantic.prompt(input_data) """

But here you need to provide a langchain llm model. If you do not want to use langchain llm model, you can use the following code:

""" from llmdantic.prompts.prompt_builder import LLMPromptBuilder

from llmdantic.output_parsers.output_parser import LLMOutputParser

output_parser: LLMOutputParser = LLMOutputParser(pydantic_object=SummarizeOutput)

prompt_builder = LLMPromptBuilder( objective="Summarize the text", inp_model=SummarizeInput, out_model=SummarizeOutput, parser=output_parser, )

data: SummarizeInput = SummarizeInput(text="Some text to summarize")

prompt = prompt_builder.build_template()

print(prompt.format(input=data.model_dump())) """

But here still we use langchain for the prompt building. If you any questions, feel free to ask I will be happy to help you.