Skip to content

[BUG]: Perplexity API - llama & Sonar models #881

Closed as not planned
Closed as not planned
@surapuramakhil

Description

@surapuramakhil

Describe the bug

it seems code is not compatible with llama response

Steps to reproduce

Error logs

2024-11-18 12:26:45.377 | DEBUG    | ai_hawk.llm.llm_manager:parse_llmresult:389 - Parsing LLM result: content="## Technical Skills\n- In-depth knowledge of Java\n- Proficiency in Spring Boot\n- Experience with React.js, JavaScript/TypeScript, and CSS\n- Familiarity with Docker, Kubernetes, and Git\n- Experience with API development, API Gateway & load balancer configurations, and microservice patterns\n- Knowledge of AWS services (e.g., RDS, ECS, EKS, DynamoDB)\n- Experience with CI/CD tools\n- Understanding of RESTful Web Services\n- Familiarity with Agile methodologies\n\n## Soft Skills\n- Effective communication skills to interact with stakeholders\n- Strong problem-solving abilities\n- Ability to meet deadlines and manage time efficiently\n- Superb interpersonal and collaboration skills\n- Ability to write clear and comprehensive technical documentation without supervision\n- Willingness to explore new frameworks and technologies\n\n## Educational Qualifications and Certifications\n- Bachelor's degree in Computer Science, Software Engineering, or a related field (essential)\n- Certifications in Java, Spring Boot, or related technologies (preferred but not mandatory)\n\n## Professional Experience\n- At least 4+ years of experience in software development using Java and related technologies.\n- Experience working with Spring Boot, React.js, JavaScript/TypeScript, and CSS.\n- Previous experience with Docker, Kubernetes, Git, CI/CD tools, RESTful Web Services, and microservices architecture.\n- Experience working on projects involving AWS services.\n- Proven track record of delivering bug-free features and meeting project deadlines.\n\n## Role Evolution\nGiven the evolving nature of software development roles:\n### Future Trends:\n1. **Cloud Computing**: As cloud services continue to dominate the industry landscape, expertise in cloud platforms like AWS will become even more critical.\n2. **DevOps**: Proficiency in CI/CD tools and practices will be increasingly important as companies adopt more agile and automated development processes.\n3. **Microservices Architecture**: Knowledge of microservices will continue to be vital as companies move towards more scalable and flexible architectures.\n4. **Front-end Technologies**: Skills in modern front-end frameworks like React.js will remain essential due to the ongoing demand for dynamic user interfaces.\n5. **Security**: With the rise in cybersecurity threats, understanding security best practices and implementing secure coding standards will become more crucial.\n\n### Impact on Required Skills:\n- Enhanced focus on cloud-native applications\n- Increased emphasis on DevOps practices\n- Greater importance on microservices architecture\n- Continuous learning of new front-end technologies\n- Stronger emphasis on security awareness and practices\n\nThis analysis ensures that the recruitment process targets candidates who not only meet current requirements but are also prepared for the evolving demands of the role in the future." id='run-5376df5a-30ba-4872-b565-3db34d2750ab-0'
Traceback (most recent call last):
  File "/Users/akhilsurapuram/openSource/linkedIn_auto_jobs_applier_with_AI/src/ai_hawk/llm/llm_manager.py", line 416, in parse_llmresult
    INPUT_TOKENS: usage_metadata.get(
                  ^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get'
2024-11-18 12:26:45.379 | ERROR    | ai_hawk.llm.llm_manager:parse_llmresult:459 - Unexpected error while parsing LLM result: 'NoneType' object has no attribute 'get'
2024-11-18 12:26:45.379 | ERROR    | ai_hawk.llm.llm_manager:__call__:381 - Unexpected error occurred: 'NoneType' object has no attribute 'get'

llama model response

2024-11-18 12:26:45.377 | DEBUG    | ai_hawk.llm.llm_manager:parse_llmresult:389 - Parsing LLM result: content="## Technical Skills\n- In-depth knowledge of Java\n- Proficiency in Spring Boot\n- Experience with React.js, JavaScript/TypeScript, and CSS\n- Familiarity with Docker, Kubernetes, and Git\n- Experience with API development, API Gateway & load balancer configurations, and microservice patterns\n- Knowledge of AWS services (e.g., RDS, ECS, EKS, DynamoDB)\n- Experience with CI/CD tools\n- Understanding of RESTful Web Services\n- Familiarity with Agile methodologies\n\n## Soft Skills\n- Effective communication skills to interact with stakeholders\n- Strong problem-solving abilities\n- Ability to meet deadlines and manage time efficiently\n- Superb interpersonal and collaboration skills\n- Ability to write clear and comprehensive technical documentation without supervision\n- Willingness to explore new frameworks and technologies\n\n## Educational Qualifications and Certifications\n- Bachelor's degree in Computer Science, Software Engineering, or a related field (essential)\n- Certifications in Java, Spring Boot, or related technologies (preferred but not mandatory)\n\n## Professional Experience\n- At least 4+ years of experience in software development using Java and related technologies.\n- Experience working with Spring Boot, React.js, JavaScript/TypeScript, and CSS.\n- Previous experience with Docker, Kubernetes, Git, CI/CD tools, RESTful Web Services, and microservices architecture.\n- Experience working on projects involving AWS services.\n- Proven track record of delivering bug-free features and meeting project deadlines.\n\n## Role Evolution\nGiven the evolving nature of software development roles:\n### Future Trends:\n1. **Cloud Computing**: As cloud services continue to dominate the industry landscape, expertise in cloud platforms like AWS will become even more critical.\n2. **DevOps**: Proficiency in CI/CD tools and practices will be increasingly important as companies adopt more agile and automated development processes.\n3. **Microservices Architecture**: Knowledge of microservices will continue to be vital as companies move towards more scalable and flexible architectures.\n4. **Front-end Technologies**: Skills in modern front-end frameworks like React.js will remain essential due to the ongoing demand for dynamic user interfaces.\n5. **Security**: With the rise in cybersecurity threats, understanding security best practices and implementing secure coding standards will become more crucial.\n\n### Impact on Required Skills:\n- Enhanced focus on cloud-native applications\n- Increased emphasis on DevOps practices\n- Greater importance on microservices architecture\n- Continuous learning of new front-end technologies\n- Stronger emphasis on security awareness and practices\n\nThis analysis ensures that the recruitment process targets candidates who not only meet current requirements but are also prepared for the evolving demands of the role in the future." id='run-5376df5a-30ba-4872-b565-3db34d2750ab-0'

GPT 4o example responses

2024-11-15 09:40:15.337 | DEBUG    | ai_hawk.llm.llm_manager:parse_llmresult:388 - Parsing LLM result: content='# Job Description Summary\n\n## Technical Skills\n- **Cloud Solutions**: Expertise in AWS cloud-based DevOps tools (Terraform, Docker, Kubernetes).\n- **CI/CD Pipelines**: Experience with tools like GitLab and Jenkins for continuous integration and deployment.\n- **Container Technologies**: Proficiency in Docker, Kubernetes, and containerd.\n- **Infrastructure Automation**: Skills in using Ansible and Terraform for automating infrastructure and repetitive tasks.\n- **Monitoring Tools**: Familiarity with Prometheus, Grafana, and CloudWatch for system performance monitoring.\n- **Database Administration**: Experience with databases such as MongoDB, PostgreSQL, and Neo4j.\n- **Log Management**: Knowledge of Elastic and Elasticsearch for log management.\n- **Scripting**: Proficiency in Linux administration and scripting languages (Python and Bash).\n\n## Soft Skills\n- **Collaboration**: Ability to work effectively with development and operations teams to understand and address project requirements.\n- **Problem-Solving**: Strong troubleshooting skills for system and application issues across diverse platforms.\n- **Adaptability**: Capacity to thrive in a fast-paced, collaborative environment.\n- **Communication**: Clear communication skills to convey technical concepts to non-technical stakeholders.\n\n## Educational Qualifications and Certifications\n- **Education**: A Bachelor’s degree in Computer Science, Information Systems, or a related field is preferred.\n- **Certifications**: Active TS/SCI Clearance is required; additional certifications in AWS or DevOps methodologies may be beneficial.\n\n## Professional Experience\n- **Experience**: Minimum of 5 years of hands-on experience in DevOps roles, specifically with AWS cloud-based tools and technologies.\n- **Relevant Projects**: Experience in architecting, designing, and maintaining cloud-based DevOps solutions, as well as deploying applications in on-prem cloud environments.\n\n## Role Evolution\n- **Future Trends**: The role of DevOps Engineer is evolving with the increasing adoption of cloud-native architectures and microservices. \n- **Skills Development**: Future competencies may include advanced knowledge of AI/ML integration in DevOps processes, enhanced security practices in cloud environments, and familiarity with emerging technologies such as serverless computing.\n- **Collaboration Tools**: As remote work continues to be prevalent, skills in using collaborative tools and methodologies (like Agile and DevOps practices) will become increasingly important.\n\nThis comprehensive overview serves as a guideline for the recruitment process, ensuring the identification of the most qualified candidates for the DevOps Engineer position.' response_metadata={'token_usage': {'completion_tokens': 502, 'prompt_tokens': 793, 'total_tokens': 1295, 'prompt_tokens_details': {'cached_tokens': 0, 'audio_tokens': 0}, 'completion_tokens_details': {'reasoning_tokens': 0, 'audio_tokens': 0, 'accepted_prediction_tokens': 0, 'rejected_prediction_tokens': 0}}, 'model_name': 'gpt-4o-mini-2024-07-18', 'system_fingerprint': 'fp_0ba0d124f1', 'finish_reason': 'stop', 'logprobs': None} id='run-420e7128-f734-459d-9ba3-a2fc54289a10-0' usage_metadata={'input_tokens': 793, 'output_tokens': 502, 'total_tokens': 1295}

Expected behavior

bot should be working with any model & provider of choice

Actual behavior

it's breaking for Perplexity - sonal & llama models

Branch

main

Branch name

No response

Python version

No response

LLM Used

No response

Model used

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions